|
| 1 | +name: Validate Debian |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + paths: |
| 8 | + - '**/buster/Dockerfile' |
| 9 | + - '.github/workflows/debian.yml' |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-smoke-test: |
| 13 | + timeout-minutes: 30 |
| 14 | + runs-on: ubuntu-latest |
| 15 | + name: ${{ matrix.ghc }}-${{ matrix.deb }} |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + ghc: ['8.10.7', '9.0.2', '9.2.1'] |
| 20 | + deb: ['buster'] |
| 21 | + include: |
| 22 | + - ghc: '8.10.7' |
| 23 | + ghc_minor: '8.10' |
| 24 | + - ghc: '9.0.2' |
| 25 | + ghc_minor: '9.0' |
| 26 | + - ghc: '9.2.1' |
| 27 | + ghc_minor: '9.2' |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v2 |
| 30 | + - name: build + smoke test [${{ matrix.ghc }}] |
| 31 | + uses: nick-invision/retry@v2 |
| 32 | + with: |
| 33 | + timeout_minutes: 8 |
| 34 | + max_attempts: 3 |
| 35 | + command: | |
| 36 | + docker build --pull \ |
| 37 | + -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \ |
| 38 | + ${{ matrix.ghc_minor }}/${{ matrix.deb }} |
| 39 | + - uses: actions/checkout@v2 |
| 40 | + with: |
| 41 | + repository: AlistairB/official-images |
| 42 | + ref: haskell-sh |
| 43 | + path: official-images |
| 44 | + - name: run official-images tests |
| 45 | + run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }} |
| 46 | + |
| 47 | + # disable while I play |
| 48 | + |
| 49 | + # emulated-architecture-tests: |
| 50 | + # timeout-minutes: 60 |
| 51 | + # runs-on: ubuntu-latest |
| 52 | + # name: ${{ matrix.arch }}-${{ matrix.ghc }}-${{ matrix.deb }} |
| 53 | + # strategy: |
| 54 | + # fail-fast: false |
| 55 | + # matrix: |
| 56 | + # ghc: ['8.10.7', '9.0.2', '9.2.1'] |
| 57 | + # deb: ['buster'] |
| 58 | + # arch: ['aarch64'] |
| 59 | + # include: |
| 60 | + # - ghc: '8.10.7' |
| 61 | + # ghc_minor: '8.10' |
| 62 | + # - ghc: '9.0.2' |
| 63 | + # ghc_minor: '9.0' |
| 64 | + # - ghc: '9.2.1' |
| 65 | + # ghc_minor: '9.2' |
| 66 | + # - arch: aarch64 |
| 67 | + # docker_platform: arm64 |
| 68 | + # steps: |
| 69 | + # - uses: actions/checkout@v2 |
| 70 | + # - name: docker build [ ${{ matrix.arch }} ${{ matrix.ghc }}] |
| 71 | + # uses: uraimo/run-on-arch-action@e9117b926d001f8683802c315b5a134f8c5da3d3 |
| 72 | + # with: |
| 73 | + # arch: ${{ matrix.arch }} |
| 74 | + # distro: ${{ matrix.deb }} |
| 75 | + # githubToken: ${{ github.token }} |
| 76 | + # install: | |
| 77 | + # apt-get update |
| 78 | + # apt-get install -y curl |
| 79 | + # curl -fsSL https://get.docker.com | sh |
| 80 | + # run: | |
| 81 | + # docker build --pull \ |
| 82 | + # --platform "linux/${{ matrix.docker_platform }}" \ |
| 83 | + # -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \ |
| 84 | + # ${{ matrix.ghc_minor }}/${{ matrix.deb }} |
| 85 | + # echo 'testing..' |
| 86 | + # docker run \ |
| 87 | + # --platform "linux/${{ matrix.docker_platform }}" \ |
| 88 | + # -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \ |
| 89 | + # bash -c "cabal update && cabal install --lib hashable" |
| 90 | + # docker run \ |
| 91 | + # --platform "linux/${{ matrix.docker_platform }}" \ |
| 92 | + # -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \ |
| 93 | + # bash -c "echo | ghci" |
| 94 | + |
| 95 | +# Running the official tests does not work as we need to hardcode the plaform due to the emulated nature. |
| 96 | +# This solution is fairly hacky, but gets us most of benefit of the official tests. |
0 commit comments