From c3793c701d8cc63f1250f5789a8c89025dc18734 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Wed, 8 Nov 2023 11:13:54 -0800 Subject: [PATCH 1/2] Enable aarch64 macOS builds --- .github/workflows/build.yaml | 23 +++++++++++++++++++++++ .github/workflows/release-branches.yml | 7 +++++++ .github/workflows/release-prs.yml | 7 +++++++ .github/workflows/release-tags.yml | 7 +++++++ 4 files changed, 44 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0f8023d..bab4dc9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,6 +5,29 @@ on: workflow_call: jobs: + build-artifacts-ARM64-macOS: + concurrency: build-ARM64-macOS + runs-on: macos-latest-xlarge + steps: + - uses: actions/checkout@v3 + + - uses: DeterminateSystems/flake-checker-action@main + + - uses: DeterminateSystems/nix-installer-action@main + + - uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Build package + run: "nix build .# -L --fallback" + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.2 + with: + # Artifact name + name: magic-nix-cache-ARM64-macOS + path: result/bin/magic-nix-cache + retention-days: 1 + build-artifacts-X64-macOS: concurrency: build-X64-macOS runs-on: macos-12 diff --git a/.github/workflows/release-branches.yml b/.github/workflows/release-branches.yml index 93557a6..bae2276 100644 --- a/.github/workflows/release-branches.yml +++ b/.github/workflows/release-branches.yml @@ -31,6 +31,13 @@ jobs: - name: Create the artifacts directory run: rm -rf ./artifacts && mkdir ./artifacts + - uses: actions/download-artifact@v3 + with: + name: magic-nix-cache-ARM64-macOS + path: cache-binary-ARM64-macOS + - name: Persist the cache binary + run: cp ./cache-binary-ARM64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-ARM64-macOS + - uses: actions/download-artifact@v3 with: name: magic-nix-cache-X64-macOS diff --git a/.github/workflows/release-prs.yml b/.github/workflows/release-prs.yml index 77ec832..6d899a4 100644 --- a/.github/workflows/release-prs.yml +++ b/.github/workflows/release-prs.yml @@ -35,6 +35,13 @@ jobs: - name: Create the artifacts directory run: rm -rf ./artifacts && mkdir ./artifacts + - uses: actions/download-artifact@v3 + with: + name: magic-nix-cache-ARM64-macOS + path: cache-binary-ARM64-macOS + - name: Persist the cache binary + run: cp ./cache-binary-ARM64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-ARM64-macOS + - uses: actions/download-artifact@v3 with: name: magic-nix-cache-X64-macOS diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index fedb949..881ef9b 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -24,6 +24,13 @@ jobs: - name: Create the artifacts directory run: rm -rf ./artifacts && mkdir ./artifacts + - uses: actions/download-artifact@v3 + with: + name: magic-nix-cache-ARM64-macOS + path: cache-binary-ARM64-macOS + - name: Persist the cache binary + run: cp ./cache-binary-ARM64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-ARM64-macOS + - uses: actions/download-artifact@v3 with: name: magic-nix-cache-X64-macOS From 969b5ea69ab2ecac48f3b5e2017a8726b7bbe97d Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Wed, 8 Nov 2023 12:10:36 -0800 Subject: [PATCH 2/2] Temporarily disable flake-checker and cache on aarch64 macs until this can land --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bab4dc9..b58e143 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,11 +11,11 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: DeterminateSystems/flake-checker-action@main + # - uses: DeterminateSystems/flake-checker-action@main - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + # - uses: DeterminateSystems/magic-nix-cache-action@main - name: Build package run: "nix build .# -L --fallback"