From 017f0cb1669a2c80e1e605e3ffd522d413f12396 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 26 Jun 2023 12:00:38 -0400 Subject: [PATCH 1/4] Fixup typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78351b8..8c624fa 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Save 30-50%+ of CI time without any effort or cost. Use Magic Nix Cache, a totally free and zero-configuration binary cache for Nix on GitHub Actions. -Magix Nix Cache uses the GitHub Actions [built-in cache][ghacache] to share builds between Workflow runs, and has many advantages over alternatives. +Magic Nix Cache uses the GitHub Actions [built-in cache][ghacache] to share builds between Workflow runs, and has many advantages over alternatives. 1. Totally free: backed by GitHub Actions' cache, there is no additional service to pay for. 1. Zero configuration: add our action to your workflow. That's it. @@ -72,7 +72,7 @@ Here is a table of the [telemetry data we collect][telemetry]: | `nars_uploaded` | Number of nars uploaded during this run. | | `num_original_paths` | Number of store paths that existed on startup. | | `num_final_paths` | Number of store paths that existed on shutdown. | -| `num_new_paths` | The diference between `num_original_paths` and `num_final_paths`. | +| `num_new_paths` | The difference between `num_original_paths` and `num_final_paths`. | To disable diagnostic reporting, set the diagnostics URL to an empty string by passing `--diagnostic-endpoint=""`. From 6a38e90e3c2e642bb664fc4ec96fabafa5b2434b Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 26 Jun 2023 12:02:56 -0400 Subject: [PATCH 2/4] Restore macOS support, and add our magic cache action to this repo --- .github/workflows/build.yaml | 34 ++++++++++++++------------ .github/workflows/checks.yaml | 4 ++- .github/workflows/release-branches.yml | 12 ++++----- .github/workflows/release-prs.yml | 12 ++++----- .github/workflows/release-tags.yml | 12 ++++----- 5 files changed, 40 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5cc7156..63ee18d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,25 +5,27 @@ on: workflow_call: jobs: - # build-artifacts-X64-macOS: - # runs-on: macos-12 - # steps: - # - uses: actions/checkout@v3 + build-artifacts-X64-macOS: + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 - # - uses: DeterminateSystems/flake-checker-action@v4 + - uses: DeterminateSystems/flake-checker-action@v4 - # - uses: DeterminateSystems/nix-installer-action@v4 + - uses: DeterminateSystems/nix-installer-action@v4 - # - name: Build package - # run: "nix build .# -L" + - uses: DeterminateSystems/magic-nix-cache@main - # - name: Upload a Build Artifact - # uses: actions/upload-artifact@v3.1.2 - # with: - # # Artifact name - # name: magic-nix-cache-X64-macOS - # path: result/bin/magic-nix-cache - # retention-days: 1 + - name: Build package + run: "nix build .# -L" + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.2 + with: + # Artifact name + name: magic-nix-cache-X64-macOS + path: result/bin/magic-nix-cache + retention-days: 1 build-artifacts-X64-Linux: runs-on: ubuntu-22.04 @@ -34,6 +36,8 @@ jobs: - uses: DeterminateSystems/nix-installer-action@v4 + - uses: DeterminateSystems/magic-nix-cache@main + - name: Build package run: "nix build .# -L" diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 7dc7fea..0d66f73 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -19,8 +19,10 @@ jobs: with: fail-mode: true + - uses: DeterminateSystems/magic-nix-cache@main + - name: Check Rust formatting run: nix develop --command cargo fmt --check - + - name: Clippy run: nix develop --command cargo clippy diff --git a/.github/workflows/release-branches.yml b/.github/workflows/release-branches.yml index 3e9041a..93557a6 100644 --- a/.github/workflows/release-branches.yml +++ b/.github/workflows/release-branches.yml @@ -31,12 +31,12 @@ jobs: - name: Create the artifacts directory run: rm -rf ./artifacts && mkdir ./artifacts - # - uses: actions/download-artifact@v3 - # with: - # name: magic-nix-cache-X64-macOS - # path: cache-binary-X64-macOS - # - name: Persist the cache binary - # run: cp ./cache-binary-X64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-X64-macOS + - uses: actions/download-artifact@v3 + with: + name: magic-nix-cache-X64-macOS + path: cache-binary-X64-macOS + - name: Persist the cache binary + run: cp ./cache-binary-X64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-X64-macOS - uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/release-prs.yml b/.github/workflows/release-prs.yml index d092dea..77ec832 100644 --- a/.github/workflows/release-prs.yml +++ b/.github/workflows/release-prs.yml @@ -35,12 +35,12 @@ jobs: - name: Create the artifacts directory run: rm -rf ./artifacts && mkdir ./artifacts - # - uses: actions/download-artifact@v3 - # with: - # name: magic-nix-cache-X64-macOS - # path: cache-binary-X64-macOS - # - name: Persist the cache binary - # run: cp ./cache-binary-X64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-X64-macOS + - uses: actions/download-artifact@v3 + with: + name: magic-nix-cache-X64-macOS + path: cache-binary-X64-macOS + - name: Persist the cache binary + run: cp ./cache-binary-X64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-X64-macOS - uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 55f3f2d..3852ae4 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -24,12 +24,12 @@ jobs: - name: Create the artifacts directory run: rm -rf ./artifacts && mkdir ./artifacts - # - uses: actions/download-artifact@v3 - # with: - # name: magic-nix-cache-X64-macOS - # path: cache-binary-X64-macOS - # - name: Persist the cache binary - # run: cp ./cache-binary-X64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-X64-macOS + - uses: actions/download-artifact@v3 + with: + name: magic-nix-cache-X64-macOS + path: cache-binary-X64-macOS + - name: Persist the cache binary + run: cp ./cache-binary-X64-macOS/magic-nix-cache ./artifacts/magic-nix-cache-X64-macOS - uses: actions/download-artifact@v3 with: From e4834f14f0aa3363e18d5ef05ea0dd326bb4b6d5 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 26 Jun 2023 12:16:23 -0400 Subject: [PATCH 3/4] Rename the action, d'oh. --- .github/workflows/build.yaml | 4 ++-- .github/workflows/checks.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 63ee18d..8d39c48 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: - uses: DeterminateSystems/nix-installer-action@v4 - - uses: DeterminateSystems/magic-nix-cache@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Build package run: "nix build .# -L" @@ -36,7 +36,7 @@ jobs: - uses: DeterminateSystems/nix-installer-action@v4 - - uses: DeterminateSystems/magic-nix-cache@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Build package run: "nix build .# -L" diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 0d66f73..b8e2a30 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -19,7 +19,7 @@ jobs: with: fail-mode: true - - uses: DeterminateSystems/magic-nix-cache@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Check Rust formatting run: nix develop --command cargo fmt --check From 3cff8e1a6fa1bb8e845b432e7cff001852d48647 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 26 Jun 2023 12:18:46 -0400 Subject: [PATCH 4/4] Don't use macOS yet --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8d39c48..d986e56 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: - uses: DeterminateSystems/nix-installer-action@v4 - - uses: DeterminateSystems/magic-nix-cache-action@main + # - uses: DeterminateSystems/magic-nix-cache-action@main - name: Build package run: "nix build .# -L"