name: Build + Test on: push: branches: - main pull_request: branches: - main env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release CC: clang CXX: clang++ FEX_PORTABLE: 1 jobs: build_plus_test: runs-on: ${{ matrix.arch }} strategy: matrix: arch: [[self-hosted, ARMv8.0], [self-hosted, ARMv8.2], [self-hosted, ARMv8.4]] fail-fast: false steps: - uses: actions/checkout@v6 - name: Set runner info run: | echo "runner_label=${{ matrix.arch[1] }}" >> $GITHUB_ENV echo "runner_name=$(hostname)" >> $GITHUB_ENV - name: Setup Build Environment uses: ./.github/workflows/setup-env - name: Configure CMake run: | cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja -DENABLE_LTO=False -DENABLE_ASSERTIONS=True \ -DENABLE_X86_HOST_DEBUG=True -DBUILD_FEX_LINUX_TESTS=True -DBUILD_THUNKS=True \ -DCMAKE_INSTALL_PREFIX="$PWD"/build/install # These steps make a lot of noise but rarely fail. # Put them in a separate step to make normal build logs easier to parse - name: Noisy Build Targets run: cmake --build build --target asm_files 32bit_asm_files JemallocLibs Catch2 vixl cephes_128bit - name: Build run: cmake --build build - name: Install run: cmake --build build --target install # GCC tests - name: GCC64 Target Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: gcc_target_tests_64 log-name: GCC64 - name: GCC32 Target Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: gcc_target_tests_32 log-name: GCC32 # API tests - name: API Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: api_tests log-name: APITests - name: FEXCore API Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: fexcore_apitests log-name: FEXCoreAPITests # ARM emission tests - name: ARM Emitter Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: emitter_tests log-name: ARMEmitterTests # Linux tests - name: FEX Linux Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: fex_linux_tests_all log-name: FEXLinuxTests env: FEX_PORTABLE: 0 # Thunking - name: Thunkgen tests if: ${{ always() }} uses: ./.github/workflows/test with: target: thunkgen_tests log-name: ThunkgenTests - name: Test GL No-Thunks if: ${{ always() && matrix.arch[1] == 'x64' }} uses: ./.github/workflows/test with: target: thunk_functional_tests_nothunks log-name: NoThunkResults env: DISPLAY: ':0' - name: Test GL Thunks if: ${{ always() && matrix.arch[1] == 'x64' }} uses: ./.github/workflows/test with: target: thunk_functional_tests_thunks log-name: ThunkResults env: DISPLAY: ':0' # ASM tests - name: ASM Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: asm_tests log-name: ASM # POSIX tests - name: POSIX Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: posix_tests log-name: Posix # GVisor tests - name: GVisor Tests if: ${{ always() }} uses: ./.github/workflows/test with: target: gvisor_tests log-name: GVisor # Struct verifier tests - name: Struct verifier tests if: ${{ always() }} uses: ./.github/workflows/test with: target: struct_verifier log-name: StructVerifier - name: Remove old SHM regions if: ${{ always() }} run: cmake --build build --target remove_old_shm_regions - name: Upload results if: ${{ always() }} uses: actions/upload-artifact@v6 timeout-minutes: 1 with: name: Results-${{ env.runner_name }}-${{ env.runner_label }} path: ${{ github.workspace }}/build/Testing/Temporary/LastTest_*.log retention-days: 3