aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/nix.yml
diff options
context:
space:
mode:
authorCyril Cohen2021-03-12 13:18:16 +0100
committerCyril Cohen2021-03-12 13:18:16 +0100
commit476aa248bebcd2eb85b51b0b818dc37eaf94d6f2 (patch)
tree83768d17bc87d1858d1bc1804a1f7baa72d8af94 /.github/workflows/nix.yml
parent8674d6996fca76028ead3f75363f11bab4fa3e7c (diff)
Revert "Use nix-tool-box"
This reverts commit 8674d6996fca76028ead3f75363f11bab4fa3e7c that I added by accident
Diffstat (limited to '.github/workflows/nix.yml')
-rw-r--r--.github/workflows/nix.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
new file mode 100644
index 0000000..6a34426
--- /dev/null
+++ b/.github/workflows/nix.yml
@@ -0,0 +1,32 @@
+name: Cachix
+on:
+ push:
+jobs:
+ cachix:
+ name: Cachix branch
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ coq: [ "8.11", "8.12" ]
+ steps:
+ - name: Get branch shortname
+ run: echo "##[set-output name=name;]$(echo ${GITHUB_REF#refs/heads/})"
+ id: branch-short
+ - name: Get owner name
+ run: echo "##[set-output name=name;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1)"
+ id: owner
+ - name: Get owner lowercase name
+ run: echo "##[set-output name=name;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1 | tr '[:upper:]' '[:lower:]')"
+ id: owner-lowercase
+ - uses: cachix/install-nix-action@v12
+ - uses: cachix/cachix-action@v8
+ if: steps.owner.outputs.name == 'math-comp' || steps.owner.outputs.name == 'CohenCyril'
+ with:
+ # Name of a cachix cache to push and pull/substitute
+ name: ${{ steps.owner-lowercase.outputs.name }}
+ extraPullNames: coq
+ # Authentication token for Cachix, needed only for private cache access
+ authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
+ # 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.owner.outputs.name }}/${{ steps.branch-short.outputs.name }}";}' --argstr package mathcomp