|
28 | 28 | with: |
29 | 29 | name: msys2-packages |
30 | 30 | path: artifacts/*.pkg.tar.* |
| 31 | + build-i686: |
| 32 | + if: contains(github.event.pull_request.title, 'msys2-runtime-3.3') |
| 33 | + runs-on: windows-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + with: |
| 37 | + fetch-depth: 0 # needed to determine which packages to build |
| 38 | + - uses: git-for-windows/setup-git-for-windows-sdk@v1 |
| 39 | + with: |
| 40 | + flavor: full |
| 41 | + architecture: i686 |
| 42 | + msys: true |
| 43 | + - name: rebase `.dll` base addresses |
| 44 | + shell: powershell |
| 45 | + run: | |
| 46 | + if (Test-Path D:\git-sdk-32-full -PathType Container) { |
| 47 | + cd D:\git-sdk-32-full |
| 48 | + } else { |
| 49 | + cd C:\git-sdk-32-full |
| 50 | + } |
| 51 | + if (!$?) { exit(1); } |
| 52 | +
|
| 53 | + $env:MSYSTEM = "MINGW32" |
| 54 | + $env:PATH = "$(Get-Location)\usr\bin;" + $env:PATH |
| 55 | + $env:MSYS2_PATH_TYPE = "minimal" |
| 56 | +
|
| 57 | + # Disable pacman's post-transaction hook that would mess everything up, if it exists |
| 58 | + sh.exe -lc "set -x && rm -f /usr/share/libalpm/hooks/rebase.hook" |
| 59 | +
|
| 60 | + sh.exe -lc "set -x && find /usr/lib/perl5/*_perl -name \*.dll >perl-dlls.txt" |
| 61 | + type perl-dlls.txt |
| 62 | + dash -x /usr/bin/rebaseall -p -T perl-dlls.txt |
| 63 | +
|
| 64 | + # Work around for: |
| 65 | + # - address space needed by 'Cwd.dll' is already occupied |
| 66 | + # - address space needed by 'Dumper.dll' is already occupied |
| 67 | + # etc |
| 68 | + bash -lc "set -x && rebase -b 0x61500000 /usr/lib/perl5/core_perl/auto/*/{*,*/*}.dll" |
| 69 | + # Work around for: |
| 70 | + # - address space needed by 'Cwd.dll' is already occupied |
| 71 | + bash -lc "set -x && rebase -v -b 0x63f00000 /usr/lib/perl5/core_perl/auto/Cwd/Cwd.dll" |
| 72 | + # verify the base address |
| 73 | + bash -lc "set -x && rebase -v -i /usr/lib/perl5/core_perl/auto/Cwd/Cwd.dll" |
| 74 | + - name: CI-Build (i686) |
| 75 | + shell: bash |
| 76 | + run: | |
| 77 | + set -x && |
| 78 | + mkdir -p artifacts && |
| 79 | + err= && |
| 80 | + for dir in $(git diff --name-only \ |
| 81 | + ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} | |
| 82 | + sed -n 's/^\([a-z][^/]*\)\/.*/\1/p' | |
| 83 | + sort | |
| 84 | + uniq) |
| 85 | + do |
| 86 | + case $dir in msys2-runtime) continue;; esac |
| 87 | + ( |
| 88 | + cd $dir && |
| 89 | + ../.ci/fetch-validpgpkeys.sh && |
| 90 | + makepkg -s --noconfirm && |
| 91 | + cp -v *.pkg.tar.* ../artifacts/ |
| 92 | + ) || |
| 93 | + err="$err $dir" |
| 94 | + done && |
| 95 | + test -z "$err" || { |
| 96 | + echo "::error::Build failures in$err" >&2 |
| 97 | + exit 1 |
| 98 | + } |
| 99 | + env: |
| 100 | + MSYSTEM: MSYS |
| 101 | + MAKEFLAGS: -j5 |
| 102 | + MSYS2_PATH_TYPE: minimal |
| 103 | + GIT_CONFIG_PARAMETERS: "'user.name=ci' 'user.email=ci@users.noreply.github.com'" |
| 104 | + - name: "Upload binaries" |
| 105 | + uses: actions/upload-artifact@v3 |
| 106 | + with: |
| 107 | + name: msys2-packages-i686 |
| 108 | + path: artifacts/*.pkg.tar.* |
0 commit comments