Apply matrix strategy

This commit is contained in:
Luc Perkins 2024-05-18 15:01:41 -03:00
parent 73510dc45c
commit 79ca9d8642
No known key found for this signature in database
GPG key ID: 16DB1108FB591835

View file

@ -71,66 +71,26 @@ jobs:
run: | run: |
[ $(nix config show substituters) == "https://cache.nixos.org/" ] [ $(nix config show substituters) == "https://cache.nixos.org/" ]
run-x86_64-linux: run-systems:
name: Run x86_64 Linux name: "Run ${{ matrix.systems.nix-system }}"
runs-on: ubuntu-22.04 runs-on: "${{ matrix.systems.runner }}"
permissions: permissions:
id-token: "write" id-token: "write"
contents: "read" contents: "read"
env: env:
ACTIONS_STEP_DEBUG: true ACTIONS_STEP_DEBUG: true
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: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Nix - name: Install Nix on ${{ matrix.systems.nix-system }} system
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
extra-conf: |
narinfo-cache-negative-ttl = 0
- name: Cache the store
uses: ./
with:
strict-mode: true
- name: Check the cache for liveness
run: |
.github/workflows/cache-test.sh
run-x86_64-darwin:
name: Run x86_64 Darwin
runs-on: macos-12
permissions:
id-token: "write"
contents: "read"
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
extra-conf: |
narinfo-cache-negative-ttl = 0
- name: Cache the store
uses: ./
with:
strict-mode: true
- name: Check the cache for liveness
run: |
.github/workflows/cache-test.sh
run-aarch64-darwin:
name: Run aarch64 Darwin
concurrency: build-ARM64-macOS
runs-on: macos-latest-xlarge
permissions:
id-token: "write"
contents: "read"
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main uses: DeterminateSystems/nix-installer-action@main
with: with:
flakehub: true flakehub: true