From aecbad94109352d797b835fbf4d9b8e9e09b892a Mon Sep 17 00:00:00 2001 From: michaelwebb76 Date: Tue, 10 Dec 2024 09:37:13 +0000 Subject: [PATCH 1/5] workflow update from gha-workflows --- .github/workflows/haskell-ci.yml | 105 ++++++++++++++++--------------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 7df1d4e..77244a8 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -1,30 +1,34 @@ -name: Haskell CI -on: - - push +# This file is generated by `generate.sh`. +# Generated from https://github.com/bellroy/gha-workflows/tree/master/dhall/workflows/aws-arn/haskell-ci.dhall +# Think twice before editing it directly. jobs: generate-matrix: - name: "Generate matrix from cabal" + name: Generate matrix from cabal outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} + matrix: "${{ steps.set-matrix.outputs.matrix }}" runs-on: ubuntu-20.04 steps: - - name: Extract the tested GHC versions - id: set-matrix - uses: kleidukos/get-tested@a0aa3f2d4ab0d10daa49dc9ee8c706d673fb0e02 + - id: set-matrix + name: Extract the tested GHC versions + uses: "kleidukos/get-tested@a0aa3f2d4ab0d10daa49dc9ee8c706d673fb0e02" with: cabal-file: aws-arn.cabal - ubuntu-version: "20.04" - version: 0.1.7.1 + ubuntu-version: '20.04' + version: '0.1.7.1' + timeout-minutes: 30 tests: - name: ${{ matrix.ghc }} on ${{ matrix.os }} - needs: generate-matrix - runs-on: ${{ matrix.os }} container: image: buildpack-deps:jammy - strategy: - matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} + name: "${{ matrix.ghc }} on ${{ matrix.os }}" + needs: + - generate-matrix + runs-on: "${{ matrix.os }}" steps: - - name: apt + - env: + HCKIND: ghc + HCNAME: "ghc-${{ matrix.ghc }}" + HCVER: "${{ matrix.ghc }}" + name: apt run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 @@ -33,11 +37,11 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - env: + - env: HCKIND: ghc - HCNAME: ghc-${{ matrix.ghc }} - HCVER: ${{ matrix.ghc }} - - name: Set PATH and environment variables + HCNAME: "ghc-${{ matrix.ghc }}" + HCVER: "${{ matrix.ghc }}" + name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH echo "LANG=C.UTF-8" >> "$GITHUB_ENV" @@ -58,13 +62,8 @@ jobs: echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" echo "GHCJSARITH=0" >> "$GITHUB_ENV" - env: - HCKIND: ghc - HCNAME: ghc-${{ matrix.ghc }} - HCVER: ${{ matrix.ghc }} - name: env - run: | - env + run: env - name: write cabal config run: | mkdir -p $CABAL_DIR @@ -80,13 +79,13 @@ jobs: build-summary: $CABAL_DIR/logs/build.log store-dir: $CABAL_DIR/store install-dirs user - prefix: $CABAL_DIR + prefix: $CABAL_DIR repository hackage.haskell.org - url: http://hackage.haskell.org/ + url: http://hackage.haskell.org/ EOF cat >> $CABAL_CONFIG < Date: Tue, 10 Dec 2024 09:56:10 +0000 Subject: [PATCH 2/5] workflow update from gha-workflows --- .github/workflows/haskell-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 77244a8..22f460e 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -79,13 +79,13 @@ jobs: build-summary: $CABAL_DIR/logs/build.log store-dir: $CABAL_DIR/store install-dirs user - prefix: $CABAL_DIR + prefix: $CABAL_DIR repository hackage.haskell.org - url: http://hackage.haskell.org/ + url: http://hackage.haskell.org/ EOF cat >> $CABAL_CONFIG < Date: Tue, 10 Dec 2024 22:03:59 +0000 Subject: [PATCH 3/5] workflow update from gha-workflows --- .github/workflows/haskell-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 22f460e..2ef040f 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -195,6 +195,10 @@ jobs: with: key: "${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}" path: "~/.cabal/store" + strategy: + matrix: + include: + - "${{ fromJSON(needs.generate-matrix.outputs.matrix) }}" timeout-minutes: 30 name: Haskell CI on: From e19ce3d523fe712c6b1642163ee811126fbbc9e8 Mon Sep 17 00:00:00 2001 From: alvinBellroy Date: Tue, 10 Dec 2024 22:10:22 +0000 Subject: [PATCH 4/5] workflow update from gha-workflows --- .github/workflows/haskell-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2ef040f..908f91f 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -198,7 +198,7 @@ jobs: strategy: matrix: include: - - "${{ fromJSON(needs.generate-matrix.outputs.matrix) }}" + - "${{ (fromJSON(needs.generate-matrix.outputs.matrix)).include }}" timeout-minutes: 30 name: Haskell CI on: From 16d633543ca6c4a886a8d43c809dd3e9b4f6d485 Mon Sep 17 00:00:00 2001 From: michaelwebb76 Date: Wed, 11 Dec 2024 12:20:00 +0000 Subject: [PATCH 5/5] workflow update from gha-workflows --- .github/workflows/haskell-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 908f91f..7e9a9cf 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -138,12 +138,12 @@ jobs: find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; - name: generate cabal.project run: | - PKGDIR_aws_arn="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/aws-arn-[0-9.]*')" - echo "PKGDIR_aws_arn=${PKGDIR_aws_arn}" >> "$GITHUB_ENV" + PKGDIR_PROJECT="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/aws-arn-[0-9.]*')" + echo "PKGDIR_PROJECT=${PKGDIR_PROJECT}" >> "$GITHUB_ENV" rm -f cabal.project cabal.project.local touch cabal.project touch cabal.project.local - echo "packages: ${PKGDIR_aws_arn}" >> cabal.project + echo "packages: ${PKGDIR_PROJECT}" >> cabal.project echo "package aws-arn" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <