diff --git a/.github/workflows/nix-action-9.1.yml b/.github/workflows/nix-action-9.1.yml index f153e3c..7f3dfa2 100644 --- a/.github/workflows/nix-action-9.1.yml +++ b/.github/workflows/nix-action-9.1.yml @@ -1,3 +1,6 @@ +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} jobs: coq: needs: @@ -9,8 +12,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -23,8 +27,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -60,7 +65,7 @@ jobs: --argstr job "coq" odd-order: needs: - - coq + - rocq-core runs-on: ubuntu-latest steps: - name: Determine which commit to initially checkout @@ -68,8 +73,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -82,8 +88,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -110,9 +117,9 @@ jobs: \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ status=fetched\" >> $GITHUB_OUTPUT\nfi\n" - if: steps.stepCheck.outputs.status != 'fetched' - name: 'Building/fetching previous CI target: coq' + name: 'Building/fetching previous CI target: rocq-core' run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" - --argstr job "coq" + --argstr job "rocq-core" - if: steps.stepCheck.outputs.status != 'fetched' name: 'Building/fetching previous CI target: mathcomp-character' run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" @@ -130,8 +137,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -144,8 +152,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install diff --git a/.github/workflows/nix-action-9.2.yml b/.github/workflows/nix-action-9.2.yml new file mode 100644 index 0000000..84e88f2 --- /dev/null +++ b/.github/workflows/nix-action-9.2.yml @@ -0,0 +1,201 @@ +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} +jobs: + coq: + needs: + - rocq-core + 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@v7 + with: + allow-unsafe-pr-checkout: true + 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@v7 + with: + allow-unsafe-pr-checkout: true + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup math-comp + uses: cachix/cachix-action@v16 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community + name: math-comp + - id: stepGetDerivation + name: Getting derivation for current job (coq) + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle + \"9.2\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail; + true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation + failed\"; exit 1; fi\n" + - id: stepCheck + name: Checking presence of CI target for current job + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" + - if: steps.stepCheck.outputs.status != 'fetched' + name: 'Building/fetching previous CI target: rocq-core' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2" + --argstr job "rocq-core" + - if: steps.stepCheck.outputs.status != 'fetched' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2" + --argstr job "coq" + odd-order: + needs: + - rocq-core + 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@v7 + with: + allow-unsafe-pr-checkout: true + 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@v7 + with: + allow-unsafe-pr-checkout: true + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup math-comp + uses: cachix/cachix-action@v16 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community + name: math-comp + - id: stepGetDerivation + name: Getting derivation for current job (odd-order) + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle + \"9.2\" --argstr job \"odd-order\" \\\n --dry-run 2> err > out || (touch + fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation + failed\"; exit 1; fi\n" + - id: stepCheck + name: Checking presence of CI target for current job + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" + - if: steps.stepCheck.outputs.status != 'fetched' + name: 'Building/fetching previous CI target: rocq-core' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2" + --argstr job "rocq-core" + - if: steps.stepCheck.outputs.status != 'fetched' + name: 'Building/fetching previous CI target: mathcomp-character' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2" + --argstr job "mathcomp-character" + - if: steps.stepCheck.outputs.status != 'fetched' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2" + --argstr job "odd-order" + rocq-core: + needs: [] + 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@v7 + with: + allow-unsafe-pr-checkout: true + 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@v7 + with: + allow-unsafe-pr-checkout: true + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup math-comp + uses: cachix/cachix-action@v16 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community + name: math-comp + - id: stepGetDerivation + name: Getting derivation for current job (rocq-core) + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle + \"9.2\" --argstr job \"rocq-core\" \\\n --dry-run 2> err > out || (touch + fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation + failed\"; exit 1; fi\n" + - id: stepCheck + name: Checking presence of CI target for current job + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" + - if: steps.stepCheck.outputs.status != 'fetched' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2" + --argstr job "rocq-core" +name: Nix CI for bundle 9.2 +on: + pull_request: + paths: + - .github/workflows/nix-action-9.2.yml + pull_request_target: + paths-ignore: + - .github/workflows/nix-action-9.2.yml + types: + - opened + - synchronize + - reopened + push: + branches: + - master diff --git a/.github/workflows/nix-action-9.3.yml b/.github/workflows/nix-action-9.3.yml new file mode 100644 index 0000000..5d603e0 --- /dev/null +++ b/.github/workflows/nix-action-9.3.yml @@ -0,0 +1,201 @@ +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} +jobs: + coq: + needs: + - rocq-core + 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@v7 + with: + allow-unsafe-pr-checkout: true + 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@v7 + with: + allow-unsafe-pr-checkout: true + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup math-comp + uses: cachix/cachix-action@v16 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community + name: math-comp + - id: stepGetDerivation + name: Getting derivation for current job (coq) + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle + \"9.3\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail; + true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation + failed\"; exit 1; fi\n" + - id: stepCheck + name: Checking presence of CI target for current job + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" + - if: steps.stepCheck.outputs.status != 'fetched' + name: 'Building/fetching previous CI target: rocq-core' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.3" + --argstr job "rocq-core" + - if: steps.stepCheck.outputs.status != 'fetched' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.3" + --argstr job "coq" + odd-order: + needs: + - rocq-core + 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@v7 + with: + allow-unsafe-pr-checkout: true + 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@v7 + with: + allow-unsafe-pr-checkout: true + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup math-comp + uses: cachix/cachix-action@v16 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community + name: math-comp + - id: stepGetDerivation + name: Getting derivation for current job (odd-order) + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle + \"9.3\" --argstr job \"odd-order\" \\\n --dry-run 2> err > out || (touch + fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation + failed\"; exit 1; fi\n" + - id: stepCheck + name: Checking presence of CI target for current job + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" + - if: steps.stepCheck.outputs.status != 'fetched' + name: 'Building/fetching previous CI target: rocq-core' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.3" + --argstr job "rocq-core" + - if: steps.stepCheck.outputs.status != 'fetched' + name: 'Building/fetching previous CI target: mathcomp-character' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.3" + --argstr job "mathcomp-character" + - if: steps.stepCheck.outputs.status != 'fetched' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.3" + --argstr job "odd-order" + rocq-core: + needs: [] + 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@v7 + with: + allow-unsafe-pr-checkout: true + 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@v7 + with: + allow-unsafe-pr-checkout: true + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup math-comp + uses: cachix/cachix-action@v16 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community + name: math-comp + - id: stepGetDerivation + name: Getting derivation for current job (rocq-core) + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle + \"9.3\" --argstr job \"rocq-core\" \\\n --dry-run 2> err > out || (touch + fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation + failed\"; exit 1; fi\n" + - id: stepCheck + name: Checking presence of CI target for current job + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" + - if: steps.stepCheck.outputs.status != 'fetched' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.3" + --argstr job "rocq-core" +name: Nix CI for bundle 9.3 +on: + pull_request: + paths: + - .github/workflows/nix-action-9.3.yml + pull_request_target: + paths-ignore: + - .github/workflows/nix-action-9.3.yml + types: + - opened + - synchronize + - reopened + push: + branches: + - master diff --git a/.github/workflows/nix-action-master.yml b/.github/workflows/nix-action-master.yml index 4a73ef7..4763a53 100644 --- a/.github/workflows/nix-action-master.yml +++ b/.github/workflows/nix-action-master.yml @@ -1,3 +1,6 @@ +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} jobs: coq: needs: @@ -9,8 +12,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -23,8 +27,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -58,69 +63,9 @@ jobs: name: Building/fetching current CI target run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "master" --argstr job "coq" - coq-elpi: - needs: - - rocq-core - 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@v6 - 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@v6 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v31 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup math-comp - uses: cachix/cachix-action@v16 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community - name: math-comp - - id: stepGetDerivation - name: Getting derivation for current job (coq-elpi) - run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle - \"master\" --argstr job \"coq-elpi\" \\\n --dry-run 2> err > out || (touch - fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation - failed\"; exit 1; fi\n" - - id: stepCheck - name: Checking presence of CI target for current job - run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs - actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ - ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ - \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ - status=fetched\" >> $GITHUB_OUTPUT\nfi\n" - - if: steps.stepCheck.outputs.status != 'fetched' - name: 'Building/fetching previous CI target: rocq-core' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle - "master" --argstr job "rocq-core" - - if: steps.stepCheck.outputs.status != 'fetched' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle - "master" --argstr job "coq-elpi" hierarchy-builder: needs: - rocq-core - - coq-elpi runs-on: ubuntu-latest steps: - name: Determine which commit to initially checkout @@ -128,8 +73,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -142,8 +88,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -192,8 +139,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -206,8 +154,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -259,8 +208,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -273,8 +223,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -310,7 +261,7 @@ jobs: "master" --argstr job "micromega-plugin" odd-order: needs: - - coq + - rocq-core runs-on: ubuntu-latest steps: - name: Determine which commit to initially checkout @@ -318,8 +269,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -332,8 +284,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -360,9 +313,9 @@ jobs: \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ status=fetched\" >> $GITHUB_OUTPUT\nfi\n" - if: steps.stepCheck.outputs.status != 'fetched' - name: 'Building/fetching previous CI target: coq' + name: 'Building/fetching previous CI target: rocq-core' run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle - "master" --argstr job "coq" + "master" --argstr job "rocq-core" - if: steps.stepCheck.outputs.status != 'fetched' name: 'Building/fetching previous CI target: mathcomp-character' run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle @@ -380,8 +333,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -394,8 +348,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -434,8 +389,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -448,8 +404,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install @@ -489,8 +446,9 @@ jobs: 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@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.target_commit }} - name: Determine which commit to test @@ -503,8 +461,9 @@ jobs: }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ \ fi\nfi\n" - name: Git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: + allow-unsafe-pr-checkout: true fetch-depth: 0 ref: ${{ env.tested_commit }} - name: Cachix install diff --git a/.gitignore b/.gitignore index b75ffdc..73037e4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,6 @@ *.aux *.a *.o -Make*.coq -Make*.coq.bak -Make*.coq.conf \ No newline at end of file +Make*.rocq +Make*.rocq.bak +Make*.rocq.conf diff --git a/.nix/config.nix b/.nix/config.nix index 5781150..7e697fe 100644 --- a/.nix/config.nix +++ b/.nix/config.nix @@ -12,10 +12,6 @@ ## to serve as a basis for nix-shell edit this # shell-attribute = "{{nix_name}}"; - ## Set this when the package has no rocqPackages version yet - ## (either in nixpkgs or in .nix/rocq-overlays) - no-rocq-yet = true; - ## Maybe the shortname of the library is different from ## the name of the nixpkgs attribute, if so, set it here: # pname = "{{shortname}}"; @@ -34,30 +30,32 @@ ## select an entry to build in the following `bundles` set ## defaults to "default" - default-bundle = "9.1"; + default-bundle = "9.2"; ## write one `bundles.name` attribute set per ## alternative configuration, the can be used to ## compute several ci jobs as well - bundles."9.1" = { rocqPackages = { + bundles."9.1".rocqPackages = { rocq-core.override.version = "9.1"; - }; coqPackages = { coq.override.version = "9.1"; - }; }; - bundles."master" = { rocqPackages = { + }; + bundles."9.2".rocqPackages = { + rocq-core.override.version = "9.2"; + coq.override.version = "9.2"; + }; + bundles."9.3".rocqPackages = { + rocq-core.override.version = "9.3"; + coq.override.version = "9.3"; + }; + bundles."master".rocqPackages = { rocq-core.override.version = "master"; + coq.override.version = "master"; rocq-elpi.override.version = "master"; hierarchy-builder.override.version = "master"; micromega-plugin.override.version = "master"; mathcomp.override.version = "master"; stdlib.override.version = "master"; - }; coqPackages = { - coq.override.version = "master"; - coq-elpi.override.version = "master"; - hierarchy-builder.override.version = "master"; - mathcomp.override.version = "master"; - stdlib.override.version = "master"; - }; }; + }; ## you may mark a package as a CI job as follows # coqPackages..ci.job = "test"; diff --git a/.nix/coq-nix-toolbox.nix b/.nix/coq-nix-toolbox.nix index ab408cc..71ff6cb 100644 --- a/.nix/coq-nix-toolbox.nix +++ b/.nix/coq-nix-toolbox.nix @@ -1 +1 @@ -"9cd6ca08dba2a6557e46cbf3243a24f7f67ec5ff" +"f0c74efcec0d8657e1d5bcc6fd431b7caee1e43d" diff --git a/.nix/rocq-overlays/odd-order/default.nix b/.nix/rocq-overlays/odd-order/default.nix new file mode 100644 index 0000000..c906843 --- /dev/null +++ b/.nix/rocq-overlays/odd-order/default.nix @@ -0,0 +1,59 @@ +{ + lib, + coq, + mkRocqDerivation, + mathcomp-group-representation, + version ? null, +}: + +mkRocqDerivation { + pname = "odd-order"; + owner = "math-comp"; + + release."2.4.0".hash = "sha256-8U3xFKe/gBSapwNRix3i2+jbyTja5xXGnQwtiTiF+9w="; + release."2.3.0".hash = "sha256-53FG8I9O+tsIlmaa9qy6VYyJNwWfGmhavKhbZ0VqAGc="; + release."2.2.0".hash = "sha256-z0C7+wtY8NpoT8wYqHiy8mB2HPYAeJndzDmf7Bb0mg8="; + release."2.1.0".hash = "sha256-TPlaQbO0yXEpUgy3rlCx/w1MSLECJk5tdU26fAGe48Q="; + release."1.14.0".hash = "sha256:0iln70npkvixqyz469l6nry545a15jlaix532i1l7pzfkqqn6v68"; + release."1.13.0".hash = "sha256-EzNKR/JzM8T17sMhPhgZNs14e50X4dY3OwFi133IsT0="; + release."1.12.0".hash = "sha256-omsfdc294CxKAHNMMeqJCcVimvyRCHgxcQ4NJOWSfNM="; + releaseRev = v: "mathcomp-odd-order.${v}"; + + inherit version; + defaultVersion = + let + case = coq: mc: out: { + cases = [ + coq + mc + ]; + inherit out; + }; + in + with lib.versions; + lib.switch + [ coq.coq-version mathcomp-group-representation.version ] + [ + (case (range "9.1" "9.3") (range "2.5" "2.6") "2.4.0") + (case (range "9.0" "9.1") (range "2.5" "2.5") "2.3.0") + (case (range "8.16" "9.1") (range "2.2.0" "2.4.0") "2.2.0") + (case (range "8.16" "9.0") (range "2.1.0" "2.3.0") "2.1.0") + (case (range "8.11" "8.16") (range "1.13.0" "1.15.0") "1.14.0") + (case (range "8.10" "8.15") (range "1.12.0" "1.14.0") "1.13.0") + (case (range "8.10" "8.14") (range "1.10.0" "1.12.0") "1.12.0") + ] + null; + + useCoqifVersion = v: v != null && v != "dev" && lib.versions.isLe "2.4.0" v; + + propagatedBuildInputs = [ + mathcomp-group-representation + ]; + + meta = { + description = "Formal proof of the Odd Order Theorem"; + maintainers = with lib.maintainers; [ siraben ]; + license = lib.licenses.cecill-b; + platforms = lib.platforms.unix; + }; +} diff --git a/Makefile b/Makefile index 257ce2a..541a74a 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,25 @@ # KNOWNTARGETS will not be passed along to CoqMakefile -KNOWNTARGETS := Makefile.coq +KNOWNTARGETS := Makefile.rocq # KNOWNFILES will not get implicit targets from the final rule, and so # depending on them won't invoke the submake # Warning: These files get declared as PHONY, so any targets depending # on them always get rebuilt KNOWNFILES := Makefile _CoqProject -.DEFAULT_GOAL := invoke-coqmakefile +.DEFAULT_GOAL := invoke-rocqmakefile -Makefile.coq: Makefile _CoqProject - $(COQBIN)coq_makefile -f _CoqProject -o Makefile.coq +Makefile.rocq: Makefile _CoqProject + $(ROCQBIN)rocq makefile -f _CoqProject -o Makefile.rocq -invoke-coqmakefile: Makefile.coq - $(MAKE) --no-print-directory -f Makefile.coq $(filter-out $(KNOWNTARGETS),$(MAKECMDGOALS)) +invoke-rocqmakefile: Makefile.rocq + $(MAKE) --no-print-directory -f Makefile.rocq $(filter-out $(KNOWNTARGETS),$(MAKECMDGOALS)) -.PHONY: invoke-coqmakefile $(KNOWNFILES) +.PHONY: invoke-rocqmakefile $(KNOWNFILES) #################################################################### ## Your targets here ## #################################################################### # This should be the last rule, to handle any targets not declared above -%: invoke-coqmakefile +%: invoke-rocqmakefile @true diff --git a/coq-mathcomp-odd-order.opam b/coq-mathcomp-odd-order.opam index 8a4595e..4f743f7 100644 --- a/coq-mathcomp-odd-order.opam +++ b/coq-mathcomp-odd-order.opam @@ -6,31 +6,9 @@ dev-repo: "git+https://github.com/math-comp/odd-order" license: "CeCILL-B" version: "dev" -build: [ - [make "-j" "%{jobs}%"] -] -install: [ make "install" ] depends: [ - "coq-core" { >= "9.1" } - "coq-mathcomp-character" { (>= "2.4.0") | (= "dev") } + "coq-core" + "rocq-mathcomp-odd-order" ] -tags: [ "keyword:finite groups" "keyword:Feit Thompson theorem" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" ] -authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O'Connor <>" "Laurent Théry <>" "Assia Mahboubi <>" ] -synopsis: "The formal proof of the Feit-Thompson theorem" -description: """ -The formal proof of the Feit-Thompson theorem. - -From mathcomp Require Import all_ssreflect all_fingroup all_solvable PFsection14. - -Check Feit_Thompson. - : forall (gT : finGroupType) (G : {group gT}), odd #|G| -> solvable G - -From mathcomp Require Import all_ssreflect all_fingroup - all_solvable stripped_odd_order_theorem. -Check stripped_Odd_Order. - : forall (T : Type) (mul : T -> T -> T) (one : T) (inv : T -> T) - (G : T -> Type) (n : natural), - group_axioms T mul one inv -> - group T mul one inv G -> - finite_of_order T G n -> odd n -> solvable_group T mul one inv G""" +synopsis: "Compatibility package for rocq-mathcomp-odd-order" diff --git a/rocq-mathcomp-odd-order.opam b/rocq-mathcomp-odd-order.opam new file mode 100644 index 0000000..8ef64c3 --- /dev/null +++ b/rocq-mathcomp-odd-order.opam @@ -0,0 +1,36 @@ +opam-version: "2.0" +maintainer: "Mathematical Components " +homepage: "https://math-comp.github.io/math-comp/" +bug-reports: "Mathematical Components " +dev-repo: "git+https://github.com/math-comp/odd-order" +license: "CeCILL-B" +version: "dev" + +build: [ + [make "-j" "%{jobs}%"] +] +install: [ make "install" ] +depends: [ + "rocq-core" { >= "9.1" } + "rocq-mathcomp-character" { (>= "2.4.0") | (= "dev") } +] +tags: [ "keyword:finite groups" "keyword:Feit Thompson theorem" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" ] +authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O'Connor <>" "Laurent Théry <>" "Assia Mahboubi <>" ] +synopsis: "The formal proof of the Feit-Thompson theorem" +description: """ +The formal proof of the Feit-Thompson theorem. + +From mathcomp Require Import all_ssreflect all_fingroup all_solvable PFsection14. + +Check Feit_Thompson. + : forall (gT : finGroupType) (G : {group gT}), odd #|G| -> solvable G + +From mathcomp Require Import all_ssreflect all_fingroup + all_solvable stripped_odd_order_theorem. + +Check stripped_Odd_Order. + : forall (T : Type) (mul : T -> T -> T) (one : T) (inv : T -> T) + (G : T -> Type) (n : natural), + group_axioms T mul one inv -> + group T mul one inv G -> + finite_of_order T G n -> odd n -> solvable_group T mul one inv G"""