|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: nix CI |
| 4 | + |
| 5 | +# Controls when the action will run. Triggers the workflow on push or pull request |
| 6 | +# events but only for the master branch |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: [ master ] |
| 10 | + pull_request: |
| 11 | + branches: [ master ] |
| 12 | + |
| 13 | +jobs: |
| 14 | + hb: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + bundle: [ "coq-8.13", "coq-8.12", "coq-8.11" ] |
| 20 | + steps: |
| 21 | + - name: Cachix install |
| 22 | + uses: cachix/install-nix-action@v12 |
| 23 | + - name: Cachix setup |
| 24 | + uses: cachix/cachix-action@v8 |
| 25 | + with: |
| 26 | + name: math-comp |
| 27 | + extraPullNames: coq |
| 28 | + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' |
| 29 | + - name: Git checkout |
| 30 | + uses: actions/checkout@v2 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + - name: Dependencies |
| 34 | + run: nix-build --argstr job "_deps" --argstr bundle ${{ matrix.bundle }} |
| 35 | + - name: Build HB |
| 36 | + run: nix-build --argstr job "hierarchy-builder" --argstr bundle ${{ matrix.bundle }} |
| 37 | + |
| 38 | + hb-shim: |
| 39 | + runs-on: ubuntu-latest |
| 40 | + strategy: |
| 41 | + matrix: |
| 42 | + bundle: [ "coq-8.13" ] |
| 43 | + steps: |
| 44 | + - name: Cachix install |
| 45 | + uses: cachix/install-nix-action@v12 |
| 46 | + - name: Cachix setup |
| 47 | + uses: cachix/cachix-action@v8 |
| 48 | + with: |
| 49 | + name: math-comp |
| 50 | + extraPullNames: coq |
| 51 | + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' |
| 52 | + - name: Git checkout |
| 53 | + uses: actions/checkout@v2 |
| 54 | + with: |
| 55 | + fetch-depth: 0 |
| 56 | + - name: Dependencies |
| 57 | + run: nix-build --argstr job "_deps" --argstr bundle ${{ matrix.bundle }} |
| 58 | + - name: Build HB shim |
| 59 | + run: nix-build --argstr job "hierarchy-builder-shim" --argstr bundle ${{ matrix.bundle }} |
| 60 | + |
| 61 | + mathcomp: |
| 62 | + runs-on: ubuntu-latest |
| 63 | + needs: hb |
| 64 | + if: always() |
| 65 | + strategy: |
| 66 | + fail-fast: false |
| 67 | + matrix: |
| 68 | + bundle: [ "coq-8.13", "coq-8.12", "coq-8.11" ] |
| 69 | + steps: |
| 70 | + - name: Cachix install |
| 71 | + uses: cachix/install-nix-action@v12 |
| 72 | + - name: Cachix setup |
| 73 | + uses: cachix/cachix-action@v8 |
| 74 | + with: |
| 75 | + name: math-comp |
| 76 | + extraPullNames: coq |
| 77 | + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' |
| 78 | + - name: Git checkout |
| 79 | + uses: actions/checkout@v2 |
| 80 | + with: |
| 81 | + fetch-depth: 0 |
| 82 | + - name: Dependencies |
| 83 | + run: nix-build --argstr job "_deps" --argstr bundle ${{ matrix.bundle }} |
| 84 | + - name: Hiearchy builder |
| 85 | + run: nix-build --argstr job "hierarchy-builder" --argstr bundle ${{ matrix.bundle }} |
| 86 | + - name: Build mathcomp on HB |
| 87 | + run: nix-build --argstr job "mathcomp-single" --argstr bundle ${{ matrix.bundle }} |
| 88 | + |
| 89 | + mathcomp-planB-src: |
| 90 | + runs-on: ubuntu-latest |
| 91 | + needs: hb |
| 92 | + if: always() |
| 93 | + strategy: |
| 94 | + matrix: |
| 95 | + bundle: [ "coq-8.13" ] |
| 96 | + steps: |
| 97 | + - name: Cachix install |
| 98 | + uses: cachix/install-nix-action@v12 |
| 99 | + - name: Cachix setup |
| 100 | + uses: cachix/cachix-action@v8 |
| 101 | + with: |
| 102 | + name: math-comp |
| 103 | + extraPullNames: coq |
| 104 | + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' |
| 105 | + - name: Git checkout |
| 106 | + uses: actions/checkout@v2 |
| 107 | + with: |
| 108 | + fetch-depth: 0 |
| 109 | + - name: Dependencies |
| 110 | + run: nix-build --argstr job "_deps" --argstr bundle ${{ matrix.bundle }} |
| 111 | + - name: Hiearchy builder |
| 112 | + run: nix-build --argstr job "hierarchy-builder" --argstr bundle ${{ matrix.bundle }} |
| 113 | + - name: Build planB sources |
| 114 | + run: nix-build --argstr job "mathcomp-single-planB-src" --argstr bundle ${{ matrix.bundle }} |
| 115 | + - name: Save planB sources as a GH artifact |
| 116 | + uses: actions/upload-artifact@v2 |
| 117 | + with: |
| 118 | + name: planB-sources |
| 119 | + path: | |
| 120 | + result/mathcomp |
| 121 | + ! result/**/*.vo |
| 122 | +
|
| 123 | + mathcomp-planB: |
| 124 | + runs-on: ubuntu-latest |
| 125 | + if: always() |
| 126 | + strategy: |
| 127 | + matrix: |
| 128 | + bundle: [ "coq-8.13" ] |
| 129 | + needs: |
| 130 | + - hb-shim |
| 131 | + - mathcomp-planB-src |
| 132 | + steps: |
| 133 | + - name: Cachix install |
| 134 | + uses: cachix/install-nix-action@v12 |
| 135 | + - name: Cachix setup |
| 136 | + uses: cachix/cachix-action@v8 |
| 137 | + with: |
| 138 | + name: math-comp |
| 139 | + extraPullNames: coq |
| 140 | + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' |
| 141 | + - name: Git checkout |
| 142 | + uses: actions/checkout@v2 |
| 143 | + with: |
| 144 | + fetch-depth: 0 |
| 145 | + - name: Dependencies |
| 146 | + run: nix-build --argstr job "_deps" --argstr bundle ${{ matrix.bundle }} |
| 147 | + - name: Hiearchy builder |
| 148 | + run: nix-build --argstr job "hierarchy-builder-shim" --argstr bundle ${{ matrix.bundle }} |
| 149 | + - name: Build plan B sources |
| 150 | + run: nix-build --argstr job "mathcomp-single-planB-src" --argstr bundle ${{ matrix.bundle }} |
| 151 | + - name: Build plan B |
| 152 | + run: nix-build --argstr job "mathcomp-single-planB" --argstr bundle ${{ matrix.bundle }} |
0 commit comments