name: "CI - Nix"
on:
  push:
    branches:
      - devel
      - master
      - main
  pull_request:
    branches:
      - devel
      - master
      - main
jobs:
  nix:
    runs-on: "${{ matrix.os }}-latest"
    strategy:
      matrix:
        os: [ubuntu]
    steps:
      - uses: actions/checkout@v6
      - uses: cachix/install-nix-action@v31
      - uses: cachix/cachix-action@v17
        with:
          name: gepetto
          authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
      - run: nix flake check -L
      - run: nix build -L
  check:
    if: always()
    name: check-macos-linux-nix
    runs-on: ubuntu-latest
    needs:
      - nix
    steps:
      - uses: re-actors/alls-green@release/v1
        with:
          jobs: ${{ toJSON(needs) }}
