From 168bb7e8bc9a0f5022839fa70650986454085336 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Wed, 29 Nov 2023 08:07:47 -0500 Subject: [PATCH] 32-bit Linux CI --- .github/workflows/i386.yaml | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/i386.yaml diff --git a/.github/workflows/i386.yaml b/.github/workflows/i386.yaml new file mode 100644 index 0000000..e976175 --- /dev/null +++ b/.github/workflows/i386.yaml @@ -0,0 +1,73 @@ +name: ci-i386 + +on: + push: + branches: [master] + pull_request: + +env: + # The CACHE_VERSION can be updated to force the use of a new cache if + # the current cache contents become corrupted/invalid. This can + # sometimes happen when (for example) the OS version is changed but + # older .so files are cached, which can have various effects + # (e.g. cabal complains it can't find a valid version of the "happy" + # tool). + CACHE_VERSION: 1 + +jobs: + build: + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + container: + image: i386/ubuntu:22.04 + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04] + ghc-version: [ "9.2.8" ] + cabal: [ '3.10.2.0' ] + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - uses: haskell/actions/setup@v2 + id: setup-haskell + with: + ghc-version: ${{ matrix.ghc-version }} + cabal-version: ${{ matrix.cabal }} + + - uses: actions/cache/restore@v3 + name: Restore cabal store cache + with: + path: | + ${{ steps.setup-haskell.outputs.cabal-store }} + dist-newstyle + key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc-version }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc-version)) }}-${{ github.sha }} + restore-keys: | + ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc-version }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc-version)) }}- + + - shell: bash + name: Update + run: cabal update + + - shell: bash + name: Configure + run: cabal configure --enable-tests -j2 all + + - shell: bash + name: Build library + run: cabal build + + - shell: bash + name: Run tests + run: cabal test + + - uses: actions/cache/save@v3 + name: Save cabal store cache + if: always() + with: + path: | + ${{ steps.setup-haskell.outputs.cabal-store }} + dist-newstyle + key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc-version }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc-version)) }}-${{ github.sha }}