Flake update #15
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: nix flake check | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v25 | |
- name: Check .nix formatting | |
run: nix fmt -- --fail-on-change | |
- name: Check nix flake show runs successfully | |
run: nix flake show | |
- name: Run nix flake check | |
run: nix flake check -v | |
build_matrix: | |
name: "build" | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
strategy: | |
matrix: | |
target: [x1, t480] | |
concurrency: | |
# Cancel any in-progress workflow runs from the same PR or branch, | |
# allowing matrix jobs to run concurrently: | |
group: ${{ github.workflow }}.${{ github.event.pull_request.number || github.ref }}.${{ matrix.target }} | |
cancel-in-progress: true | |
steps: | |
- name: Print runner system info | |
run: sudo apt-get install -y inxi; sudo inxi -c0 --width -1 --basic --memory-short | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v25 | |
- name: Build target '${{ matrix.target }}' | |
run: nix-shell --run 'nixos-rebuild build --flake .#${{ matrix.target }}' |