aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/nix.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/nix.yml')
-rw-r--r--.github/workflows/nix.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
new file mode 100644
index 0000000..bd399a8
--- /dev/null
+++ b/.github/workflows/nix.yml
@@ -0,0 +1,30 @@
+name: Cachix
+on:
+ push:
+jobs:
+ cachix:
+ name: Cachix branch
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ coq: [ "8.11", "8.10", "8.9", "8.8", "8.7" ]
+ steps:
+ - name: Get branch shortname
+ run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
+ id: branch-short-name
+ - name: Get repo name
+ run: echo "##[set-output name=repo;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1)"
+ id: repo-name
+ - name: Get repo lowercase name
+ run: echo "##[set-output name=repo;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1 | tr '[:upper:]' '[:lower:]')"
+ id: repo-lowercase-name
+ - uses: cachix/install-nix-action@v8
+ - uses: cachix/cachix-action@v6
+ with:
+ # Name of a cachix cache to push and pull/substitute
+ name: ${{ steps.repo-lowercase-name.outputs.repo }}
+ # Authentication token for Cachix, needed only for private cache access
+ signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
+ # building fake mathcomp-fast target
+ - run: nix-build https://github.com/math-comp/math-comp-nix/archive/master.tar.gz --arg config '{coq = "${{ matrix.coq }}"; mathcomp = "${{ steps.repo-name.outputs.repo }}/${{ steps.branch-short-name.outputs.branch }}";}' --argstr package mathcomp