From 65cd4ee0f8e9786ed8732133fa45d2b275e78f45 Mon Sep 17 00:00:00 2001 From: Karl Palmskog Date: Wed, 22 Sep 2021 20:13:26 +0200 Subject: [PATCH] docker-coq for 8.14 --- .github/workflows/docker-action.yml | 31 +++++++++++++++++++++++++++++ .github/workflows/nix-action.yml | 19 ++++++++++++++++-- README.md | 4 ++++ meta.yml | 2 +- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/docker-action.yml diff --git a/.github/workflows/docker-action.yml b/.github/workflows/docker-action.yml new file mode 100644 index 0000000..c7355e1 --- /dev/null +++ b/.github/workflows/docker-action.yml @@ -0,0 +1,31 @@ +# 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: Docker CI + +on: + push: + branches: + - v8.14 + pull_request: + branches: + - '**' + +jobs: + build: + # the OS must be GNU/Linux to be able to use the docker-coq-action + runs-on: ubuntu-latest + strategy: + matrix: + image: + - 'coqorg/coq:8.14' + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: coq-community/docker-coq-action@v1 + with: + opam_file: 'coq-aac-tactics.opam' + custom_image: ${{ matrix.image }} + +# See also: +# https://github.com/coq-community/docker-coq-action#readme +# https://github.com/erikmd/docker-coq-github-action-demo diff --git a/.github/workflows/nix-action.yml b/.github/workflows/nix-action.yml index 7b8ff41..9dee804 100644 --- a/.github/workflows/nix-action.yml +++ b/.github/workflows/nix-action.yml @@ -7,8 +7,9 @@ on: branches: - v8.14 pull_request: - branches: - - '**' + paths: + - .github/workflows/** + pull_request_target: jobs: build: @@ -19,6 +20,18 @@ jobs: - 'coq = "v8.14"' fail-fast: false steps: + - name: Determine which ref 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_ref=refs/pull/${{ github.event.number }}/head" >> $GITHUB_ENV + else + echo "tested_ref=refs/pull/${{ github.event.number }}/merge" >> $GITHUB_ENV + fi + else + echo "tested_ref=${{ github.ref }}" >> $GITHUB_ENV + fi - uses: cachix/install-nix-action@v12 with: nix_path: nixpkgs=channel:nixpkgs-unstable @@ -33,5 +46,7 @@ jobs: with: name: math-comp - uses: actions/checkout@v2 + with: + ref: ${{ env.tested_ref }} - 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 e5ec570..ba536a4 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,16 @@ 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] [![DOI][doi-shield]][doi-link] +[docker-action-shield]: https://github.com/coq-community/aac-tactics/workflows/Docker%20CI/badge.svg?branch=v8.14 +[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=v8.14 [nix-action-link]: https://github.com/coq-community/aac-tactics/actions?query=workflow:"Nix%20CI" diff --git a/meta.yml b/meta.yml index d12def0..37885bb 100644 --- a/meta.yml +++ b/meta.yml @@ -55,7 +55,7 @@ supported_ocaml_versions: opam: '{>= "4.05.0"}' tested_coq_nix_versions: -- coq_version: v8.14 +- coq_version: 'v8.14' tested_coq_opam_versions: - version: '8.14'