From 2423bac0a4ee28b86e7431efef4eaae8b9344ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 3 Oct 2026 15:08:40 -0700 Subject: [PATCH] CI: Update macOS runner to macos-15, add amalgamated build, cache emsdk. (#441) --- .github/workflows/main.yml | 66 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c640d1..67d7570 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,8 +108,8 @@ jobs: fail-fast: true matrix: include: [ - { runs-on: macos-14, arch: osx-arm64, bindir: osx-arm64, config: debug, binsuffix: Debug }, - { runs-on: macos-14, arch: osx-arm64, bindir: osx-arm64, config: release, binsuffix: Release }, + { runs-on: macos-15, arch: osx-arm64, bindir: osx-arm64, config: debug, binsuffix: Debug }, + { runs-on: macos-15, arch: osx-arm64, bindir: osx-arm64, config: release, binsuffix: Release }, ] name: osx-${{ matrix.arch }}-${{ matrix.config }} runs-on: ${{ matrix.runs-on }} @@ -176,6 +176,7 @@ jobs: - uses: mymindstorm/setup-emsdk@v14 with: version: 5.0.2 + actions-cache-folder: emsdk-cache - uses: browser-actions/setup-chrome@v1 - name: Build run: | @@ -186,3 +187,64 @@ jobs: run: | cd bx # npx http-server -o .build/wasm/bin/ & chromium http://127.0.0.1:8080/.build/wasm/bin/bx.testRelease.html + amalgamated: + strategy: + fail-fast: true + matrix: + include: [ + { name: msvc, runs-on: windows-latest }, + { name: linux-gcc, runs-on: ubuntu-24.04, os: linux, config: release64, bindir: linux64_gcc }, + { name: linux-clang, runs-on: ubuntu-24.04, os: linux, config: release64, bindir: linux64_clang }, + { name: osx-arm64, runs-on: macos-15, os: darwin, config: release, bindir: osx-arm64 }, + { name: android-arm64, runs-on: ubuntu-24.04, os: linux, config: release }, + { name: wasm, runs-on: ubuntu-24.04, os: linux, config: release, make-args: 'EMSCRIPTEN=$EMSDK/upstream/emscripten' }, + ] + name: amalgamated-${{ matrix.name }} + runs-on: ${{ matrix.runs-on }} + steps: + - name: Checkout bx + uses: actions/checkout@v6 + with: + repository: ${{ github.repository }} + path: bx + - name: Prepare + if: matrix.name == 'msvc' + uses: microsoft/setup-msbuild@v2 + - uses: nttld/setup-ndk@v1 + if: startsWith(matrix.name, 'android') + id: setup-ndk + with: + ndk-version: r27c + - uses: mymindstorm/setup-emsdk@v14 + if: matrix.name == 'wasm' + with: + version: 5.0.2 + actions-cache-folder: emsdk-cache + - name: Build + if: matrix.name == 'msvc' + shell: cmd + run: | + cd bx + tools\bin\windows\genie.exe --with-amalgamated vs2022 + msbuild ".build/projects/vs2022/bx.sln" /m /v:minimal /p:Configuration=Release /p:Platform=x64 + - name: Build + if: matrix.name != 'msvc' + env: + ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} + ANDROID_NDK_ARM: ${{ steps.setup-ndk.outputs.ndk-path }} + ANDROID_NDK_ARM64: ${{ steps.setup-ndk.outputs.ndk-path }} + run: | + cd bx + tools/bin/${{ matrix.os }}/genie --with-amalgamated --gcc=${{ matrix.name }} gmake + make -C .build/projects/gmake-${{ matrix.name }} config=${{ matrix.config }} -j$(getconf _NPROCESSORS_ONLN) ${{ matrix.make-args }} + - name: Check + if: matrix.name == 'msvc' + shell: cmd + run: | + cd bx + ".build\win64_vs2022\bin\bx.testRelease.exe" -d yes + - name: Check + if: matrix.bindir + run: | + cd bx + ".build/${{ matrix.bindir }}/bin/bx.testRelease" -d yes