Skip to content

Commit

Permalink
CI bumps: ghc 9.10, action versions, Agda to 2.6.4.3 (#2398)
Browse files Browse the repository at this point in the history
* Haskell CI (for GenerateEverything) and dependencies bumped to GHC 9.10.1

* CI: bump some versions, satisfy some shellcheck complaints
  • Loading branch information
andreasabel committed Jul 10, 2024
1 parent 2ac71e5 commit db84b73
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 64 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/ci-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ jobs:
if [[ '${{ github.ref }}' == 'refs/heads/experimental' \
|| '${{ github.base_ref }}' == 'experimental' ]]; then
# Pick Agda version for experimental
echo "AGDA_COMMIT=4d36cb37f8bfb765339b808b13356d760aa6f0ec" >> $GITHUB_ENV;
echo "AGDA_HTML_DIR=html/experimental" >> $GITHUB_ENV
echo "AGDA_COMMIT=4d36cb37f8bfb765339b808b13356d760aa6f0ec" >> "${GITHUB_ENV}";
echo "AGDA_HTML_DIR=html/experimental" >> "${GITHUB_ENV}"
else
# Pick Agda version for master
echo "AGDA_COMMIT=tags/v2.6.4.1" >> $GITHUB_ENV;
echo "AGDA_HTML_DIR=html/master" >> $GITHUB_ENV
echo "AGDA_COMMIT=tags/v2.6.4.3" >> "${GITHUB_ENV}";
echo "AGDA_HTML_DIR=html/master" >> "${GITHUB_ENV}"
fi
if [[ '${{ github.ref }}' == 'refs/heads/master' \
|| '${{ github.ref }}' == 'refs/heads/experimental' ]]; then
echo "AGDA_DEPLOY=true" >> $GITHUB_ENV
echo "AGDA_DEPLOY=true" >> "${GITHUB_ENV}"
fi
########################################################################
Expand All @@ -98,7 +98,7 @@ jobs:
# i.e. if we change either the version of Agda, ghc, or cabal that we want
# to use for the build.
- name: Cache ~/.cabal directories
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-cabal
with:
path: |
Expand All @@ -113,16 +113,14 @@ jobs:
########################################################################

- name: Install ghc & cabal
uses: haskell/actions/setup@v1
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ env.GHC_VERSION }}
cabal-version: ${{ env.CABAL_VERSION }}
cabal-update: true

- name: Put cabal programs in PATH
run: echo "~/.cabal/bin" >> $GITHUB_PATH

- name: Cabal update
run: cabal update
run: echo "~/.cabal/bin" >> "${GITHUB_PATH}"

- name: Install alex & happy
if: steps.cache-cabal.outputs.cache-hit != 'true'
Expand All @@ -147,7 +145,7 @@ jobs:

# By default github actions do not pull the repo
- name: Checkout stdlib
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Test stdlib
run: |
Expand Down Expand Up @@ -191,7 +189,7 @@ jobs:
- name: Deploy HTML
uses: JamesIves/github-pages-deploy-action@4.1.3
if: ${{ success() && env.AGDA_DEPLOY }}
if: success() && env.AGDA_DEPLOY

with:
branch: gh-pages
Expand Down
78 changes: 32 additions & 46 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.17.20231010
# version: 0.19.20240514
#
# REGENDATA ("0.17.20231010",["github","--no-cabal-check","agda-stdlib-utils.cabal"])
# REGENDATA ("0.19.20240514",["github","--no-cabal-check","agda-stdlib-utils.cabal"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -40,24 +40,29 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand All @@ -78,34 +83,24 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
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.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
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.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -117,22 +112,13 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -189,7 +175,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -217,15 +203,15 @@ jobs:
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(agda-stdlib-utils)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(agda-stdlib-utils)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -248,7 +234,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
11 changes: 6 additions & 5 deletions agda-stdlib-utils.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ description: Helper programs for setting up the Agda standard library.
license: MIT

tested-with:
GHC == 9.8.1
GHC == 9.6.3
GHC == 9.4.7
GHC == 9.10.1
GHC == 9.8.2
GHC == 9.6.5
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
GHC == 8.10.7
Expand All @@ -23,7 +24,7 @@ common common-build-parameters
PatternSynonyms

build-depends:
base >= 4.12.0.0 && < 4.20
base >= 4.12.0.0 && < 4.21
, filemanip >= 0.3.6.2 && < 0.4

executable GenerateEverything
Expand All @@ -33,7 +34,7 @@ executable GenerateEverything

build-depends:
directory >= 1.0.0.0 && < 1.4
, filepath >= 1.4.1.0 && < 1.5
, filepath >= 1.4.1.0 && < 1.6
, mtl >= 2.2.2 && < 2.4

executable AllNonAsciiChars
Expand Down

0 comments on commit db84b73

Please sign in to comment.