mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
Git for Windows 2.56 (runner image 20261002) moved from mingw64 to ucrt64, so the fixed SSL_CERT_FILE path no longer exists and the WinLibs CMake fails the FFmpeg download with status 60 on every Windows build. Take the bundle from whichever of ucrt64 and mingw64 exists. Co-Authored-By: Claude <noreply@anthropic.com>
147 lines
5.6 KiB
YAML
147 lines
5.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
RELEASE_TAG: ${{ github.ref_name }}
|
|
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
|
|
WINLIBS_RELEASE: 15.2.0posix-14.0.0-ucrt-r7
|
|
WINLIBS_ZIP: winlibs-x86_64-posix-seh-gcc-15.2.0-mingw-w64ucrt-14.0.0-r7.zip
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and test (${{ matrix.platform }})
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- platform: linux
|
|
runner: ubuntu-latest
|
|
timeout: 30
|
|
- platform: windows
|
|
runner: windows-latest
|
|
timeout: 45
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: ${{ matrix.timeout }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
- name: Point the WinLibs CMake at the CA bundle of Git for Windows
|
|
if: matrix.platform == 'windows'
|
|
shell: bash
|
|
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: toolchain
|
|
if: matrix.platform == 'windows'
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: C:\winlibs
|
|
key: ${{ env.WINLIBS_ZIP }}
|
|
- if: matrix.platform == 'windows' && steps.toolchain.outputs.cache-hit != 'true'
|
|
run: |
|
|
curl -sSfL -o "$RUNNER_TEMP/winlibs.zip" "https://github.com/brechtsanders/winlibs_mingw/releases/download/$WINLIBS_RELEASE/$WINLIBS_ZIP"
|
|
7z x "$RUNNER_TEMP/winlibs.zip" -oC:/winlibs
|
|
- if: matrix.platform == 'windows'
|
|
run: echo 'C:\winlibs\mingw64\bin' >> "$GITHUB_PATH"
|
|
- uses: hendrikmuhs/ccache-action@v1.2.24
|
|
with:
|
|
key: ${{ matrix.platform }}
|
|
save: false
|
|
- name: Install lavapipe for the GPU execution tests and the audio development files
|
|
if: matrix.platform == 'linux'
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libvulkan1 mesa-vulkan-drivers libpipewire-0.3-dev libpulse-dev libasound2-dev libxrandr-dev libwayland-dev libxkbcommon-dev libegl-dev libdecor-0-dev
|
|
- name: Configure Linux
|
|
if: matrix.platform == 'linux'
|
|
run: cmake -S . -B build $CONFIGURE
|
|
- name: Configure Windows
|
|
if: matrix.platform == 'windows'
|
|
shell: cmd
|
|
run: cmake -S . -B build %CONFIGURE%
|
|
- name: Build project and tests (Linux)
|
|
if: matrix.platform == 'linux'
|
|
run: cmake --build build
|
|
- name: Build project and tests (Windows)
|
|
if: matrix.platform == 'windows'
|
|
shell: cmd
|
|
run: cmake --build build
|
|
- name: Run tests (Linux)
|
|
if: matrix.platform == 'linux'
|
|
run: ctest --test-dir build --output-on-failure --timeout 120 --stop-on-failure --no-tests=error
|
|
env:
|
|
ANYPS5_REQUIRE_VULKAN: 1
|
|
GALLIUM_OVERRIDE_CPU_CAPS: avx
|
|
- name: Run tests (Windows)
|
|
if: matrix.platform == 'windows'
|
|
shell: cmd
|
|
run: ctest --test-dir build --output-on-failure --timeout 120 --stop-on-failure --no-tests=error
|
|
- name: Build patched libraries (Linux)
|
|
if: matrix.platform == 'linux'
|
|
run: cmake --build build --target libs
|
|
- name: Build patched libraries (Windows)
|
|
if: matrix.platform == 'windows'
|
|
shell: cmd
|
|
run: cmake --build build --target libs
|
|
- name: Package release files
|
|
run: python tools/package_release.py --platform "${{ matrix.platform }}" --build build --output dist --version "$RELEASE_TAG"
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: release-${{ matrix.platform }}
|
|
path: dist/*
|
|
if-no-files-found: error
|
|
compression-level: 0
|
|
|
|
publish:
|
|
name: Publish release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
GH_REPO: ${{ github.repository }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
pattern: release-*
|
|
merge-multiple: true
|
|
path: dist
|
|
- name: Check release files and collect documentation
|
|
shell: bash
|
|
run: |
|
|
for file in "prx-windows-$RELEASE_TAG.zip" "prx-windows-$RELEASE_TAG.tar.gz" "prx-linux-$RELEASE_TAG.zip" "prx-linux-$RELEASE_TAG.tar.gz" "relinker-$RELEASE_TAG.exe" "relinker-$RELEASE_TAG"; do
|
|
test -s "dist/$file"
|
|
done
|
|
python tools/package_release.py --docs docs/user --output dist
|
|
chmod +x "dist/relinker-$RELEASE_TAG"
|
|
- name: Prepare release notes
|
|
shell: bash
|
|
run: |
|
|
gh api --method POST "repos/$GH_REPO/releases/generate-notes" -f tag_name="$RELEASE_TAG" > "$RUNNER_TEMP/release-notes.json"
|
|
python tools/prepare_release_notes.py --input "$RUNNER_TEMP/release-notes.json" --body "$RUNNER_TEMP/release-body.md" --full dist/release-notes.md
|
|
- name: Create draft and upload files
|
|
run: gh release create "$RELEASE_TAG" dist/* --verify-tag --draft --title "$RELEASE_TAG" --notes-file "$RUNNER_TEMP/release-body.md"
|
|
- name: Publish complete release
|
|
run: gh release edit "$RELEASE_TAG" --draft=false
|