magic-nix-cache/.github/workflows/build.yaml
2024-01-09 13:52:32 +01:00

86 lines
2.5 KiB
YAML

name: Build artifacts
on:
workflow_dispatch:
workflow_call:
jobs:
build-artifacts-ARM64-macOS:
concurrency: build-ARM64-macOS
runs-on: macos-latest-xlarge
steps:
- uses: actions/checkout@v3
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.LOL_DETSYS_CI_SSH_PRIVATE_KEY }}
- 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:
concurrency: build-X64-macOS
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.LOL_DETSYS_CI_SSH_PRIVATE_KEY }}
- 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:
concurrency: build-X64-Linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.LOL_DETSYS_CI_SSH_PRIVATE_KEY }}
- 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-Linux
path: magic-nix-cache.closure.xz
retention-days: 1