From 74bb55901b9b8b493f4d284b569be7cd41345b3b Mon Sep 17 00:00:00 2001 From: diegomrsantos Date: Tue, 15 Oct 2024 12:11:23 +0200 Subject: [PATCH] chore(ci): add arm64 for macOS (#1212) This PR adds the macOS 14 GitHub runner that uses the arm64 cpu. --------- Co-authored-by: Ludovic Chenut --- .github/actions/install_nim/action.yml | 2 ++ .github/workflows/ci.yml | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/install_nim/action.yml b/.github/actions/install_nim/action.yml index 83de4f313a..403f5aa27c 100644 --- a/.github/actions/install_nim/action.yml +++ b/.github/actions/install_nim/action.yml @@ -88,6 +88,8 @@ runs: run: | if [[ '${{ inputs.cpu }}' == 'amd64' ]]; then PLATFORM=x64 + elif [[ '${{ inputs.cpu }}' == 'arm64' ]]; then + PLATFORM=arm64 else PLATFORM=x86 fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3187c55027..5b69f5d91e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,8 @@ jobs: cpu: amd64 - os: macos cpu: amd64 + - os: macos-14 + cpu: arm64 - os: windows cpu: amd64 nim: @@ -47,6 +49,10 @@ jobs: os: macos builder: macos-13 shell: bash + - platform: + os: macos-14 + builder: macos-14 + shell: bash - platform: os: windows builder: windows-2022 @@ -75,7 +81,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '~1.15.5' + go-version: '~1.16.0' # That's the minimum Go version that works with arm. - name: Install p2pd run: | @@ -87,8 +93,8 @@ jobs: with: path: nimbledeps # Using nim.branch as a simple way to differentiate between nimble using the "pkgs" or "pkgs2" directories. - # The change happened on Nimble v0.14.0. - key: nimbledeps-${{ matrix.nim.branch }}-${{ hashFiles('.pinned') }} # hashFiles returns a different value on windows + # The change happened on Nimble v0.14.0. Also forcing the deps to be reinstalled on each os and cpu. + key: nimbledeps-${{ matrix.nim.branch }}-${{ matrix.builder }}-${{ matrix.platform.cpu }}-${{ hashFiles('.pinned') }} # hashFiles returns a different value on windows - name: Install deps if: ${{ steps.deps-cache.outputs.cache-hit != 'true' }}