|
| 1 | +name: "Release testing, Hackage, Cabal, Linux" |
| 2 | + |
| 3 | +on: |
| 4 | + release: |
| 5 | + # created: a draft is saved, or a release or pre-release is published without previously being saved as a draft |
| 6 | + types: [ created ] |
| 7 | + |
| 8 | +jobs: |
| 9 | + |
| 10 | + build10: |
| 11 | + name: "GHC" |
| 12 | + runs-on: ubuntu-latest |
| 13 | + continue-on-error: true |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + packageRoot: [ hnix-store-core, hnix-store-remote ] |
| 17 | + # Since CI by default tests boundary GHCs, test middle versions of GHCs |
| 18 | + ghc: [ "8.8", "8.6"] |
| 19 | + defaults: |
| 20 | + run: |
| 21 | + working-directory: "./${{ matrix.packageRoot }}" |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + with: |
| 25 | + submodules: recursive |
| 26 | + - name: Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle |
| 27 | + uses: actions/cache@v2 |
| 28 | + with: |
| 29 | + path: | |
| 30 | + ~/.cabal/packages |
| 31 | + ~/.cabal/store |
| 32 | + dist-newstyle |
| 33 | + key: ${{ runner.os }}-Cabal-${{ matrix.ghc }} |
| 34 | + - uses: haskell/actions/setup@v1 |
| 35 | + with: |
| 36 | + ghc-version: ${{ matrix.ghc }} |
| 37 | + - name: "Install additional system packages" |
| 38 | + run: sudo apt install libsodium-dev |
| 39 | + - run: cabal v2-install tasty-discover |
| 40 | + - name: "Install Nix" |
| 41 | + # Still required for Store-remote test suite run |
| 42 | + uses: cachix/install-nix-action@v12 |
| 43 | + if: matrix.packageRoot == 'hnix-store-remote' |
| 44 | + - run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic |
| 45 | + if: matrix.packageRoot == 'hnix-store-core' |
| 46 | + - run: | |
| 47 | + cabal v2-configure --disable-optimization --enable-tests --enable-deterministic \ |
| 48 | + -f io-testsuite # Enable the Store-remote test suite |
| 49 | + if: matrix.packageRoot == 'hnix-store-remote' |
| 50 | + - run: cabal v2-build |
| 51 | + - run: cabal v2-test |
0 commit comments