|
| 1 | +name: build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - gha |
| 7 | + |
| 8 | +jobs: |
| 9 | + win32: |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - os: windows-latest |
| 16 | + arch: x64 |
| 17 | + cc: clang |
| 18 | + cxx: clang++ |
| 19 | + ld: lld-link |
| 20 | + ar: llvm-ar |
| 21 | + nm: llvm-nm |
| 22 | + additional_args: "--extra-ldflags='msvcrt.lib oldnames.lib' --toolchain=msvc" |
| 23 | + - os: windows-latest |
| 24 | + arch: "x64" |
| 25 | + additional_args: --toolchain=msvc |
| 26 | + - os: windows-11-arm |
| 27 | + arch: arm64 |
| 28 | + cc: clang |
| 29 | + cxx: clang++ |
| 30 | + ld: lld-link |
| 31 | + ar: llvm-ar |
| 32 | + nm: llvm-nm |
| 33 | + additional_args: "--extra-ldflags='msvcrt.lib oldnames.lib' --toolchain=msvc" |
| 34 | + - os: windows-11-arm |
| 35 | + arch: arm64 |
| 36 | + additional_args: --toolchain=msvc |
| 37 | + env: |
| 38 | + VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise" |
| 39 | + MSYSTEM: MSYS |
| 40 | + steps: |
| 41 | + - uses: msys2/setup-msys2@v2 |
| 42 | + with: |
| 43 | + msystem: MSYS |
| 44 | + update: true |
| 45 | + install: >- |
| 46 | + make |
| 47 | + rsync |
| 48 | + - name: Install dependencies |
| 49 | + run: | |
| 50 | + choco install nasm |
| 51 | + - uses: actions/checkout@v4 |
| 52 | + - name: Build |
| 53 | + id: build |
| 54 | + shell: pwsh |
| 55 | + run: | |
| 56 | + $ErrorActionPreference = "Stop" |
| 57 | + $PSNativeCommandUseErrorActionPreference = $true |
| 58 | + $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and ` |
| 59 | + $_ -ne 'C:\Program Files\CMake\bin' -and ` |
| 60 | + $_ -ne 'C:\Strawberry\c\bin' }) -join ';' |
| 61 | + $env:PATH += ';C:\Program Files\NASM' |
| 62 | + Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" |
| 63 | + Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.arch }} -host_arch=${{ matrix.arch }}" |
| 64 | + $conf = "../configure --enable-gpl --enable-version3 --enable-nonfree --samples=../samples --enable-w32threads" |
| 65 | + if ("${{ matrix.cc }}" -ne '') { $conf += " --cc=${{ matrix.cc }}" } |
| 66 | + if ("${{ matrix.cxx }}" -ne '') { $conf += " --cxx=${{ matrix.cxx }}" } |
| 67 | + if ("${{ matrix.ar }}" -ne '') { $conf += " --ar=${{ matrix.ar }}" } |
| 68 | + if ("${{ matrix.nm }}" -ne '') { $conf += " --nm=${{ matrix.nm }}" } |
| 69 | + if ("${{ matrix.ld }}" -ne '') { $conf += " --ld=${{ matrix.ld }}" } |
| 70 | + if ("${{ matrix.additional_args }}" -ne '') { $conf += " ${{ matrix.additional_args }}" } |
| 71 | +
|
| 72 | + mkdir build |
| 73 | + cd build |
| 74 | + msys2 -c "$conf && make -j``nproc`` && make -j``nproc`` run-checkasm && make -j``nproc`` fate-rsync && make -j``nproc`` fate" |
| 75 | + - name: Print meson test log |
| 76 | + if: ${{ failure() && steps.build.outcome == 'failure' }} |
| 77 | + run: | |
| 78 | + cat ./build/ffbuild/config.log |
0 commit comments