From a997de62baefe153f2e9dab046d8f6405ed3dadc Mon Sep 17 00:00:00 2001 From: Karl Palmskog Date: Tue, 15 Mar 2022 14:20:50 +0100 Subject: [PATCH] re-enable simple Nix CI workflow --- .github/workflows/nix-action.yml | 47 ++++++++++++++++++++++++++++++++ README.md | 4 +++ meta.yml | 1 + 3 files changed, 52 insertions(+) create mode 100644 .github/workflows/nix-action.yml diff --git a/.github/workflows/nix-action.yml b/.github/workflows/nix-action.yml new file mode 100644 index 0000000..9224ff8 --- /dev/null +++ b/.github/workflows/nix-action.yml @@ -0,0 +1,47 @@ +# This file was generated from `meta.yml`, please do not edit manually. +# Follow the instructions on https://github.com/coq-community/templates to regenerate. +name: Nix CI + +on: + push: + branches: + - master + pull_request: + paths: + - .github/workflows/** + pull_request_target: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + overrides: + - 'coq = "master"' + fail-fast: false + steps: + - name: Determine which commit to test + run: | + if [[ ${{ github.event_name }} =~ "pull_request" ]]; then + merge_commit=$(git ls-remote ${{ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge | cut -f1) + if [ -z "$merge_commit" ]; then + echo "tested_commit=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV + else + echo "tested_commit=$merge_commit" >> $GITHUB_ENV + fi + else + echo "tested_commit=${{ github.sha }}" >> $GITHUB_ENV + fi + - uses: cachix/install-nix-action@v16 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - uses: cachix/cachix-action@v10 + with: + name: coq-community + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + extraPullNames: coq, math-comp + - uses: actions/checkout@v2 + with: + ref: ${{ env.tested_commit }} + - run: > + nix-build https://coq.inria.fr/nix/toolbox --argstr job aac-tactics --arg override '{ ${{ matrix.overrides }}; aac-tactics = builtins.filterSource (path: _: baseNameOf path != ".git") ./.; }' diff --git a/README.md b/README.md index 93fd18c..4313ed8 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Follow the instructions on https://github.com/coq-community/templates to regener # AAC Tactics [![Docker CI][docker-action-shield]][docker-action-link] +[![Nix CI][nix-action-shield]][nix-action-link] [![Contributing][contributing-shield]][contributing-link] [![Code of Conduct][conduct-shield]][conduct-link] [![Zulip][zulip-shield]][zulip-link] @@ -13,6 +14,9 @@ Follow the instructions on https://github.com/coq-community/templates to regener [docker-action-shield]: https://github.com/coq-community/aac-tactics/workflows/Docker%20CI/badge.svg?branch=master [docker-action-link]: https://github.com/coq-community/aac-tactics/actions?query=workflow:"Docker%20CI" +[nix-action-shield]: https://github.com/coq-community/aac-tactics/workflows/Nix%20CI/badge.svg?branch=master +[nix-action-link]: https://github.com/coq-community/aac-tactics/actions?query=workflow:"Nix%20CI" + [contributing-shield]: https://img.shields.io/badge/contributions-welcome-%23f7931e.svg [contributing-link]: https://github.com/coq-community/manifesto/blob/master/CONTRIBUTING.md diff --git a/meta.yml b/meta.yml index 86ccf4a..b5bec5a 100644 --- a/meta.yml +++ b/meta.yml @@ -4,6 +4,7 @@ shortname: aac-tactics organization: coq-community community: true action: true +nix: true plugin: true doi: 10.1007/978-3-642-25379-9_14 branch: master