|
| 1 | +jobs: |
| 2 | + parseque: |
| 3 | + needs: |
| 4 | + - rocq-core |
| 5 | + runs-on: ubuntu-latest |
| 6 | + steps: |
| 7 | + - name: Determine which commit to initially checkout |
| 8 | + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{ |
| 9 | + github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha |
| 10 | + }}\" >> $GITHUB_ENV\nfi\n" |
| 11 | + - name: Git checkout |
| 12 | + uses: actions/checkout@v4 |
| 13 | + with: |
| 14 | + fetch-depth: 0 |
| 15 | + ref: ${{ env.target_commit }} |
| 16 | + - name: Determine which commit to test |
| 17 | + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{ |
| 18 | + github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url |
| 19 | + }} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git |
| 20 | + merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null |
| 21 | + 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\ |
| 22 | + \ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha |
| 23 | + }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ |
| 24 | + \ fi\nfi\n" |
| 25 | + - name: Git checkout |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + fetch-depth: 0 |
| 29 | + ref: ${{ env.tested_commit }} |
| 30 | + - name: Cachix install |
| 31 | + uses: cachix/install-nix-action@v31 |
| 32 | + with: |
| 33 | + nix_path: nixpkgs=channel:nixpkgs-unstable |
| 34 | + - name: Cachix setup coq-community |
| 35 | + uses: cachix/cachix-action@v16 |
| 36 | + with: |
| 37 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 38 | + extraPullNames: coq |
| 39 | + name: coq-community |
| 40 | + - id: stepGetDerivation |
| 41 | + name: Getting derivation for current job (parseque) |
| 42 | + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle |
| 43 | + \"9.1\" --argstr job \"parseque\" \\\n --dry-run 2> err > out || (touch |
| 44 | + fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation |
| 45 | + failed\"; exit 1; fi\n" |
| 46 | + - id: stepCheck |
| 47 | + name: Checking presence of CI target for current job |
| 48 | + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs |
| 49 | + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ |
| 50 | + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ |
| 51 | + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ |
| 52 | + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" |
| 53 | + - if: steps.stepCheck.outputs.status != 'fetched' |
| 54 | + name: 'Building/fetching previous CI target: rocq-core' |
| 55 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr |
| 56 | + job "rocq-core" |
| 57 | + - if: steps.stepCheck.outputs.status != 'fetched' |
| 58 | + name: 'Building/fetching previous CI target: stdlib' |
| 59 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr |
| 60 | + job "stdlib" |
| 61 | + - if: steps.stepCheck.outputs.status != 'fetched' |
| 62 | + name: Building/fetching current CI target |
| 63 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr |
| 64 | + job "parseque" |
| 65 | + rocq-core: |
| 66 | + needs: [] |
| 67 | + runs-on: ubuntu-latest |
| 68 | + steps: |
| 69 | + - name: Determine which commit to initially checkout |
| 70 | + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{ |
| 71 | + github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha |
| 72 | + }}\" >> $GITHUB_ENV\nfi\n" |
| 73 | + - name: Git checkout |
| 74 | + uses: actions/checkout@v4 |
| 75 | + with: |
| 76 | + fetch-depth: 0 |
| 77 | + ref: ${{ env.target_commit }} |
| 78 | + - name: Determine which commit to test |
| 79 | + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{ |
| 80 | + github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url |
| 81 | + }} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git |
| 82 | + merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null |
| 83 | + 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\ |
| 84 | + \ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha |
| 85 | + }}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\ |
| 86 | + \ fi\nfi\n" |
| 87 | + - name: Git checkout |
| 88 | + uses: actions/checkout@v4 |
| 89 | + with: |
| 90 | + fetch-depth: 0 |
| 91 | + ref: ${{ env.tested_commit }} |
| 92 | + - name: Cachix install |
| 93 | + uses: cachix/install-nix-action@v31 |
| 94 | + with: |
| 95 | + nix_path: nixpkgs=channel:nixpkgs-unstable |
| 96 | + - name: Cachix setup coq-community |
| 97 | + uses: cachix/cachix-action@v16 |
| 98 | + with: |
| 99 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 100 | + extraPullNames: coq |
| 101 | + name: coq-community |
| 102 | + - id: stepGetDerivation |
| 103 | + name: Getting derivation for current job (rocq-core) |
| 104 | + run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle |
| 105 | + \"9.1\" --argstr job \"rocq-core\" \\\n --dry-run 2> err > out || (touch |
| 106 | + fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation |
| 107 | + failed\"; exit 1; fi\n" |
| 108 | + - id: stepCheck |
| 109 | + name: Checking presence of CI target for current job |
| 110 | + run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs |
| 111 | + actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\ |
| 112 | + ) ; then\n echo \"waiting a bit for derivations that should be in cache\"\ |
| 113 | + \n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\ |
| 114 | + status=fetched\" >> $GITHUB_OUTPUT\nfi\n" |
| 115 | + - if: steps.stepCheck.outputs.status != 'fetched' |
| 116 | + name: Building/fetching current CI target |
| 117 | + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr |
| 118 | + job "rocq-core" |
| 119 | +name: Nix CI for bundle 9.1 |
| 120 | +on: |
| 121 | + pull_request: |
| 122 | + paths: |
| 123 | + - .github/workflows/nix-action-9.1.yml |
| 124 | + pull_request_target: |
| 125 | + paths-ignore: |
| 126 | + - .github/workflows/nix-action-9.1.yml |
| 127 | + types: |
| 128 | + - opened |
| 129 | + - synchronize |
| 130 | + - reopened |
| 131 | + push: |
| 132 | + branches: |
| 133 | + - master |
0 commit comments