mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-29 12:15:39 +00:00
118 lines
4.6 KiB
YAML
118 lines
4.6 KiB
YAML
name: Windows MSYS2
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '23 8 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: windows-msys2-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CONFIGURE: >-
|
|
-G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
|
|
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
|
|
jobs:
|
|
windows-msys2:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
ref: ${{ github.sha }}
|
|
persist-credentials: false
|
|
- id: submodules
|
|
name: Key the submodules on their commits
|
|
run: |
|
|
echo "key=$(git ls-files -s | awk '$1 == "160000" { print $2, $4 }' | cat - .gitmodules | sha256sum | cut -c1-16)" >> "$GITHUB_OUTPUT"
|
|
echo "ffmpeg=$(git rev-parse HEAD:3rdparty/ffmpeg-core)" >> "$GITHUB_OUTPUT"
|
|
- id: submodule-cache
|
|
uses: actions/cache/restore@v6
|
|
with:
|
|
path: ${{ runner.temp }}/submodule-gitdirs.tar
|
|
key: submodule-gitdirs-${{ runner.os }}-${{ steps.submodules.outputs.key }}
|
|
- name: Check out the submodules
|
|
run: |
|
|
if [ -f "$RUNNER_TEMP/submodule-gitdirs.tar" ]; then tar --force-local -xf "$RUNNER_TEMP/submodule-gitdirs.tar"; fi
|
|
git submodule update --init --recursive --depth 1 --jobs 8
|
|
- if: steps.submodule-cache.outputs.cache-hit != 'true'
|
|
run: tar --force-local -cf "$RUNNER_TEMP/submodule-gitdirs.tar" .git/modules
|
|
- if: steps.submodule-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v6
|
|
continue-on-error: true
|
|
with:
|
|
path: ${{ runner.temp }}/submodule-gitdirs.tar
|
|
key: submodule-gitdirs-${{ runner.os }}-${{ steps.submodules.outputs.key }}
|
|
- name: Use the CA bundle of Git for Windows
|
|
run: |
|
|
for prefix in ucrt64 mingw64; do
|
|
bundle="C:/Program Files/Git/$prefix/etc/ssl/certs/ca-bundle.crt"
|
|
if [ -f "$bundle" ]; then echo "SSL_CERT_FILE=$bundle" >> "$GITHUB_ENV"; exit 0; fi
|
|
done
|
|
echo "::error::No CA bundle found in Git for Windows"; exit 1
|
|
- id: msys2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: UCRT64
|
|
update: true
|
|
install: >-
|
|
mingw-w64-ucrt-x86_64-gcc
|
|
mingw-w64-ucrt-x86_64-cmake
|
|
mingw-w64-ucrt-x86_64-ninja
|
|
- shell: pwsh
|
|
env:
|
|
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
|
|
run: Add-Content -LiteralPath $env:GITHUB_PATH -Value "$env:MSYS2_LOCATION\ucrt64\bin"
|
|
- uses: hendrikmuhs/[email protected]
|
|
with:
|
|
key: windows-msys2
|
|
save: ${{ github.ref == 'refs/heads/main' }}
|
|
evict-old-files: job
|
|
- id: ffmpeg-cache
|
|
uses: actions/cache/restore@v6
|
|
with:
|
|
path: build/externals
|
|
key: ffmpeg-${{ runner.os }}-${{ steps.submodules.outputs.ffmpeg }}
|
|
- shell: cmd
|
|
run: cmake -S . -B build %CONFIGURE% "-DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown"
|
|
- if: steps.ffmpeg-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v6
|
|
continue-on-error: true
|
|
with:
|
|
path: build/externals
|
|
key: ${{ steps.ffmpeg-cache.outputs.cache-primary-key }}
|
|
- name: Check that every test executable is registered with ctest
|
|
shell: cmd
|
|
run: python tools/check_test_registration.py build
|
|
- shell: cmd
|
|
run: cmake --build build
|
|
- shell: cmd
|
|
run: cmake --build build --target libs
|
|
- shell: cmd
|
|
working-directory: build
|
|
run: ctest --output-on-failure --timeout 120 --parallel 4 --output-log ctest.log --output-junit ctest.xml
|
|
- run: python tools/check_skips.py build/ctest.xml --job windows
|
|
- name: Report tests slower than 30 s
|
|
if: ${{ !cancelled() }}
|
|
run: |
|
|
[ -f build/ctest.log ] || exit 0
|
|
awk '/Test +#[0-9]+: / && $NF == "sec" { for (i = 1; i <= NF; i++) if ($i ~ /^#[0-9]+:$/) name = $(i + 1); t = $(NF - 1) + 0; if (t > max[name]) max[name] = t }
|
|
END { for (name in max) if (max[name] > 30) printf "::warning title=Slow test::%s took %.1f s on %s; tests must finish in 30 s (CONTRIBUTING.md)\n", name, max[name], ENVIRON["RUNNER_OS"] }' build/ctest.log
|
|
- uses: actions/upload-artifact@v7
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: windows-msys2-tests
|
|
path: |
|
|
build/ctest.log
|
|
build/ctest.xml
|
|
if-no-files-found: ignore
|