|
1 | 1 | jobs: |
| 2 | + QuickChick: |
| 3 | + needs: |
| 4 | + - coq |
| 5 | + - mathcomp-ssreflect |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Determine which commit to initially checkout |
| 9 | + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ |
| 10 | + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ |
| 11 | + \ }}\" >> $GITHUB_ENV\nfi\n" |
| 12 | + - name: Git checkout |
| 13 | + uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + fetch-depth: 0 |
| 16 | + ref: ${{ env.target_commit }} |
| 17 | + - name: Determine which commit to test |
| 18 | + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ |
| 19 | + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ |
| 20 | + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ |
| 21 | + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ |
| 22 | + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ |
| 23 | + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ |
| 24 | + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ |
| 25 | + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" |
| 26 | + - name: Git checkout |
| 27 | + uses: actions/checkout@v4 |
| 28 | + with: |
| 29 | + fetch-depth: 0 |
| 30 | + ref: ${{ env.tested_commit }} |
| 31 | + - name: Cachix install |
| 32 | + uses: cachix/install-nix-action@v27 |
| 33 | + with: |
| 34 | + nix_path: nixpkgs=channel:nixpkgs-unstable |
| 35 | + - name: Cachix setup math-comp |
| 36 | + uses: cachix/cachix-action@v15 |
| 37 | + with: |
| 38 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 39 | + extraPullNames: coq, coq-community |
| 40 | + name: math-comp |
| 41 | + - id: stepCheck |
| 42 | + name: Checking presence of CI target QuickChick |
| 43 | + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ |
| 44 | + \ bundle \"coq-8.20\" --argstr job \"QuickChick\" \\\n --dry-run 2>&1 >\ |
| 45 | + \ /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\ |
| 46 | + \ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" |
| 47 | + - if: steps.stepCheck.outputs.status == 'built' |
| 48 | + name: 'Building/fetching previous CI target: coq' |
| 49 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20" |
| 50 | + --argstr job "coq" |
| 51 | + - if: steps.stepCheck.outputs.status == 'built' |
| 52 | + name: 'Building/fetching previous CI target: mathcomp-ssreflect' |
| 53 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20" |
| 54 | + --argstr job "mathcomp-ssreflect" |
| 55 | + - if: steps.stepCheck.outputs.status == 'built' |
| 56 | + name: 'Building/fetching previous CI target: coq-ext-lib' |
| 57 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20" |
| 58 | + --argstr job "coq-ext-lib" |
| 59 | + - if: steps.stepCheck.outputs.status == 'built' |
| 60 | + name: 'Building/fetching previous CI target: simple-io' |
| 61 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20" |
| 62 | + --argstr job "simple-io" |
| 63 | + - if: steps.stepCheck.outputs.status == 'built' |
| 64 | + name: Building/fetching current CI target |
| 65 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20" |
| 66 | + --argstr job "QuickChick" |
2 | 67 | autosubst: |
3 | 68 | needs: |
4 | 69 | - coq |
|
0 commit comments