diff options
| author | Cyril Cohen | 2020-06-02 19:05:12 +0200 |
|---|---|---|
| committer | Cyril Cohen | 2020-06-03 13:40:30 +0200 |
| commit | 42fbcdd1e937e56c4b145ff1acb7d437fa934efb (patch) | |
| tree | c00cc729667f57cfe8e0268dd4c55bd5cf2b5fa0 /.github/workflows | |
| parent | 4e1a0c3aa403be01b04059f1c6817d885d91eef4 (diff) | |
update default nix and setup cachix
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/nix.yml | 30 |
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 |
