From d5da5679979ced8717a310fb51a28a8f5a321bca Mon Sep 17 00:00:00 2001 From: Karl Palmskog Date: Fri, 1 Oct 2021 21:45:29 +0200 Subject: [PATCH] update meta.yml and regenerate CI boilerplate --- .../{docker-ci.yml => docker-action.yml} | 0 .github/workflows/nix-action.yml | 52 +++++++++++++++++++ .github/workflows/nix-ci.yml | 30 ----------- meta.yml | 2 +- 4 files changed, 53 insertions(+), 31 deletions(-) rename .github/workflows/{docker-ci.yml => docker-action.yml} (100%) create mode 100644 .github/workflows/nix-action.yml delete mode 100644 .github/workflows/nix-ci.yml diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-action.yml similarity index 100% rename from .github/workflows/docker-ci.yml rename to .github/workflows/docker-action.yml diff --git a/.github/workflows/nix-action.yml b/.github/workflows/nix-action.yml new file mode 100644 index 0000000..0bdf051 --- /dev/null +++ b/.github/workflows/nix-action.yml @@ -0,0 +1,52 @@ +# 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: + - v8.13 + pull_request: + paths: + - .github/workflows/** + pull_request_target: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + overrides: + - 'coq = "8.13"' + 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 + - uses: cachix/cachix-action@v8 + with: + name: coq + - uses: cachix/cachix-action@v8 + with: + name: coq-community + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - uses: cachix/cachix-action@v8 + 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/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml deleted file mode 100644 index 4283eee..0000000 --- a/.github/workflows/nix-ci.yml +++ /dev/null @@ -1,30 +0,0 @@ -# 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: - - v8.13 - pull_request: - branches: - - '**' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - version_or_url: - - 'https://github.com/coq/coq-on-cachix/tarball/v8.13' - fail-fast: false - steps: - - uses: cachix/install-nix-action@v12 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - uses: cachix/cachix-action@v8 - with: - # Name of a cachix cache to pull/substitute - name: coq - - uses: actions/checkout@v2 - - run: nix-build --argstr coq-version-or-url "${{ matrix.version_or_url }}" diff --git a/meta.yml b/meta.yml index 3e7956a..b4050b2 100644 --- a/meta.yml +++ b/meta.yml @@ -55,7 +55,7 @@ supported_ocaml_versions: opam: '{>= "4.05.0"}' tested_coq_nix_versions: -- version_or_url: https://github.com/coq/coq-on-cachix/tarball/v8.13 +- coq_version: '8.13' tested_coq_opam_versions: - version: '8.13'