Files
psxrecomp/.github/workflows/cli-release.yml
T
2026-07-22 12:25:06 -07:00

81 lines
2.3 KiB
YAML

name: CLI release
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
release:
types: [published]
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install MinGW toolchain (Windows)
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-python
- name: Build CLI package
shell: msys2 {0}
run: python tools/build_cli.py release
- name: Test boot path handling
shell: msys2 {0}
run: |
cmake --build recompiler/build-cli --target cli_boot_path_test --parallel 2
ctest --test-dir recompiler/build-cli -R '^cli_boot_path_test$' --output-on-failure
- name: Smoke test packaged CLI
shell: msys2 {0}
run: dist/psxrecomp-cli-windows-x86_64/psxrecomp.exe --help
- uses: actions/upload-artifact@v6
with:
name: psxrecomp-cli-windows-x86_64
path: dist/psxrecomp-cli-*.zip
if-no-files-found: error
linux-boot-path-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure boot path test
run: cmake -S recompiler -B recompiler/build-boot-path-test -DBUILD_TESTING=ON
- name: Build boot path test
run: cmake --build recompiler/build-boot-path-test --target cli_boot_path_test --parallel 2
- name: Run boot path test
run: >-
ctest --test-dir recompiler/build-boot-path-test
-R '^cli_boot_path_test$' --output-on-failure
publish-release-assets:
if: github.event_name == 'release'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v6
with:
pattern: psxrecomp-cli-*
merge-multiple: true
- name: Attach CLI packages to release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: >-
gh release upload "$RELEASE_TAG" psxrecomp-cli-*.zip
--repo "$GITHUB_REPOSITORY" --clobber