From 42fbcdd1e937e56c4b145ff1acb7d437fa934efb Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Tue, 2 Jun 2020 19:05:12 +0200 Subject: update default nix and setup cachix --- .github/workflows/nix.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/nix.yml (limited to '.github/workflows') 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 -- cgit v1.2.3