wip: thin CI so it runs faster
This commit is contained in:
parent
589099e43a
commit
b983b25405
75
.github/workflows/build.yaml
vendored
75
.github/workflows/build.yaml
vendored
|
@ -5,56 +5,8 @@ on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-artifacts-ARM64-macOS:
|
|
||||||
runs-on: macos-latest-xlarge
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
|
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Build package
|
|
||||||
run: "nix build .# -L --fallback && nix-store --export $(nix-store -qR ./result) | xz -9 > magic-nix-cache.closure.xz"
|
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v3.1.2
|
|
||||||
with:
|
|
||||||
# Artifact name
|
|
||||||
name: magic-nix-cache-ARM64-macOS
|
|
||||||
path: magic-nix-cache.closure.xz
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
build-artifacts-X64-macOS:
|
|
||||||
runs-on: macos-12
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
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 && nix-store --export $(nix-store -qR ./result) | xz -9 > magic-nix-cache.closure.xz"
|
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v3.1.2
|
|
||||||
with:
|
|
||||||
# Artifact name
|
|
||||||
name: magic-nix-cache-X64-macOS
|
|
||||||
path: magic-nix-cache.closure.xz
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
build-artifacts-X64-Linux:
|
build-artifacts-X64-Linux:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: UbuntuLatest32Cores128G
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
|
@ -77,28 +29,3 @@ jobs:
|
||||||
name: magic-nix-cache-X64-Linux
|
name: magic-nix-cache-X64-Linux
|
||||||
path: magic-nix-cache.closure.xz
|
path: magic-nix-cache.closure.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
build-artifacts-ARM64-Linux:
|
|
||||||
runs-on: namespace-profile-default-arm64
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
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 && nix-store --export $(nix-store -qR ./result) | xz -9 > magic-nix-cache.closure.xz"
|
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v3.1.2
|
|
||||||
with:
|
|
||||||
# Artifact name
|
|
||||||
name: magic-nix-cache-ARM64-Linux
|
|
||||||
path: magic-nix-cache.closure.xz
|
|
||||||
retention-days: 1
|
|
||||||
|
|
4
.github/workflows/checks.yaml
vendored
4
.github/workflows/checks.yaml
vendored
|
@ -28,7 +28,3 @@ jobs:
|
||||||
|
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: nix develop --command cargo clippy
|
run: nix develop --command cargo clippy
|
||||||
|
|
||||||
build:
|
|
||||||
uses: ./.github/workflows/build.yaml
|
|
||||||
secrets: inherit
|
|
||||||
|
|
32
.github/workflows/flakehub-cache.yml
vendored
32
.github/workflows/flakehub-cache.yml
vendored
|
@ -1,32 +0,0 @@
|
||||||
name: Push dev shell to FlakeHub Cache
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
push-dev-shell-to-flakehub-cache:
|
|
||||||
env:
|
|
||||||
ACTIONS_STEP_DEBUG: true
|
|
||||||
runs-on: ${{ matrix.systems.runner }}
|
|
||||||
permissions:
|
|
||||||
id-token: "write"
|
|
||||||
contents: "read"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
systems:
|
|
||||||
- nix-system: "aarch64-darwin"
|
|
||||||
runner: "macos-latest-xlarge"
|
|
||||||
- nix-system: "x86_64-darwin"
|
|
||||||
runner: "macos-12"
|
|
||||||
- nix-system: "x86_64-linux"
|
|
||||||
runner: "ubuntu-22.04"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
with:
|
|
||||||
use-flakehub: true
|
|
||||||
- name: Build dev shell for ${{ matrix.systems.nix-system }} on ${{ matrix.systems.runner }}
|
|
||||||
run: |
|
|
||||||
nix build .#devShells.${{ matrix.systems.nix-system }}.default
|
|
67
.github/workflows/release-branches.yml
vendored
67
.github/workflows/release-branches.yml
vendored
|
@ -1,67 +0,0 @@
|
||||||
name: Release Branch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
# NOTE: make sure any branches here are also valid directory names,
|
|
||||||
# otherwise creating the directory and uploading to s3 will fail
|
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
uses: ./.github/workflows/build.yaml
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
concurrency: release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write # In order to request a JWT for AWS auth
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v2
|
|
||||||
with:
|
|
||||||
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
|
|
||||||
aws-region: us-east-2
|
|
||||||
|
|
||||||
- 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.closure.xz ./artifacts/magic-nix-cache-ARM64-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.closure.xz ./artifacts/magic-nix-cache-X64-macOS
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: magic-nix-cache-X64-Linux
|
|
||||||
path: cache-binary-X64-Linux
|
|
||||||
- name: Persist the cache binary
|
|
||||||
run: cp ./cache-binary-X64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-X64-Linux
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: magic-nix-cache-ARM64-Linux
|
|
||||||
path: cache-binary-ARM64-Linux
|
|
||||||
- name: Persist the cache binary
|
|
||||||
run: cp ./cache-binary-ARM64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-ARM64-Linux
|
|
||||||
|
|
||||||
- name: Publish Release (Branch)
|
|
||||||
env:
|
|
||||||
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
|
|
||||||
run: |
|
|
||||||
.github/workflows/upload_s3.sh branch "${{ github.ref_name }}" "$GITHUB_SHA"
|
|
21
.github/workflows/release-prs.yml
vendored
21
.github/workflows/release-prs.yml
vendored
|
@ -36,20 +36,6 @@ jobs:
|
||||||
- name: Create the artifacts directory
|
- name: Create the artifacts directory
|
||||||
run: rm -rf ./artifacts && mkdir ./artifacts
|
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.closure.xz ./artifacts/magic-nix-cache-ARM64-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.closure.xz ./artifacts/magic-nix-cache-X64-macOS
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: magic-nix-cache-X64-Linux
|
name: magic-nix-cache-X64-Linux
|
||||||
|
@ -57,13 +43,6 @@ jobs:
|
||||||
- name: Persist the cache binary
|
- name: Persist the cache binary
|
||||||
run: cp ./cache-binary-X64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-X64-Linux
|
run: cp ./cache-binary-X64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-X64-Linux
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: magic-nix-cache-ARM64-Linux
|
|
||||||
path: cache-binary-ARM64-Linux
|
|
||||||
- name: Persist the cache binary
|
|
||||||
run: cp ./cache-binary-ARM64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-ARM64-Linux
|
|
||||||
|
|
||||||
- name: Configure AWS Credentials
|
- name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@v2
|
uses: aws-actions/configure-aws-credentials@v2
|
||||||
with:
|
with:
|
||||||
|
|
71
.github/workflows/release-tags.yml
vendored
71
.github/workflows/release-tags.yml
vendored
|
@ -1,71 +0,0 @@
|
||||||
name: Release Tags
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*.*.*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
uses: ./.github/workflows/build.yaml
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
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
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- 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.closure.xz ./artifacts/magic-nix-cache-ARM64-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.closure.xz ./artifacts/magic-nix-cache-X64-macOS
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: magic-nix-cache-X64-Linux
|
|
||||||
path: cache-binary-X64-Linux
|
|
||||||
- name: Persist the cache binary
|
|
||||||
run: cp ./cache-binary-X64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-X64-Linux
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: magic-nix-cache-ARM64-Linux
|
|
||||||
path: cache-binary-ARM64-Linux
|
|
||||||
- name: Persist the cache binary
|
|
||||||
run: cp ./cache-binary-ARM64-Linux/magic-nix-cache.closure.xz ./artifacts/magic-nix-cache-ARM64-Linux
|
|
||||||
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v2
|
|
||||||
with:
|
|
||||||
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
|
|
||||||
aws-region: us-east-2
|
|
||||||
- name: Publish Release to S3 (Tag)
|
|
||||||
env:
|
|
||||||
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
|
|
||||||
run: |
|
|
||||||
.github/workflows/upload_s3.sh "tag" "$GITHUB_REF_NAME" "$GITHUB_SHA"
|
|
||||||
- name: Publish Release to GitHub (Tag)
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
fail_on_unmatched_files: true
|
|
||||||
draft: true
|
|
||||||
files: |
|
|
||||||
artifacts/**
|
|
Loading…
Reference in a new issue