poetry2nix/.github/workflows/ci.yml

57 lines
1.6 KiB
YAML
Raw Normal View History

2020-04-08 16:39:06 +12:00
name: CI
on:
pull_request:
2023-07-10 07:20:29 -05:00
merge_group:
2020-04-08 16:39:06 +12:00
2022-12-18 11:37:07 -05:00
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
2020-04-08 16:39:06 +12:00
jobs:
sort-build-systems:
runs-on: ubuntu-22.04
steps:
2023-10-02 02:00:47 +00:00
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
2023-10-02 02:00:47 +00:00
- uses: actions/checkout@v4
- name: Check format
2023-10-25 04:46:52 -04:00
run: nix-shell --packages jq diffutils --run "diff --unified overrides/build-systems.json <(jq --from-file overrides/sort-build-systems.jq --raw-output --sort-keys < overrides/build-systems.json)"
nix-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
2023-10-02 02:00:47 +00:00
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- id: set-matrix
name: Generate Nix Matrix
2021-12-30 07:23:53 -05:00
run: |
set -Eeu
echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT"
nix-build:
needs: nix-matrix
runs-on: ${{ matrix.os }}
2020-04-08 16:39:06 +12:00
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.nix-matrix.outputs.matrix) }}
2020-04-08 16:39:06 +12:00
steps:
2023-10-02 02:00:47 +00:00
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
name: poetry2nix
signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw=="
2023-10-25 04:52:18 -04:00
- run: nix build -L ".#${{ matrix.attr }}" --keep-going
collect:
runs-on: ubuntu-latest
needs:
- nix-build
- sort-build-systems
steps:
- run: exit 0