From 3b861388a4eccc6d95c73b0e5140e13c59337de2 Mon Sep 17 00:00:00 2001 From: Pierre Roux Date: Mon, 16 Dec 2024 11:45:57 +0100 Subject: [PATCH] [CI] Update Nix toolbox Following the merge of https://github.com/coq-community/coq-nix-toolbox/pull/302 --- .../nix-action-coq-master-min-elpi.yml | 60 +++++++++++++++++++ .github/workflows/nix-action-coq-master.yml | 60 +++++++++++++++++++ .nix/coq-nix-toolbox.nix | 2 +- default.nix | 4 +- 4 files changed, 123 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nix-action-coq-master-min-elpi.yml b/.github/workflows/nix-action-coq-master-min-elpi.yml index 32dadea79..ff0db8029 100644 --- a/.github/workflows/nix-action-coq-master-min-elpi.yml +++ b/.github/workflows/nix-action-coq-master-min-elpi.yml @@ -49,6 +49,7 @@ jobs: coq-elpi: needs: - coq + - stdlib runs-on: ubuntu-latest steps: - name: Determine which commit to initially checkout @@ -162,6 +163,7 @@ jobs: mathcomp: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -253,6 +255,7 @@ jobs: mathcomp-algebra: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - hierarchy-builder @@ -520,6 +523,7 @@ jobs: mathcomp-character: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -740,6 +744,7 @@ jobs: mathcomp-field: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -821,6 +826,7 @@ jobs: mathcomp-fingroup: needs: - coq + - stdlib - mathcomp-ssreflect - hierarchy-builder runs-on: ubuntu-latest @@ -1150,6 +1156,7 @@ jobs: mathcomp-solvable: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -1226,6 +1233,7 @@ jobs: mathcomp-ssreflect: needs: - coq + - stdlib - hierarchy-builder runs-on: ubuntu-latest steps: @@ -1448,6 +1456,58 @@ jobs: name: Building/fetching current CI target run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master-min-elpi" --argstr job "odd-order" + stdlib: + needs: + - coq + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{ + github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha + }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{ + github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url + }} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git + merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null + 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\ + \ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha + }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ + \ fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v15 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target stdlib + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr + bundle \"coq-master-min-elpi\" --argstr job \"stdlib\" \\\n --dry-run 2>&1 + > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\ + \ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master-min-elpi" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master-min-elpi" + --argstr job "stdlib" name: Nix CI for bundle coq-master-min-elpi on: pull_request: diff --git a/.github/workflows/nix-action-coq-master.yml b/.github/workflows/nix-action-coq-master.yml index b3833600e..85840f202 100644 --- a/.github/workflows/nix-action-coq-master.yml +++ b/.github/workflows/nix-action-coq-master.yml @@ -49,6 +49,7 @@ jobs: coq-elpi: needs: - coq + - stdlib runs-on: ubuntu-latest steps: - name: Determine which commit to initially checkout @@ -162,6 +163,7 @@ jobs: mathcomp: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -253,6 +255,7 @@ jobs: mathcomp-algebra: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - hierarchy-builder @@ -520,6 +523,7 @@ jobs: mathcomp-character: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -740,6 +744,7 @@ jobs: mathcomp-field: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -821,6 +826,7 @@ jobs: mathcomp-fingroup: needs: - coq + - stdlib - mathcomp-ssreflect - hierarchy-builder runs-on: ubuntu-latest @@ -1150,6 +1156,7 @@ jobs: mathcomp-solvable: needs: - coq + - stdlib - mathcomp-ssreflect - mathcomp-fingroup - mathcomp-algebra @@ -1226,6 +1233,7 @@ jobs: mathcomp-ssreflect: needs: - coq + - stdlib - hierarchy-builder runs-on: ubuntu-latest steps: @@ -1448,6 +1456,58 @@ jobs: name: Building/fetching current CI target run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master" --argstr job "odd-order" + stdlib: + needs: + - coq + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{ + github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha + }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{ + github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url + }} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git + merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null + 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\ + \ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha + }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ + \ fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v15 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target stdlib + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr + bundle \"coq-master\" --argstr job \"stdlib\" \\\n --dry-run 2>&1 > /dev/null)\n + echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ + s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master" + --argstr job "stdlib" name: Nix CI for bundle coq-master on: pull_request: diff --git a/.nix/coq-nix-toolbox.nix b/.nix/coq-nix-toolbox.nix index 6ac626e65..eb2e2bb9f 100644 --- a/.nix/coq-nix-toolbox.nix +++ b/.nix/coq-nix-toolbox.nix @@ -1 +1 @@ -"76c44f0123e79740391775e2f977622e2bdc7f26" +"fb3515feec422e546de863ad0101e2a51ec9b8db" diff --git a/default.nix b/default.nix index 7c656a573..1a24d7a18 100644 --- a/default.nix +++ b/default.nix @@ -4,8 +4,8 @@ bundle ? null, job ? null, inNixShell ? null, src ? ./., }@args: let auto = fetchGit { - url = "https://github.com/proux01/coq-nix-toolbox.git"; - ref = "elpi206"; + url = "https://github.com/coq-community/coq-nix-toolbox.git"; + ref = "master"; rev = import .nix/coq-nix-toolbox.nix; }; in