From 0baac6af44c098017fcd094616ee38c949135435 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Sun, 15 Dec 2024 16:49:28 +0000 Subject: [PATCH] Build ARM instead of i386 on CI to test 32 bit build (and 64 bit ARM as a bonus) --- .github/workflows/haskell-ci.yaml | 73 ++++++++----------------------- 1 file changed, 19 insertions(+), 54 deletions(-) diff --git a/.github/workflows/haskell-ci.yaml b/.github/workflows/haskell-ci.yaml index 1a4f108..d2bd4b8 100644 --- a/.github/workflows/haskell-ci.yaml +++ b/.github/workflows/haskell-ci.yaml @@ -87,61 +87,26 @@ jobs: cabal test --project-file "$project_file" --constraint "atomic-counter +no-cmm" --test-show-details=direct all cabal bench --project-file "$project_file" --constraint "atomic-counter +no-cmm" --benchmark-options='--stdev 100 --timeout 100' all - i386: + emulated: runs-on: ubuntu-latest - container: - image: i386/ubuntu:bionic - strategy: - fail-fast: false + fail-fast: true matrix: - os: [ubuntu-latest] - ghc: - - "8.6" - - "8.8" - - "8.10" - - "9.0" - - "9.2" - - "9.4" - - "9.6" - + arch: ['armv7', 'aarch64'] steps: - - name: Install - run: | - apt-get update -y - apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev - - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh - - source ~/.ghcup/env - ghcup install ghc --set ${{ matrix.ghc }} - ghcup install cabal latest - - # This version must stay old enough to remain compatible with the container image. - - uses: actions/checkout@v1 - - - name: Cabal version - run: | - source ~/.ghcup/env - cabal --version - - name: Unpack - run: | - source ~/.ghcup/env - cabal update - - cabal sdist --ignore-project --output-directory .. - cd .. - cabal get atomic-counter-*.tar.gz -d default - - - name: Build & Test default - run: | - source ~/.ghcup/env - cabal update - project_file="$(pwd)/cabal.project.ci" - - cd ../default/atomic-counter-*/ - cabal build --project-file "$project_file" all - cabal test --project-file "$project_file" --test-show-details=direct all - - cabal bench --project-file "$project_file" --benchmark-options='--stdev 100 --timeout 100' all - + - uses: actions/checkout@v4 + - uses: uraimo/run-on-arch-action@v2 + timeout-minutes: 60 + with: + arch: ${{ matrix.arch }} + distro: ubuntu_rolling + githubToken: ${{ github.token }} + install: | + apt-get update -y + apt-get install -y curl ghc cabal-install libghc-tasty-quickcheck-dev libghc-tasty-hunit-dev + run: | + project_file="$(pwd)/cabal.project.ci" + cabal update + cabal build --project-file "$project_file" --constraint "atomic-counter +no-cmm" all + cabal test --project-file "$project_file" --constraint "atomic-counter +no-cmm" --test-show-details=direct all + cabal bench --project-file "$project_file" --constraint "atomic-counter +no-cmm" --benchmark-options='--stdev 100 --timeout 100' all