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 platform_tests: name: Host platform (${{ matrix.runner }}) strategy: fail-fast: false matrix: runner: [ubuntu-24.04, macos-14, macos-15-intel] runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v7 with: persist-credentials: false - name: Configure without graphics dependencies or game assets run: >- cmake -S runtime -B build-platform -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DMKW_BUILD_PRODUCTS=OFF -DMKW_PLATFORM_TESTS_ONLY=ON - name: Build and run host-platform tests run: | cmake --build build-platform --parallel 3 ctest --test-dir build-platform --output-on-failure macos_substrate: name: macOS arm64 (configure + substrate tests) runs-on: macos-14 steps: - uses: actions/checkout@v7 with: persist-credentials: false - name: Test macOS app dependency packaging shell: bash run: bash Launcher/macos/test-publish-app.command - name: Configure native runtime shell: bash run: | test "$(uname -m)" = arm64 cmake -S runtime -B build-macos -G Ninja \ -DCMAKE_BUILD_TYPE=Release -DMKW_BUILD_PRODUCTS=OFF grep -qx 'CMAKE_OSX_DEPLOYMENT_TARGET:STRING=12.0' \ build-macos/CMakeCache.txt - name: Build macOS portability targets shell: bash run: | cmake --build build-macos --target \ mkw_platform_paths_tests \ mkw_runtime_config_tests \ mkw_nand_save_tests \ mkw_nand_settings_tests \ mkw_sc_serial_tests \ mkw_input_expr_tests \ mkw_macos_native_compile \ mkw_macos_context_abi_tests \ mkw_macos_host_context_tests \ mkw_macos_guest_flat_memory_tests \ mkw_macos_external_audio_tests - name: Test execution substrate shell: bash run: ctest --test-dir build-macos --output-on-failure