From a145a3124c1f88ca99d0841fa3cdf9a348c75a1b Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Wed, 24 Apr 2024 14:47:36 +0100 Subject: [PATCH 1/3] Use M1 macOS agent for build The M1 macOS agent does not have stack preinstalled so we must install it using brew before building anything. The cache keys must have the `runner.arch` prefix to avoid building with the x86_64 cache. --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b0d0aa9ed..440fe72e3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,7 +228,7 @@ jobs: make smoke-only build-and-test-macos: - runs-on: macos-12 + runs-on: macos-14 steps: - uses: extractions/setup-just@v2 @@ -238,6 +238,10 @@ jobs: path: main submodules: true + - name: install stack + run: | + brew install haskell-stack + - name: Install Sed run: | brew install gnu-sed @@ -310,7 +314,7 @@ jobs: test: false stack-arguments: --copy-bins working-directory: smoke-repo - cache-prefix: ${{ steps.icuversion.outputs.version }} + cache-prefix: ${{ runner.arch }}-${{ steps.icuversion.outputs.version }} pedantic: false - name: Set homebrew LLVM CC and LIBTOOL vars (macOS) @@ -331,7 +335,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.HOME }}/.local/bin/juvix-cairo-vm - key: ${{ runner.os }}-cairo-vm-${{ env.CAIRO_VM_VERSION }} + key: ${{ runner.os }}-${{ runner.arch }}-cairo-vm-${{ env.CAIRO_VM_VERSION }} - name: Install Rust toolchain if: steps.cache-cairo-vm.outputs.cache-hit != 'true' @@ -375,7 +379,7 @@ jobs: uses: actions/cache@v3 with: path: main/.hie - key: ${{ runner.os }}-stack-hie + key: ${{ runner.os }}-${{ runner.arch }}-stack-hie - name: Stack setup id: stack @@ -384,6 +388,7 @@ jobs: working-directory: main stack-build-arguments: ${{ env.STACK_BUILD_ARGS }} test: false + cache-prefix: ${{ runner.arch }} - name: Add homebrew clang to the PATH (macOS) run: | From 9799581bbf0ba96bde73db2c0175de9727de86a4 Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Wed, 24 Apr 2024 16:06:36 +0100 Subject: [PATCH 2/3] Use x86_64 version of vamp-ir The vamp-ir aarch64 release cannot be found by the jaxxstorm/action-install-gh-release action --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 440fe72e3d..98728cec08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -395,10 +395,11 @@ jobs: echo "$(brew --prefix llvm@15)/bin" >> $GITHUB_PATH - name: Install VampIR for testing - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: ${{ env.VAMPIRREPO }} platform: darwin + arch: x86_64 tag: ${{ env.VAMPIRVERSION }} chmod: 0755 rename-to: vamp-ir From 51cd6a97ca7f35bee206f93286d38da1de4786b7 Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Wed, 24 Apr 2024 16:22:14 +0100 Subject: [PATCH 3/3] Update jaxxstorm/action-install-gh-release v1.10.0 does not support aarch64 / arm64 arch --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98728cec08..6d31dd6246 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -272,7 +272,7 @@ jobs: echo "WASI_SYSROOT_PATH=$GITHUB_WORKSPACE/wasi-sysroot" >> $GITHUB_ENV - name: Install the latest Wasmer version - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: wasmerio/wasmer binaries-location: bin