name: Nix CI on: push: branches: - master pull_request: branches: - '**' jobs: setup: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Cachix install uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixpkgs-unstable - name: Cachix setup coq uses: cachix/cachix-action@v8 with: # Name of a cachix cache to pull/substitute name: coq - name: Cachix setup math-comp uses: cachix/cachix-action@v8 with: # Name of a cachix cache to pull/substitute name: math-comp authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Git checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Setup build matrix id: set-matrix run: | matrix=$(nix-shell --arg do-nothing true --run nixTasks) echo ::set-output name=matrix::{\"task\":$(echo $matrix)}\" mathcomp: runs-on: ubuntu-latest needs: - setup strategy: matrix: ${{fromJson(needs.setup.outputs.matrix)}} fail-fast: false steps: - name: Cachix install uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixpkgs-unstable - name: Cachix setup coq uses: cachix/cachix-action@v8 with: # Name of a cachix cache to pull/substitute name: coq - name: Cachix setup math-comp uses: cachix/cachix-action@v8 with: # Name of a cachix cache to pull/substitute name: math-comp authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Git checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Building/fetching dependencies run: nix-build --no-out-link --argstr ci "${{ matrix.task }}" --argstr ci-job "_deps" - name: Building/fetching current project run: nix-build --no-out-link --argstr ci "${{ matrix.task }}" --argstr ci-job mathcomp mathcomp-single: runs-on: ubuntu-latest needs: - setup strategy: matrix: ${{fromJson(needs.setup.outputs.matrix)}} fail-fast: false steps: - name: Cachix install uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixpkgs-unstable - name: Cachix setup coq uses: cachix/cachix-action@v8 with: # Name of a cachix cache to pull/substitute name: coq - name: Cachix setup math-comp uses: cachix/cachix-action@v8 with: # Name of a cachix cache to pull/substitute name: math-comp authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Git checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Building/fetching dependencies run: nix-build --no-out-link --argstr ci "${{ matrix.task }}" --argstr ci-job _deps - name: Building/fetching current project run: nix-build --no-out-link --argstr ci "${{ matrix.task }}" --argstr ci-job mathcomp-single