hosts: 3.14.89 -> 3.14.90 #760
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: | |
- push | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{secrets.SSH_KEY}} | |
submodules: 'true' | |
- uses: cachix/install-nix-action@v27 | |
- uses: DeterminateSystems/flake-checker-action@v7 | |
- name: Check formatting | |
run: nix fmt -- --check . | |
eval-check: | |
name: Eval | |
runs-on: ubuntu-latest | |
needs: check | |
strategy: | |
fail-fast: false | |
matrix: | |
nix-version: | |
- 2.18.4 # 24.05, unstable | |
- latest | |
- lix | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
FLAKE: 'git+ssh://[email protected]/${{ github.repository }}.git?ref=${{ github.ref }}&rev=${{ github.sha }}&submodules=1' | |
steps: | |
- uses: cachix/install-nix-action@v27 | |
if: matrix.nix-version != 'lix' | |
with: | |
install_url: ${{ matrix.nix-version != 'latest' && format('https://releases.nixos.org/nix/nix-{0}/install', matrix.nix-version) || '' }} | |
- name: Install Lix | |
if: matrix.nix-version == 'lix' | |
run: | | |
curl -sSf -L https://install.lix.systems/lix | sh -s -- install --no-confirm | |
sudo tee -a /etc/nix/nix.conf <<< "trusted-users = root worker" | |
sudo tee -a /etc/nix/nix.conf <<< "experimental-features = nix-command flakes" | |
- name: Add SSH key to agent | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "$SSH_KEY" | |
- name: Check flake outputs | |
run: nix flake check "$FLAKE" --no-build --all-systems --no-allow-import-from-derivation | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: eval-check | |
strategy: | |
fail-fast: false | |
matrix: | |
system: | |
# A representative subset of systems. | |
# It would be nice to check funi here, but we can't run kernel builds | |
# on the GH runner. | |
- taiyi | |
- rastaban | |
- iso | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
FLAKE: 'git+ssh://[email protected]/${{ github.repository }}.git?ref=${{ github.ref }}&rev=${{ github.sha }}&submodules=1' | |
OUTPUT: 'nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel' | |
steps: | |
- uses: cachix/install-nix-action@v27 | |
- name: Add SSH key to agent | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "$SSH_KEY" | |
- name: Build | |
run: nix build "$FLAKE#$OUTPUT" |