Files
wiicompiled/.github/workflows/build.yml
T

76 lines
2.2 KiB
YAML

name: Build
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
recompilation:
name: Recompilation test
uses: ./.github/workflows/recomp-test.yml
translator:
name: Translator (build + test)
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '8.0.x'
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('translator/Translator.sln', '**/*.csproj', '**/*.props', '**/*.targets', '**/packages.lock.json', 'global.json', 'NuGet.config', 'nuget.config') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore translator/Translator.sln
- name: Build
run: dotnet build translator/Translator.sln -c Release --no-restore
- name: Test
run: dotnet test translator/Translator.sln -c Release --no-build --verbosity normal
nand:
name: NAND regression tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Compile and run NAND tests
shell: bash
run: |
flags=(-std=c++17 -Wall -Wextra -Werror)
if [[ "$RUNNER_OS" != Windows ]]; then flags+=(-pthread); fi
clang++ "${flags[@]}" -Iruntime/src/hle/storage \
runtime/tests/nand_move_tests.cpp runtime/src/hle/storage/nand_file_ops.cpp \
-o "$RUNNER_TEMP/nand_move_tests.exe"
"$RUNNER_TEMP/nand_move_tests.exe"
for test in nand_save nand_settings; do
clang++ "${flags[@]}" -Iruntime/include "runtime/tests/${test}_tests.cpp" \
-o "$RUNNER_TEMP/${test}_tests.exe"
"$RUNNER_TEMP/${test}_tests.exe"
done