tests: Update GPU arch reporting code for post-Blackwell #433
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, test and package on Linux (MinGW) | |
on: | |
push: | |
branches: [ master ] | |
tags: [ v* ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build-test-package-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Prepare environment (none-tag) | |
if: github.ref_type != 'tag' | |
run: | | |
export VERSION="${GITHUB_REF##*/}-${GITHUB_SHA##*/}" | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
echo "ARTIFACT=build/dxvk-nvapi-${VERSION}" >> $GITHUB_ENV | |
- name: Prepare environment (tag) | |
if: github.ref_type == 'tag' | |
run: | | |
export VERSION=$(git describe --always --tags --dirty=+) | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
echo "ARTIFACT=dxvk-nvapi-${VERSION}.tar.gz" >> $GITHUB_ENV | |
- name: Lint source code | |
uses: Joshua-Ashton/arch-mingw-github-action@9cdb815264bce7a6346927521b176f578982679d | |
with: | |
command: | | |
meson setup --cross-file "./build-win64.txt" -Denable_tests=True build/lint | |
ninja clang-format-check -C build/lint | |
- name: Build and run tests | |
uses: Joshua-Ashton/arch-mingw-github-action@9cdb815264bce7a6346927521b176f578982679d | |
with: | |
command: | | |
./package-release.sh "${{ env.VERSION }}" build --enable-tests | |
mkdir "${HOME}/tests-prefix" | |
export WINEPREFIX="${HOME}/tests-prefix" | |
export WINEDEBUG=-all | |
wine "./build/dxvk-nvapi-${{ env.VERSION }}/x64/nvapi64-tests.exe" [@unit-tests] -o nvapi64-tests.log | |
wine "./build/dxvk-nvapi-${{ env.VERSION }}/x64/nvofapi64-tests.exe" [@unit-tests] -o nvofapi64-tests.log | |
- name: Present tests results | |
if: success() || failure() | |
run: | | |
if [ -e nvapi64-tests.log ]; then cat nvapi64-tests.log; fi | |
if [ -e nvofapi64-tests.log ]; then cat nvofapi64-tests.log; fi | |
- name: Create tarball | |
if: github.ref_type == 'tag' | |
run: tar cvfz "dxvk-nvapi-${{ env.VERSION }}.tar.gz" -C "./build/dxvk-nvapi-${{ env.VERSION }}" . | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dxvk-nvapi-${{ env.VERSION }} | |
path: ${{ env.ARTIFACT }} | |
if-no-files-found: error |