haskell / docker-haskell

MIT License
63 stars 36 forks source link

Add ARM64 processor architecture support #53

Closed AlistairB closed 2 years ago

AlistairB commented 2 years ago

1

Superseeds https://github.com/haskell/docker-haskell/pull/21

To Do

AlistairB commented 2 years ago

Saving a record of what I used for the emulated approach before I squash. This failed because dpkg-architecture was still returning x86_64 when emulated.

  emulated:
    timeout-minutes: 30
    runs-on: ubuntu-latest
    name: ${{ matrix.ghc }}-${{ matrix.deb }}
    strategy:
      fail-fast: false
      matrix:
        ghc: ['9.2.1']
        deb: ['buster']
        include:
          # - ghc: '8.10.7'
          #   ghc_minor: '8.10'
          # - ghc: '9.0.1'
          #   ghc_minor: '9.0'
          - ghc: '9.2.1'
            ghc_minor: '9.2'
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v2
        with:
          repository: docker-library/official-images
          path: official-images
      - name: docker build [${{ matrix.ghc }}]
        uses: uraimo/run-on-arch-action@v2.1.1
        with:
          arch: aarch64
          distro: ${{ matrix.deb }}
          githubToken: ${{ github.token }}
          dockerRunArgs: |
            --volume "${PWD}/official-images:/official-images"
          install: |
            apt-get update
            apt-get install -y curl
            curl -fsSL https://get.docker.com | sh
          run: |
            docker build --pull \
              -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
              ${{ matrix.ghc_minor }}/${{ matrix.deb }}
            echo 'running official tests'
            ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }}
        uses: nick-invision/retry@v1
        with:
          timeout_minutes: 8
          max_attempts: 3
          command: |
            docker build --pull \
              -t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
              ${{ matrix.ghc_minor }}/${{ matrix.deb }}
      - uses: actions/checkout@v2
        with:
          repository: docker-library/official-images
          path: official-images
      - name: run official-images tests
        run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }}