From 60458abed0cac3eaa03627ae7db42e688ab5093b Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 15 Apr 2024 09:40:21 -0700 Subject: [PATCH] Move all CI to GitHub Actions (#923) * .buildkite: rm As awesome as Buildkite is, it is unfortunately not useful for this setup: * We use Buildkite to build installer binaries * We then use GitHub Actions to run the installer binaries on a host without Nix already installed We don't use Buildkite for both steps because setting up agents to install Nix on would be a pain, as erasing everything takes a while. This is preparation for using GitHub Actions for everything in our CI pipeline, as it is much faster and we don't need to worry about keeping the runners running ourselves (there have been times where our Buildkite agents were unreachable for some reason or another). * ci: build test Nix binaries in GHA * ci: use same runner version as build steps * ci: factor out build steps into composable workflows So that when I go to fix the releases action, it will be easier to reuse. * release-prs: fix and build twice :/ There are no GitHub Actions that make it easy to wait for another workflow to complete :/ * release-branches: fix * release-tags: fix * release-prs: do the label check everywhere * release-*: fixup cache key * release-*: re-enable * fixup: add i686-linux builds --- .buildkite/pipeline.yml | 51 -------- .github/workflows/build-aarch64-darwin.yml | 29 +++++ .github/workflows/build-aarch64-linux.yml | 29 +++++ .github/workflows/build-x86_64-darwin.yml | 29 +++++ .github/workflows/build-x86_64-linux.yml | 29 +++++ .github/workflows/ci.yml | 63 ++++------ .github/workflows/release-branches.yml | 77 +++++++++++- .github/workflows/release-prs.yml | 133 +++++++++++++++++++-- .github/workflows/release-tags.yml | 77 +++++++++++- 9 files changed, 408 insertions(+), 109 deletions(-) delete mode 100644 .buildkite/pipeline.yml create mode 100644 .github/workflows/build-aarch64-darwin.yml create mode 100644 .github/workflows/build-aarch64-linux.yml create mode 100644 .github/workflows/build-x86_64-darwin.yml create mode 100644 .github/workflows/build-x86_64-linux.yml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index db9c9cad9..000000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,51 +0,0 @@ -steps: - - label: nix-installer-x86_64-darwin - agents: - mac: 1 - system: x86_64-darwin - nix: 1 - command: - - nix --extra-experimental-features "nix-command flakes" build .#packages.x86_64-darwin.nix-installer -L - - cp result/bin/nix-installer ./nix-installer-x86_64-darwin - - buildkite-agent artifact upload nix-installer-x86_64-darwin - - label: nix-installer-aarch64-darwin - agents: - mac: 1 - system: aarch64-darwin - nix: 1 - command: - - nix --extra-experimental-features "nix-command flakes" build .#packages.aarch64-darwin.nix-installer -L - - cp result/bin/nix-installer ./nix-installer-aarch64-darwin - - buildkite-agent artifact upload nix-installer-aarch64-darwin - - label: nix-installer-x86_64-linux - agents: - system: x86_64-linux - nix: 1 - command: - - nix --extra-experimental-features "nix-command flakes" build .#packages.x86_64-linux.nix-installer-static -L - - cp result/bin/nix-installer ./nix-installer-x86_64-linux - - buildkite-agent artifact upload nix-installer-x86_64-linux - - label: nix-installer-x86_64-linux-variants - agents: - system: x86_64-linux - nix: 1 - command: - - nix --extra-experimental-features "nix-command flakes" develop --store ~/.ci-store --print-build-logs .# --command "cargo" build --no-default-features - - nix --extra-experimental-features "nix-command flakes" develop --store ~/.ci-store --print-build-logs .# --command "cargo" build --all-features - - nix --extra-experimental-features "nix-command flakes" build --store ~/.ci-store --print-build-logs .#packages.x86_64-linux.nix-installer - - label: nix-installer-i686-linux - agents: - system: x86_64-linux - nix: 1 - command: - - nix --extra-experimental-features "nix-command flakes" build .#packages.i686-linux.nix-installer-static -L - - cp result/bin/nix-installer ./nix-installer-i686-linux - - buildkite-agent artifact upload nix-installer-i686-linux - - label: nix-installer-aarch64-linux - agents: - system: aarch64-linux - nix: 1 - command: - - nix --extra-experimental-features "nix-command flakes" build .#packages.aarch64-linux.nix-installer-static -L - - cp result/bin/nix-installer ./nix-installer-aarch64-linux - - buildkite-agent artifact upload nix-installer-aarch64-linux diff --git a/.github/workflows/build-aarch64-darwin.yml b/.github/workflows/build-aarch64-darwin.yml new file mode 100644 index 000000000..bd223900f --- /dev/null +++ b/.github/workflows/build-aarch64-darwin.yml @@ -0,0 +1,29 @@ +name: Build aarch64 Darwin + +on: + workflow_call: + inputs: + cache-key: + type: string + required: false + default: aarch64-darwin-artifacts-${{ github.sha }} + +jobs: + build-aarch64-darwin: + name: Build aarch64 Darwin + runs-on: macos-latest-xlarge + concurrency: ${{ inputs.cache-key }} + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build the installer + run: | + nix build .#packages.aarch64-darwin.nix-installer -L + cp result/bin/nix-installer . + - name: Create GitHub cache from build artifacts + uses: actions/cache/save@v3 + with: + path: nix-installer + key: ${{ inputs.cache-key }} diff --git a/.github/workflows/build-aarch64-linux.yml b/.github/workflows/build-aarch64-linux.yml new file mode 100644 index 000000000..f75f41803 --- /dev/null +++ b/.github/workflows/build-aarch64-linux.yml @@ -0,0 +1,29 @@ +name: Build aarch64 Linux (static) + +on: + workflow_call: + inputs: + cache-key: + type: string + required: false + default: aarch64-linux-artifacts-${{ github.sha }} + +jobs: + build-aarch64-linux: + name: Build aarch64 Linux (static) + runs-on: namespace-profile-default-arm64 + concurrency: ${{ inputs.cache-key }} + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build the installer + run: | + nix build .#packages.aarch64-linux.nix-installer-static -L + cp result/bin/nix-installer . + - name: Create GitHub cache from build artifacts + uses: actions/cache/save@v3 + with: + path: nix-installer + key: ${{ inputs.cache-key }} diff --git a/.github/workflows/build-x86_64-darwin.yml b/.github/workflows/build-x86_64-darwin.yml new file mode 100644 index 000000000..253900f54 --- /dev/null +++ b/.github/workflows/build-x86_64-darwin.yml @@ -0,0 +1,29 @@ +name: Build x86_64 Darwin + +on: + workflow_call: + inputs: + cache-key: + type: string + required: false + default: x86_64-darwin-artifacts-${{ github.sha }} + +jobs: + build-x86_64-darwin: + name: Build x86_64 Darwin + runs-on: macos-latest-large + concurrency: ${{ inputs.cache-key }} + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build the installer + run: | + nix build .#packages.x86_64-darwin.nix-installer -L + cp result/bin/nix-installer . + - name: Create GitHub cache from build artifacts + uses: actions/cache/save@v3 + with: + path: nix-installer + key: ${{ inputs.cache-key }} diff --git a/.github/workflows/build-x86_64-linux.yml b/.github/workflows/build-x86_64-linux.yml new file mode 100644 index 000000000..24a5dbcaa --- /dev/null +++ b/.github/workflows/build-x86_64-linux.yml @@ -0,0 +1,29 @@ +name: Build x86_64 Linux (static) + +on: + workflow_call: + inputs: + cache-key: + type: string + required: false + default: x86_64-linux-artifacts-${{ github.sha }} + +jobs: + build-x86_64-linux: + name: Build x86_64 Linux (static) + runs-on: UbuntuLatest32Cores128G + concurrency: ${{ inputs.cache-key }} + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build the installer + run: | + nix build .#packages.x86_64-linux.nix-installer-static -L + cp result/bin/nix-installer . + - name: Create GitHub cache from build artifacts + uses: actions/cache/save@v3 + with: + path: nix-installer + key: ${{ inputs.cache-key }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 683e4e1e6..fa5d851ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,15 @@ on: branches: [main] jobs: + build-x86_64-linux: + uses: ./.github/workflows/build-x86_64-linux.yml + + build-x86_64-darwin: + uses: ./.github/workflows/build-x86_64-darwin.yml + lints: name: Lints - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Check Nixpkgs input @@ -29,42 +35,25 @@ jobs: run: nix develop --command check-nixpkgs-fmt - name: Check EditorConfig conformance run: nix develop --command check-editorconfig - - name: Download Buildkite Artifacts - uses: EnricoMi/download-buildkite-artifact-action@v1.14 - with: - buildkite_token: ${{ secrets.BUILDKITE_TOKEN }} - output_path: artifacts - - name: Output list of Buildkite artifacts - run: | - ls -lah artifacts/ - ls -lah artifacts/**/* - # Mac's can't run this action, so we're forced to do this. - - name: Create Github cache from Buildkite artifacts - id: cache-buildkite-artifacts - uses: actions/cache/save@v3 - with: - path: artifacts - key: buildkite-artifacts-${{ github.sha }} run-x86_64-linux: name: Run x86_64 Linux - runs-on: ubuntu-22.04 - needs: [lints] + runs-on: ubuntu-latest + needs: [lints, build-x86_64-linux] steps: - uses: actions/checkout@v3 - name: Restore Github cache of Buildkite artifacts - id: cache-buildkite-artifacts uses: actions/cache/restore@v3 with: - path: artifacts - key: buildkite-artifacts-${{ github.sha }} - - run: sudo apt install fish zsh + path: nix-installer + key: x86_64-linux-artifacts-${{ github.sha }} - name: Move & set executable run: | mkdir install-root cp nix-installer.sh install-root/nix-installer.sh - mv ./artifacts/nix-installer-x86_64-linux-*/* install-root/nix-installer-x86_64-linux + mv ./nix-installer install-root/nix-installer-x86_64-linux chmod +x install-root/nix-installer-x86_64-linux install-root/nix-installer.sh + - run: sudo apt install fish zsh - name: Initial install uses: DeterminateSystems/nix-installer-action@main with: @@ -152,23 +141,22 @@ jobs: run-x86_64-linux-no-init: name: Run x86_64 Linux (No init) - runs-on: ubuntu-22.04 - needs: [lints] + runs-on: ubuntu-latest + needs: [lints, build-x86_64-linux] steps: - uses: actions/checkout@v3 - name: Restore Github cache of Buildkite artifacts - id: cache-buildkite-artifacts uses: actions/cache/restore@v3 with: - path: artifacts - key: buildkite-artifacts-${{ github.sha }} - - run: sudo apt install fish zsh + path: nix-installer + key: x86_64-linux-artifacts-${{ github.sha }} - name: Move & set executable run: | mkdir install-root cp nix-installer.sh install-root/nix-installer.sh - mv ./artifacts/nix-installer-x86_64-linux-*/* install-root/nix-installer-x86_64-linux + mv ./nix-installer install-root/nix-installer-x86_64-linux chmod +x install-root/nix-installer-x86_64-linux install-root/nix-installer.sh + - run: sudo apt install fish zsh - name: Initial install uses: DeterminateSystems/nix-installer-action@main with: @@ -262,23 +250,22 @@ jobs: run-x86_64-darwin: name: Run x86_64 Darwin - runs-on: macos-12 - needs: [lints] + runs-on: macos-latest + needs: [lints, build-x86_64-darwin] steps: - uses: actions/checkout@v3 - name: Restore Github cache of Buildkite artifacts - id: cache-buildkite-artifacts uses: actions/cache/restore@v3 with: - path: artifacts - key: buildkite-artifacts-${{ github.sha }} - - run: brew install fish coreutils + path: nix-installer + key: x86_64-darwin-artifacts-${{ github.sha }} - name: Move & set executable run: | mkdir install-root cp nix-installer.sh install-root/nix-installer.sh - mv ./artifacts/nix-installer-x86_64-darwin-*/* install-root/nix-installer-x86_64-darwin + mv ./nix-installer install-root/nix-installer-x86_64-darwin chmod +x install-root/nix-installer-x86_64-darwin install-root/nix-installer.sh + - run: brew install fish coreutils - name: Initial install uses: DeterminateSystems/nix-installer-action@main with: diff --git a/.github/workflows/release-branches.yml b/.github/workflows/release-branches.yml index 34771ea4c..312369a1b 100644 --- a/.github/workflows/release-branches.yml +++ b/.github/workflows/release-branches.yml @@ -1,5 +1,8 @@ name: Release Branch +concurrency: + group: release + on: push: branches: @@ -8,19 +11,83 @@ on: - 'main' jobs: + build-x86_64-linux: + uses: ./.github/workflows/build-x86_64-linux.yml + with: + cache-key: release-x86_64-linux-artifacts-${{ github.sha }} + build-i686-linux: + uses: ./.github/workflows/build-i686-linux.yml + with: + cache-key: release-i686-linux-artifacts-${{ github.sha }} + build-aarch64-linux: + uses: ./.github/workflows/build-aarch64-linux.yml + with: + cache-key: release-aarch64-linux-artifacts-${{ github.sha }} + build-x86_64-darwin: + uses: ./.github/workflows/build-x86_64-darwin.yml + with: + cache-key: release-x86_64-darwin-artifacts-${{ github.sha }} + build-aarch64-darwin: + uses: ./.github/workflows/build-aarch64-darwin.yml + with: + cache-key: release-aarch64-darwin-artifacts-${{ github.sha }} + release: - concurrency: release runs-on: ubuntu-latest permissions: id-token: write # In order to request a JWT for AWS auth + needs: + - build-x86_64-linux + - build-i686-linux + - build-aarch64-linux + - build-x86_64-darwin + - build-aarch64-darwin steps: - name: Checkout uses: actions/checkout@v3 - - name: Download Buildkite Artifacts - uses: EnricoMi/download-buildkite-artifact-action@v1.14 + - name: Create artifacts directory + run: mkdir -p ./artifacts + + - name: Fetch cached x86_64-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-x86_64-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-x86_64-linux + + - name: Fetch cached i686-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-i686-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-i686-linux + + - name: Fetch cached aarch64-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-aarch64-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-aarch64-linux + + - name: Fetch cached x86_64-darwin binary + uses: actions/cache/restore@v3 with: - buildkite_token: ${{ secrets.BUILDKITE_TOKEN }} - output_path: artifacts + path: nix-installer + key: release-x86_64-darwin-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-x86_64-darwin + + - name: Fetch cached aarch64-darwin binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-aarch64-darwin-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-aarch64-darwin + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 with: diff --git a/.github/workflows/release-prs.yml b/.github/workflows/release-prs.yml index e7e34b8a3..11e0f6c54 100644 --- a/.github/workflows/release-prs.yml +++ b/.github/workflows/release-prs.yml @@ -1,5 +1,8 @@ name: Release PR +concurrency: + group: release + on: pull_request: types: @@ -9,27 +12,137 @@ on: - labeled jobs: + build-x86_64-linux: + # Only intra-repo PRs are allowed to have PR artifacts uploaded + # We only want to trigger once the upload once in the case the upload label is added, not when any label is added + if: | + always() && !failure() && !cancelled() + && github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) + uses: ./.github/workflows/build-x86_64-linux.yml + with: + cache-key: release-x86_64-linux-artifacts-${{ github.sha }} + build-i686-linux: + # Only intra-repo PRs are allowed to have PR artifacts uploaded + # We only want to trigger once the upload once in the case the upload label is added, not when any label is added + if: | + always() && !failure() && !cancelled() + && github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) + uses: ./.github/workflows/build-i686-linux.yml + with: + cache-key: release-i686-linux-artifacts-${{ github.sha }} + build-aarch64-linux: + # Only intra-repo PRs are allowed to have PR artifacts uploaded + # We only want to trigger once the upload once in the case the upload label is added, not when any label is added + if: | + always() && !failure() && !cancelled() + && github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) + uses: ./.github/workflows/build-aarch64-linux.yml + with: + cache-key: release-aarch64-linux-artifacts-${{ github.sha }} + build-x86_64-darwin: + # Only intra-repo PRs are allowed to have PR artifacts uploaded + # We only want to trigger once the upload once in the case the upload label is added, not when any label is added + if: | + always() && !failure() && !cancelled() + && github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) + uses: ./.github/workflows/build-x86_64-darwin.yml + with: + cache-key: release-x86_64-darwin-artifacts-${{ github.sha }} + build-aarch64-darwin: + # Only intra-repo PRs are allowed to have PR artifacts uploaded + # We only want to trigger once the upload once in the case the upload label is added, not when any label is added + if: | + always() && !failure() && !cancelled() + && github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) + uses: ./.github/workflows/build-aarch64-darwin.yml + with: + cache-key: release-aarch64-darwin-artifacts-${{ github.sha }} + release: - concurrency: release # Only intra-repo PRs are allowed to have PR artifacts uploaded # We only want to trigger once the upload once in the case the upload label is added, not when any label is added if: | - github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' - && ( - (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') - || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) - ) + always() && !failure() && !cancelled() + && github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-installer' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) runs-on: ubuntu-latest permissions: id-token: write # In order to request a JWT for AWS auth + needs: + - build-x86_64-linux + - build-i686-linux + - build-aarch64-linux + - build-x86_64-darwin + - build-aarch64-darwin steps: - name: Checkout uses: actions/checkout@v3 - - name: Download Buildkite Artifacts - uses: EnricoMi/download-buildkite-artifact-action@v1.14 + - name: Create artifacts directory + run: mkdir -p ./artifacts + + - name: Fetch cached x86_64-linux binary + uses: actions/cache/restore@v3 with: - buildkite_token: ${{ secrets.BUILDKITE_TOKEN }} - output_path: artifacts + path: nix-installer + key: release-x86_64-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-x86_64-linux + + - name: Fetch cached i686-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-i686-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-i686-linux + + - name: Fetch cached aarch64-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-aarch64-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-aarch64-linux + + - name: Fetch cached x86_64-darwin binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-x86_64-darwin-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-x86_64-darwin + + - name: Fetch cached aarch64-darwin binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-aarch64-darwin-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-aarch64-darwin + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 with: diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index b89f1b8f1..6547e2b92 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -1,25 +1,92 @@ name: Release Tags +concurrency: + group: release + on: push: tags: - "v*.*.*" jobs: + build-x86_64-linux: + uses: ./.github/workflows/build-x86_64-linux.yml + with: + cache-key: release-x86_64-linux-artifacts-${{ github.sha }} + build-i686-linux: + uses: ./.github/workflows/build-i686-linux.yml + with: + cache-key: release-i686-linux-artifacts-${{ github.sha }} + build-aarch64-linux: + uses: ./.github/workflows/build-aarch64-linux.yml + with: + cache-key: release-aarch64-linux-artifacts-${{ github.sha }} + build-x86_64-darwin: + uses: ./.github/workflows/build-x86_64-darwin.yml + with: + cache-key: release-x86_64-darwin-artifacts-${{ github.sha }} + build-aarch64-darwin: + uses: ./.github/workflows/build-aarch64-darwin.yml + with: + cache-key: release-aarch64-darwin-artifacts-${{ github.sha }} + release: - concurrency: release runs-on: ubuntu-latest permissions: contents: write # In order to upload artifacts to GitHub releases id-token: write # In order to request a JWT for AWS auth + needs: + - build-x86_64-linux + - build-i686-linux + - build-aarch64-linux + - build-x86_64-darwin + - build-aarch64-darwin steps: - name: Checkout uses: actions/checkout@v3 - - name: Download Buildkite Artifacts - uses: EnricoMi/download-buildkite-artifact-action@v1.14 + - name: Create artifacts directory + run: mkdir -p ./artifacts + + - name: Fetch cached x86_64-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-x86_64-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-x86_64-linux + + - name: Fetch cached i686-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-i686-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-i686-linux + + - name: Fetch cached aarch64-linux binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-aarch64-linux-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-aarch64-linux + + - name: Fetch cached x86_64-darwin binary + uses: actions/cache/restore@v3 with: - buildkite_token: ${{ secrets.BUILDKITE_TOKEN }} - output_path: artifacts + path: nix-installer + key: release-x86_64-darwin-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-x86_64-darwin + + - name: Fetch cached aarch64-darwin binary + uses: actions/cache/restore@v3 + with: + path: nix-installer + key: release-aarch64-darwin-artifacts-${{ github.sha }} + - name: Move artifact to artifacts directory + run: mv ./nix-installer ./artifacts/nix-installer-aarch64-darwin + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 with: