mirror of
https://github.com/DeterminateSystems/flake-checker.git
synced 2024-09-11 14:25:44 +03:00
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
name: Build flake-checker artifacts
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-artifacts:
|
|
runs-on: ${{ matrix.systems.runner }}
|
|
permissions:
|
|
id-token: "write"
|
|
contents: "read"
|
|
env:
|
|
ARTIFACT_KEY: flake-checker-${{ matrix.systems.system }}
|
|
strategy:
|
|
matrix:
|
|
systems:
|
|
- nix-system: aarch64-darwin
|
|
runner: macos-latest-xlarge
|
|
system: ARM64-macOS
|
|
- nix-system: x86_64-darwin
|
|
runner: macos-12
|
|
system: X64-macOS
|
|
- nix-system: aarch64-linux
|
|
runner: namespace-profile-default-arm64
|
|
system: ARM64-Linux
|
|
- nix-system: x86_64-linux
|
|
runner: ubuntu-22.04
|
|
system: X64-Linux
|
|
steps:
|
|
- name: git checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- name: Set up Nix cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
with:
|
|
use-flakehub: true
|
|
|
|
- name: Build and cache dev shell for ${{ matrix.systems.nix-system }} on ${{ matrix.systems.runner }}
|
|
run: |
|
|
nix build -L ".#devShells.${{ matrix.systems.nix-system }}.default"
|
|
|
|
- name: Build package for ${{ matrix.systems.nix-system }}
|
|
run: |
|
|
nix build -L ".#packages.${{ matrix.systems.nix-system }}.default"
|
|
cp ./result/bin/flake-checker flake-checker
|
|
|
|
- name: Upload flake-checker executable for ${{ matrix.systems.system }}
|
|
uses: actions/upload-artifact@v4.3.3
|
|
with:
|
|
# Artifact name
|
|
name: ${{ env.ARTIFACT_KEY }}
|
|
path: flake-checker
|
|
retention-days: 1
|