From 3597849148a665033dee70bd8c46babc40e28fd1 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 22 May 2023 15:45:55 -0400 Subject: [PATCH] Add an architecture prefix to the OS Co-authored-by: Cole Helbling --- .github/workflows/build.yaml | 14 ++++++++++---- .github/workflows/release-branches.yml | 12 ++++++------ .github/workflows/release-prs.yml | 12 ++++++------ .github/workflows/release-tags.yml | 12 ++++++------ .github/workflows/upload_s3.sh | 8 ++++---- 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9d6581f..9ed6044 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,13 +5,16 @@ on: workflow_call: jobs: - build-artifacts-macOS: + build-artifacts-X64-macOS: runs-on: macos-12 steps: - uses: actions/checkout@v3 - uses: DeterminateSystems/nix-installer-action-cache@main + - name: Print the arch-os + run: "echo $RUNNER_ARCH-$RUNNER_OS" + - name: Build package run: "nix build .# -L" @@ -19,17 +22,20 @@ jobs: uses: actions/upload-artifact@v3.1.2 with: # Artifact name - name: nix-actions-cache-macOS + name: nix-actions-cache-X64-macOS path: result/bin/nix-actions-cache retention-days: 1 - build-artifacts-Linux: + build-artifacts-X64-Linux: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - uses: DeterminateSystems/nix-installer-action-cache@main + - name: Print the arch-os + run: "echo $RUNNER_ARCH-$RUNNER_OS" + - name: Build package run: "nix build .# -L" @@ -37,6 +43,6 @@ jobs: uses: actions/upload-artifact@v3.1.2 with: # Artifact name - name: nix-actions-cache-Linux + name: nix-actions-cache-X64-Linux path: result/bin/nix-actions-cache retention-days: 1 diff --git a/.github/workflows/release-branches.yml b/.github/workflows/release-branches.yml index 7ccb9af..b205ac2 100644 --- a/.github/workflows/release-branches.yml +++ b/.github/workflows/release-branches.yml @@ -35,17 +35,17 @@ jobs: - uses: actions/download-artifact@v3 with: - name: nix-actions-cache-macOS - path: cache-binary-macOS + name: nix-actions-cache-X64-macOS + path: cache-binary-X64-macOS - name: Persist the cache binary - run: cp ./cache-binary-macOS/nix-actions-cache ./artifacts/nix-actions-cache-macOS + run: cp ./cache-binary-macOS/nix-actions-cache ./artifacts/nix-actions-cache-X64-macOS - uses: actions/download-artifact@v3 with: - name: nix-actions-cache-Linux - path: cache-binary-Linux + name: nix-actions-cache-X64-Linux + path: cache-binary-X64-Linux - name: Persist the cache binary - run: cp ./cache-binary-Linux/nix-actions-cache ./artifacts/nix-actions-cache-Linux + run: cp ./cache-binary-Linux/nix-actions-cache ./artifacts/nix-actions-cache-X64-Linux - name: Publish Release (Branch) env: diff --git a/.github/workflows/release-prs.yml b/.github/workflows/release-prs.yml index 0b8921d..7b50ffa 100644 --- a/.github/workflows/release-prs.yml +++ b/.github/workflows/release-prs.yml @@ -39,17 +39,17 @@ jobs: - uses: actions/download-artifact@v3 with: - name: nix-actions-cache-macOS - path: cache-binary-macOS + name: nix-actions-cache-X64-macOS + path: cache-binary-X64-macOS - name: Persist the cache binary - run: cp ./cache-binary-macOS/nix-actions-cache ./artifacts/nix-actions-cache-macOS + run: cp ./cache-binary-X64-macOS/nix-actions-cache ./artifacts/nix-actions-cache-X64-macOS - uses: actions/download-artifact@v3 with: - name: nix-actions-cache-Linux - path: cache-binary-Linux + name: nix-actions-cache-X64-Linux + path: cache-binary-X64-Linux - name: Persist the cache binary - run: cp ./cache-binary-Linux/nix-actions-cache ./artifacts/nix-actions-cache-Linux + run: cp ./cache-binary-X64-Linux/nix-actions-cache ./artifacts/nix-actions-cache-X64-Linux - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 1afb1c9..a9dbd24 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -26,17 +26,17 @@ jobs: - uses: actions/download-artifact@v3 with: - name: nix-actions-cache-macOS - path: cache-binary-macOS + name: nix-actions-cache-X64-macOS + path: cache-binary-X64-macOS - name: Persist the cache binary - run: cp ./cache-binary-macOS/nix-actions-cache ./artifacts/nix-actions-cache-macOS + run: cp ./cache-binary-X64-macOS/nix-actions-cache ./artifacts/nix-actions-cache-X64-macOS - uses: actions/download-artifact@v3 with: - name: nix-actions-cache-Linux - path: cache-binary-Linux + name: nix-actions-cache-X64-Linux + path: cache-binary-X64-Linux - name: Persist the cache binary - run: cp ./cache-binary-Linux/nix-actions-cache ./artifacts/nix-actions-cache-Linux + run: cp ./cache-binary-X64-Linux/nix-actions-cache ./artifacts/nix-actions-cache-X64-Linux - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 diff --git a/.github/workflows/upload_s3.sh b/.github/workflows/upload_s3.sh index 14e4aed..6d2bbdd 100755 --- a/.github/workflows/upload_s3.sh +++ b/.github/workflows/upload_s3.sh @@ -73,13 +73,13 @@ This commit's nix-actions-cache binaries can be fetched from: Intel macOS: \`\`\` -curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/macOS/rev/$GIT_ISH +curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/rev/$GIT_ISH/X64-macOS \`\`\` x86_64 Linux: \`\`\` -curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/Linux/rev/$GIT_ISH +curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/rev/$GIT_ISH/X64-Linux \`\`\` Or generally from this ${TYPE}: @@ -87,12 +87,12 @@ Or generally from this ${TYPE}: Intel macOS: \`\`\` -curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/macOS/${TYPE}/${DEST} +curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/${TYPE}/${DEST}/X64-macOS \`\`\` x86_64 Linux: \`\`\` -curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/Linux/${TYPE}/${DEST} +curl --output nix-actions-cache --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix-actions-cache/${TYPE}/${DEST}/X64-Linux \`\`\` EOF