diff --git a/fixtures/matrix-extra-toomany.args b/fixtures/matrix-extra-toomany.args new file mode 100644 index 00000000..6b69595d --- /dev/null +++ b/fixtures/matrix-extra-toomany.args @@ -0,0 +1,2 @@ +--matrix-extra=abc:1,2,3 +--matrix-extra=foo:bar,baz diff --git a/fixtures/matrix-extra-toomany.bash b/fixtures/matrix-extra-toomany.bash new file mode 100644 index 00000000..51b97e1e --- /dev/null +++ b/fixtures/matrix-extra-toomany.bash @@ -0,0 +1,520 @@ +# SUCCESS +# *INFO* Generating Bash script for testing for GHC versions: 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.6.1 9.6.2 9.6.3 9.6.4 9.6.5 9.6.6 9.6.7 9.8.1 9.8.2 9.8.3 9.8.4 9.10.1 9.10.2 9.12.1 9.12.2 ghcjs-8.4 +#!/bin/bash +# shellcheck disable=SC2086,SC2016,SC2046 +# REGENDATA ["--matrix-extra=abc:1,2,3","--matrix-extra=foo:bar,baz","bash","matrix-extra-toomany.project"] + +set -o pipefail + +# Mode +############################################################################## + +if [ "$1" = "indocker" ]; then + INDOCKER=true + shift +else + INDOCKER=false +fi + +# Run configuration +############################################################################## + +CFG_CABAL_STORE_CACHE="" +CFG_CABAL_REPO_CACHE="" +CFG_JOBS="9.12.2 9.12.1 9.10.2 9.10.1 9.8.4 9.8.3 9.8.2 9.8.1 9.6.7 9.6.6 9.6.5 9.6.4 9.6.3 9.6.2 9.6.1 9.4.8 9.4.7 9.4.6 9.4.5 9.4.4 9.4.3 9.4.2 9.4.1 9.2.8 9.2.7 9.2.6 9.2.5 9.2.4 9.2.3 9.2.2 9.2.1 9.0.2 9.0.1 8.10.7 8.10.6 8.10.5 8.10.4 8.10.3 8.10.2 8.10.1 8.8.4 8.8.3 8.8.2 8.8.1 8.6.5 8.6.4 8.6.3 8.6.2 8.6.1 8.4.4 8.4.3 8.4.2 8.4.1 8.2.2 8.2.1 8.0.2 8.0.1" +CFG_CABAL_UPDATE=false + +SCRIPT_NAME=$(basename "$0") +START_TIME="$(date +'%s')" + +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} + +# Job configuration +############################################################################## + +GHC_VERSION="non-existing" +CABAL_VERSION=3.2 +HEADHACKAGE=false + +# Locale +############################################################################## + +export LC_ALL=C.UTF-8 + +# Utilities +############################################################################## + +SGR_RED='\033[1;31m' +SGR_GREEN='\033[1;32m' +SGR_BLUE='\033[1;34m' +SGR_CYAN='\033[1;96m' +SGR_RESET='\033[0m' # No Color + +put_info() { + printf "$SGR_CYAN%s$SGR_RESET\n" "### $*" +} + +put_error() { + printf "$SGR_RED%s$SGR_RESET\n" "!!! $*" +} + +run_cmd() { + local PRETTYCMD="$*" + local PROMPT + if $INDOCKER; then + PROMPT="$(pwd) >>>" + else + PROMPT=">>>" + fi + + printf "$SGR_BLUE%s %s$SGR_RESET\n" "$PROMPT" "$PRETTYCMD" + + local start_time end_time cmd_duration total_duration + start_time=$(date +'%s') + + "$@" + local RET=$? + + end_time=$(date +'%s') + cmd_duration=$((end_time - start_time)) + total_duration=$((end_time - START_TIME)) + + cmd_min=$((cmd_duration / 60)) + cmd_sec=$((cmd_duration % 60)) + + total_min=$((total_duration / 60)) + total_sec=$((total_duration % 60)) + + if [ $RET -eq 0 ]; then + printf "$SGR_GREEN%s$SGR_RESET (%dm%02ds; %dm%02ds)\n" "<<< $PRETTYCMD" "$cmd_min" "$cmd_sec" "$total_min" "$total_sec" + else + printf "$SGR_RED%s$SGR_RESET\n" "!!! $PRETTYCMD" + exit 1 + fi +} + +run_cmd_if() { + local COND=$1 + shift + + if [ $COND -eq 1 ]; then + run_cmd "$@" + else + local PRETTYCMD="$*" + local PROMPT + PROMPT="$(pwd) (skipping) >>>" + + printf "$SGR_BLUE%s %s$SGR_RESET\n" "$PROMPT" "$PRETTYCMD" + fi +} + +run_cmd_unchecked() { + local PRETTYCMD="$*" + local PROMPT + if $INDOCKER; then + PROMPT="$(pwd) >>>" + else + PROMPT=">>>" + fi + + printf "$SGR_BLUE%s %s$SGR_RESET\n" "$PROMPT" "$PRETTYCMD" + + local start_time end_time cmd_duration total_duration cmd_min cmd_sec total_min total_sec + start_time=$(date +'%s') + + "$@" + + end_time=$(date +'%s') + cmd_duration=$((end_time - start_time)) + total_duration=$((end_time - START_TIME)) + + cmd_min=$((cmd_duration / 60)) + cmd_sec=$((cmd_duration % 60)) + + total_min=$((total_duration / 60)) + total_sec=$((total_duration % 60)) + + printf "$SGR_GREEN%s$SGR_RESET (%dm%02ds; %dm%02ds)\n" "<<< $PRETTYCMD" "$cmd_min" "$cmd_sec" "$total_min" "$total_sec" +} + +change_dir() { + local DIR=$1 + if [ -d "$DIR" ]; then + printf "$SGR_BLUE%s$SGR_RESET\n" "change directory to $DIR" + cd "$DIR" || exit 1 + else + printf "$SGR_RED%s$SGR_RESET\n" "!!! cd $DIR" + exit 1 + fi +} + +change_dir_if() { + local COND=$1 + local DIR=$2 + + if [ $COND -ne 0 ]; then + change_dir "$DIR" + fi +} + +echo_to() { + local DEST=$1 + local CONTENTS=$2 + + echo "$CONTENTS" >> "$DEST" +} + +echo_if_to() { + local COND=$1 + local DEST=$2 + local CONTENTS=$3 + + if [ $COND -ne 0 ]; then + echo_to "$DEST" "$CONTENTS" + fi +} + +install_cabalplan() { + put_info "installing cabal-plan" + + if [ ! -e $CABAL_REPOCACHE/downloads/cabal-plan ]; then + curl -L https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > /tmp/cabal-plan.xz || exit 1 + (cd /tmp && echo "de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz" | sha256sum -c -)|| exit 1 + mkdir -p $CABAL_REPOCACHE/downloads + xz -d < /tmp/cabal-plan.xz > $CABAL_REPOCACHE/downloads/cabal-plan || exit 1 + chmod a+x $CABAL_REPOCACHE/downloads/cabal-plan || exit 1 + fi + + mkdir -p $CABAL_DIR/bin || exit 1 + ln -s $CABAL_REPOCACHE/downloads/cabal-plan $CABAL_DIR/bin/cabal-plan || exit 1 +} + +# Help +############################################################################## + +show_usage() { +cat < $BUILDDIR/cabal/config <= 80200)) cabal.project "package splitmix" +echo_if_to $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) cabal.project " ghc-options: -Werror=missing-methods" +cat >> cabal.project <> cabal.project.local +run_cmd cat cabal.project +run_cmd cat cabal.project.local + +# dump install plan +put_info "dump install plan" +run_cmd $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all +run_cmd cabal-plan + +# install dependencies +put_info "install dependencies" +run_cmd $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j all +run_cmd $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j all + +# build w/o tests +put_info "build w/o tests" +run_cmd $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + +# build +put_info "build" +run_cmd $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all + +# tests +put_info "tests" +run_cmd_if $((! GHCJSARITH)) $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct + +# cabal check +put_info "cabal check" +change_dir "${PKGDIR_splitmix}" +run_cmd ${CABAL} -vnormal check +change_dir "$BUILDDIR" + +# haddock +put_info "haddock" +run_cmd_if $((! GHCJSARITH)) $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + +# unconstrained build +put_info "unconstrained build" +run_cmd rm -f cabal.project.local +run_cmd $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + + +# Done +run_cmd echo OK diff --git a/fixtures/matrix-extra-toomany.github b/fixtures/matrix-extra-toomany.github new file mode 100644 index 00000000..b1f0f5ea --- /dev/null +++ b/fixtures/matrix-extra-toomany.github @@ -0,0 +1,2 @@ +# FAILURE +# *ERROR* The matrix has 342 jobs, exceeding the limit of 256. diff --git a/fixtures/matrix-extra-toomany.project b/fixtures/matrix-extra-toomany.project new file mode 100644 index 00000000..b1f6a74e --- /dev/null +++ b/fixtures/matrix-extra-toomany.project @@ -0,0 +1 @@ +packages: splitmix diff --git a/fixtures/matrix-extra-toomany.travis b/fixtures/matrix-extra-toomany.travis new file mode 100644 index 00000000..c70073f4 --- /dev/null +++ b/fixtures/matrix-extra-toomany.travis @@ -0,0 +1,298 @@ +# SUCCESS +# *INFO* Generating Travis-CI config for testing for GHC versions: 7.0.1 7.0.2 7.0.3 7.0.4 7.2.1 7.2.2 7.4.1 7.4.2 7.6.1 7.6.2 7.6.3 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.4.1 9.4.2 ghcjs-8.4 +# This Travis job script has been generated by a script via +# +# haskell-ci '--matrix-extra=abc:1,2,3' '--matrix-extra=foo:bar,baz' 'travis' 'matrix-extra-toomany.project' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +version: ~> 1.0 +language: c +os: linux +dist: bionic +git: + # whether to recursively clone submodules + submodules: false +cache: + directories: + - $HOME/.cabal/packages + - $HOME/.cabal/store + - $HOME/.hlint +before_cache: + - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log + # remove files that are regenerated by 'cabal update' + - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.* + - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx + - rm -rfv $CABALHOME/packages/head.hackage +jobs: + include: + - compiler: ghcjs-8.4 + addons: {"apt":{"packages":["ghcjs-8.4","cabal-install-3.4","ghc-8.4.4","nodejs"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"},{"sourceline":"deb http://ppa.launchpad.net/hvr/ghcjs/ubuntu bionic main"},{"key_url":"https://deb.nodesource.com/gpgkey/nodesource.gpg.key","sourceline":"deb https://deb.nodesource.com/node_10.x bionic main"}]}} + os: linux + - compiler: ghc-9.4.2 + addons: {"apt":{"packages":["ghc-9.4.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.4.1 + addons: {"apt":{"packages":["ghc-9.4.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.4 + addons: {"apt":{"packages":["ghc-9.2.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.3 + addons: {"apt":{"packages":["ghc-9.2.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.2 + addons: {"apt":{"packages":["ghc-9.2.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.1 + addons: {"apt":{"packages":["ghc-9.2.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.0.2 + addons: {"apt":{"packages":["ghc-9.0.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.0.1 + addons: {"apt":{"packages":["ghc-9.0.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.7 + addons: {"apt":{"packages":["ghc-8.10.7","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.6 + addons: {"apt":{"packages":["ghc-8.10.6","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.5 + addons: {"apt":{"packages":["ghc-8.10.5","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.4 + addons: {"apt":{"packages":["ghc-8.10.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.3 + addons: {"apt":{"packages":["ghc-8.10.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.2 + addons: {"apt":{"packages":["ghc-8.10.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.1 + addons: {"apt":{"packages":["ghc-8.10.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.4 + addons: {"apt":{"packages":["ghc-8.8.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.3 + addons: {"apt":{"packages":["ghc-8.8.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.2 + addons: {"apt":{"packages":["ghc-8.8.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.1 + addons: {"apt":{"packages":["ghc-8.8.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.5 + addons: {"apt":{"packages":["ghc-8.6.5","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.4 + addons: {"apt":{"packages":["ghc-8.6.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.3 + addons: {"apt":{"packages":["ghc-8.6.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.2 + addons: {"apt":{"packages":["ghc-8.6.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.1 + addons: {"apt":{"packages":["ghc-8.6.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.4 + addons: {"apt":{"packages":["ghc-8.4.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.3 + addons: {"apt":{"packages":["ghc-8.4.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.2 + addons: {"apt":{"packages":["ghc-8.4.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.1 + addons: {"apt":{"packages":["ghc-8.4.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.2.2 + addons: {"apt":{"packages":["ghc-8.2.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.2.1 + addons: {"apt":{"packages":["ghc-8.2.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.0.2 + addons: {"apt":{"packages":["ghc-8.0.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.0.1 + addons: {"apt":{"packages":["ghc-8.0.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.10.3 + addons: {"apt":{"packages":["ghc-7.10.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.10.2 + addons: {"apt":{"packages":["ghc-7.10.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.10.1 + addons: {"apt":{"packages":["ghc-7.10.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.4 + addons: {"apt":{"packages":["ghc-7.8.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.3 + addons: {"apt":{"packages":["ghc-7.8.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.2 + addons: {"apt":{"packages":["ghc-7.8.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.1 + addons: {"apt":{"packages":["ghc-7.8.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.6.3 + addons: {"apt":{"packages":["ghc-7.6.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.6.2 + addons: {"apt":{"packages":["ghc-7.6.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.6.1 + addons: {"apt":{"packages":["ghc-7.6.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.4.2 + addons: {"apt":{"packages":["ghc-7.4.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.4.1 + addons: {"apt":{"packages":["ghc-7.4.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.2.2 + addons: {"apt":{"packages":["ghc-7.2.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.2.1 + addons: {"apt":{"packages":["ghc-7.2.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.4 + addons: {"apt":{"packages":["ghc-7.0.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.3 + addons: {"apt":{"packages":["ghc-7.0.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.2 + addons: {"apt":{"packages":["ghc-7.0.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.1 + addons: {"apt":{"packages":["ghc-7.0.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux +before_install: + - | + if echo $CC | grep -q ghcjs; then + GHCJS=true; GHCJSARITH=1; + else + GHCJS=false; GHCJSARITH=0; + fi + - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//') + - WITHCOMPILER="-w $HC" + - if [ $((GHCJSARITH)) -ne 0 ] ; then HC=${HC}js ; fi + - if [ $((GHCJSARITH)) -ne 0 ] ; then WITHCOMPILER="--ghcjs ${WITHCOMPILER}js" ; fi + - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//') + - if [ $((GHCJSARITH)) -ne 0 ] ; then PATH="/opt/ghc/8.4.4/bin:$PATH" ; fi + - HCPKG="$HC-pkg" + - unset CC + - CABAL=/opt/ghc/bin/cabal + - CABALHOME=$HOME/.cabal + - export PATH="$CABALHOME/bin:$PATH" + - TOP=$(pwd) + - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')" + - echo $HCNUMVER + - CABAL="$CABAL -vnormal+nowrap" + - set -o pipefail + - TEST=--enable-tests + - BENCH=--enable-benchmarks + - HEADHACKAGE=false + - rm -f $CABALHOME/config + - | + echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config + echo "remote-build-reporting: anonymous" >> $CABALHOME/config + echo "write-ghc-environment-files: never" >> $CABALHOME/config + echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config + echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config + echo "world-file: $CABALHOME/world" >> $CABALHOME/config + echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config + echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config + echo "installdir: $CABALHOME/bin" >> $CABALHOME/config + echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config + echo "store-dir: $CABALHOME/store" >> $CABALHOME/config + echo "install-dirs user" >> $CABALHOME/config + echo " prefix: $CABALHOME" >> $CABALHOME/config + echo "repository hackage.haskell.org" >> $CABALHOME/config + echo " url: http://hackage.haskell.org/" >> $CABALHOME/config +install: + - ${CABAL} --version + - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" + - node --version + - echo $GHCJS + - | + echo "program-default-options" >> $CABALHOME/config + echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config + - cat $CABALHOME/config + - rm -fv cabal.project cabal.project.local cabal.project.freeze + - travis_retry ${CABAL} v2-update -v + # Generate cabal.project + - rm -rf cabal.project cabal.project.local cabal.project.freeze + - touch cabal.project + - | + echo "packages: splitmix" >> cabal.project + - if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo 'package splitmix' >> cabal.project ; fi + - "if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi" + - "" + - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(splitmix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" + - cat cabal.project || true + - cat cabal.project.local || true + - if [ -f "splitmix/configure.ac" ]; then (cd "splitmix" && autoreconf -i); fi + - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} + - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'" + - rm cabal.project.freeze + - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all + - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all +script: + - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX) + # Packaging... + - ${CABAL} v2-sdist all + # Unpacking... + - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/ + - cd ${DISTDIR} || false + - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \; + - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \; + - PKGDIR_splitmix="$(find . -maxdepth 1 -type d -regex '.*/splitmix-[0-9.]*')" + # Generate cabal.project + - rm -rf cabal.project cabal.project.local cabal.project.freeze + - touch cabal.project + - | + echo "packages: ${PKGDIR_splitmix}" >> cabal.project + - if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo 'package splitmix' >> cabal.project ; fi + - "if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi" + - "" + - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(splitmix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" + - cat cabal.project || true + - cat cabal.project.local || true + # Building... + # this builds all libraries and executables (without tests/benchmarks) + - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all + # Building with tests and benchmarks... + # build & run tests, build benchmarks + - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all --write-ghc-environment-files=always + # Testing... + - if [ $((! GHCJSARITH)) -ne 0 ] ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all --test-show-details=direct ; fi + # cabal check... + - (cd ${PKGDIR_splitmix} && ${CABAL} -vnormal check) + # haddock... + - if [ $((! GHCJSARITH)) -ne 0 ] ; then ${CABAL} v2-haddock --haddock-all $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all ; fi + # Building without installed constraints for packages in global-db... + - rm -f cabal.project.local + - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all + +# REGENDATA ["--matrix-extra=abc:1,2,3","--matrix-extra=foo:bar,baz","travis","matrix-extra-toomany.project"] +# EOF diff --git a/fixtures/matrix-extra.args b/fixtures/matrix-extra.args new file mode 100644 index 00000000..494b38c8 --- /dev/null +++ b/fixtures/matrix-extra.args @@ -0,0 +1,2 @@ +--matrix-extra=abc:1,2 +--matrix-extra=foo:bar,baz diff --git a/fixtures/matrix-extra.bash b/fixtures/matrix-extra.bash new file mode 100644 index 00000000..e6e50884 --- /dev/null +++ b/fixtures/matrix-extra.bash @@ -0,0 +1,520 @@ +# SUCCESS +# *INFO* Generating Bash script for testing for GHC versions: 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.6.1 9.6.2 9.6.3 9.6.4 9.6.5 9.6.6 9.6.7 9.8.1 9.8.2 9.8.3 9.8.4 9.10.1 9.10.2 9.12.1 9.12.2 ghcjs-8.4 +#!/bin/bash +# shellcheck disable=SC2086,SC2016,SC2046 +# REGENDATA ["--matrix-extra=abc:1,2","--matrix-extra=foo:bar,baz","bash","matrix-extra.project"] + +set -o pipefail + +# Mode +############################################################################## + +if [ "$1" = "indocker" ]; then + INDOCKER=true + shift +else + INDOCKER=false +fi + +# Run configuration +############################################################################## + +CFG_CABAL_STORE_CACHE="" +CFG_CABAL_REPO_CACHE="" +CFG_JOBS="9.12.2 9.12.1 9.10.2 9.10.1 9.8.4 9.8.3 9.8.2 9.8.1 9.6.7 9.6.6 9.6.5 9.6.4 9.6.3 9.6.2 9.6.1 9.4.8 9.4.7 9.4.6 9.4.5 9.4.4 9.4.3 9.4.2 9.4.1 9.2.8 9.2.7 9.2.6 9.2.5 9.2.4 9.2.3 9.2.2 9.2.1 9.0.2 9.0.1 8.10.7 8.10.6 8.10.5 8.10.4 8.10.3 8.10.2 8.10.1 8.8.4 8.8.3 8.8.2 8.8.1 8.6.5 8.6.4 8.6.3 8.6.2 8.6.1 8.4.4 8.4.3 8.4.2 8.4.1 8.2.2 8.2.1 8.0.2 8.0.1" +CFG_CABAL_UPDATE=false + +SCRIPT_NAME=$(basename "$0") +START_TIME="$(date +'%s')" + +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} + +# Job configuration +############################################################################## + +GHC_VERSION="non-existing" +CABAL_VERSION=3.2 +HEADHACKAGE=false + +# Locale +############################################################################## + +export LC_ALL=C.UTF-8 + +# Utilities +############################################################################## + +SGR_RED='\033[1;31m' +SGR_GREEN='\033[1;32m' +SGR_BLUE='\033[1;34m' +SGR_CYAN='\033[1;96m' +SGR_RESET='\033[0m' # No Color + +put_info() { + printf "$SGR_CYAN%s$SGR_RESET\n" "### $*" +} + +put_error() { + printf "$SGR_RED%s$SGR_RESET\n" "!!! $*" +} + +run_cmd() { + local PRETTYCMD="$*" + local PROMPT + if $INDOCKER; then + PROMPT="$(pwd) >>>" + else + PROMPT=">>>" + fi + + printf "$SGR_BLUE%s %s$SGR_RESET\n" "$PROMPT" "$PRETTYCMD" + + local start_time end_time cmd_duration total_duration + start_time=$(date +'%s') + + "$@" + local RET=$? + + end_time=$(date +'%s') + cmd_duration=$((end_time - start_time)) + total_duration=$((end_time - START_TIME)) + + cmd_min=$((cmd_duration / 60)) + cmd_sec=$((cmd_duration % 60)) + + total_min=$((total_duration / 60)) + total_sec=$((total_duration % 60)) + + if [ $RET -eq 0 ]; then + printf "$SGR_GREEN%s$SGR_RESET (%dm%02ds; %dm%02ds)\n" "<<< $PRETTYCMD" "$cmd_min" "$cmd_sec" "$total_min" "$total_sec" + else + printf "$SGR_RED%s$SGR_RESET\n" "!!! $PRETTYCMD" + exit 1 + fi +} + +run_cmd_if() { + local COND=$1 + shift + + if [ $COND -eq 1 ]; then + run_cmd "$@" + else + local PRETTYCMD="$*" + local PROMPT + PROMPT="$(pwd) (skipping) >>>" + + printf "$SGR_BLUE%s %s$SGR_RESET\n" "$PROMPT" "$PRETTYCMD" + fi +} + +run_cmd_unchecked() { + local PRETTYCMD="$*" + local PROMPT + if $INDOCKER; then + PROMPT="$(pwd) >>>" + else + PROMPT=">>>" + fi + + printf "$SGR_BLUE%s %s$SGR_RESET\n" "$PROMPT" "$PRETTYCMD" + + local start_time end_time cmd_duration total_duration cmd_min cmd_sec total_min total_sec + start_time=$(date +'%s') + + "$@" + + end_time=$(date +'%s') + cmd_duration=$((end_time - start_time)) + total_duration=$((end_time - START_TIME)) + + cmd_min=$((cmd_duration / 60)) + cmd_sec=$((cmd_duration % 60)) + + total_min=$((total_duration / 60)) + total_sec=$((total_duration % 60)) + + printf "$SGR_GREEN%s$SGR_RESET (%dm%02ds; %dm%02ds)\n" "<<< $PRETTYCMD" "$cmd_min" "$cmd_sec" "$total_min" "$total_sec" +} + +change_dir() { + local DIR=$1 + if [ -d "$DIR" ]; then + printf "$SGR_BLUE%s$SGR_RESET\n" "change directory to $DIR" + cd "$DIR" || exit 1 + else + printf "$SGR_RED%s$SGR_RESET\n" "!!! cd $DIR" + exit 1 + fi +} + +change_dir_if() { + local COND=$1 + local DIR=$2 + + if [ $COND -ne 0 ]; then + change_dir "$DIR" + fi +} + +echo_to() { + local DEST=$1 + local CONTENTS=$2 + + echo "$CONTENTS" >> "$DEST" +} + +echo_if_to() { + local COND=$1 + local DEST=$2 + local CONTENTS=$3 + + if [ $COND -ne 0 ]; then + echo_to "$DEST" "$CONTENTS" + fi +} + +install_cabalplan() { + put_info "installing cabal-plan" + + if [ ! -e $CABAL_REPOCACHE/downloads/cabal-plan ]; then + curl -L https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > /tmp/cabal-plan.xz || exit 1 + (cd /tmp && echo "de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz" | sha256sum -c -)|| exit 1 + mkdir -p $CABAL_REPOCACHE/downloads + xz -d < /tmp/cabal-plan.xz > $CABAL_REPOCACHE/downloads/cabal-plan || exit 1 + chmod a+x $CABAL_REPOCACHE/downloads/cabal-plan || exit 1 + fi + + mkdir -p $CABAL_DIR/bin || exit 1 + ln -s $CABAL_REPOCACHE/downloads/cabal-plan $CABAL_DIR/bin/cabal-plan || exit 1 +} + +# Help +############################################################################## + +show_usage() { +cat < $BUILDDIR/cabal/config <= 80200)) cabal.project "package splitmix" +echo_if_to $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) cabal.project " ghc-options: -Werror=missing-methods" +cat >> cabal.project <> cabal.project.local +run_cmd cat cabal.project +run_cmd cat cabal.project.local + +# dump install plan +put_info "dump install plan" +run_cmd $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all +run_cmd cabal-plan + +# install dependencies +put_info "install dependencies" +run_cmd $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j all +run_cmd $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j all + +# build w/o tests +put_info "build w/o tests" +run_cmd $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + +# build +put_info "build" +run_cmd $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all + +# tests +put_info "tests" +run_cmd_if $((! GHCJSARITH)) $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct + +# cabal check +put_info "cabal check" +change_dir "${PKGDIR_splitmix}" +run_cmd ${CABAL} -vnormal check +change_dir "$BUILDDIR" + +# haddock +put_info "haddock" +run_cmd_if $((! GHCJSARITH)) $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + +# unconstrained build +put_info "unconstrained build" +run_cmd rm -f cabal.project.local +run_cmd $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + + +# Done +run_cmd echo OK diff --git a/fixtures/matrix-extra.github b/fixtures/matrix-extra.github new file mode 100644 index 00000000..642be520 --- /dev/null +++ b/fixtures/matrix-extra.github @@ -0,0 +1,1801 @@ +# SUCCESS +# *INFO* Generating GitHub config for testing for GHC versions: 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.6.1 9.6.2 9.6.3 9.6.4 9.6.5 9.6.6 9.6.7 9.8.1 9.8.2 9.8.3 9.8.4 9.10.1 9.10.2 9.12.1 9.12.2 ghcjs-8.4 +# This GitHub workflow config has been generated by a script via +# +# haskell-ci '--matrix-extra=abc:1,2' '--matrix-extra=foo:bar,baz' 'github' 'matrix-extra.project' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +# REGENDATA ["--matrix-extra=abc:1,2","--matrix-extra=foo:bar,baz","github","matrix-extra.project"] +# +name: Haskell-CI +on: + - push + - pull_request +jobs: + linux: + name: Haskell-CI - Linux - ${{ matrix.compiler }} + runs-on: ubuntu-24.04 + timeout-minutes: + 60 + container: + image: buildpack-deps:jammy + continue-on-error: ${{ matrix.allow-failure }} + strategy: + matrix: + include: + - compiler: ghc-9.12.2 + compilerKind: ghc + compilerVersion: 9.12.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.12.1 + compilerKind: ghc + compilerVersion: 9.12.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.10.2 + compilerKind: ghc + compilerVersion: 9.10.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.8.4 + compilerKind: ghc + compilerVersion: 9.8.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.8.3 + compilerKind: ghc + compilerVersion: 9.8.3 + setup-method: ghcup-vanilla + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.8.1 + compilerKind: ghc + compilerVersion: 9.8.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.7 + compilerKind: ghc + compilerVersion: 9.6.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.6 + compilerKind: ghc + compilerVersion: 9.6.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.5 + compilerKind: ghc + compilerVersion: 9.6.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.4 + compilerKind: ghc + compilerVersion: 9.6.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.3 + compilerKind: ghc + compilerVersion: 9.6.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.2 + compilerKind: ghc + compilerVersion: 9.6.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.6.1 + compilerKind: ghc + compilerVersion: 9.6.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.7 + compilerKind: ghc + compilerVersion: 9.4.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.6 + compilerKind: ghc + compilerVersion: 9.4.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.5 + compilerKind: ghc + compilerVersion: 9.4.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.4 + compilerKind: ghc + compilerVersion: 9.4.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.3 + compilerKind: ghc + compilerVersion: 9.4.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.2 + compilerKind: ghc + compilerVersion: 9.4.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.4.1 + compilerKind: ghc + compilerVersion: 9.4.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.7 + compilerKind: ghc + compilerVersion: 9.2.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.6 + compilerKind: ghc + compilerVersion: 9.2.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.5 + compilerKind: ghc + compilerVersion: 9.2.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.4 + compilerKind: ghc + compilerVersion: 9.2.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.3 + compilerKind: ghc + compilerVersion: 9.2.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.2 + compilerKind: ghc + compilerVersion: 9.2.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.2.1 + compilerKind: ghc + compilerVersion: 9.2.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.0.2 + compilerKind: ghc + compilerVersion: 9.0.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.0.1 + compilerKind: ghc + compilerVersion: 9.0.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.7 + compilerKind: ghc + compilerVersion: 8.10.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.6 + compilerKind: ghc + compilerVersion: 8.10.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.5 + compilerKind: ghc + compilerVersion: 8.10.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.4 + compilerKind: ghc + compilerVersion: 8.10.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.3 + compilerKind: ghc + compilerVersion: 8.10.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.2 + compilerKind: ghc + compilerVersion: 8.10.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.10.1 + compilerKind: ghc + compilerVersion: 8.10.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.8.4 + compilerKind: ghc + compilerVersion: 8.8.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.8.3 + compilerKind: ghc + compilerVersion: 8.8.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.8.2 + compilerKind: ghc + compilerVersion: 8.8.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.8.1 + compilerKind: ghc + compilerVersion: 8.8.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.6.5 + compilerKind: ghc + compilerVersion: 8.6.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.6.4 + compilerKind: ghc + compilerVersion: 8.6.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.6.3 + compilerKind: ghc + compilerVersion: 8.6.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.6.2 + compilerKind: ghc + compilerVersion: 8.6.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.6.1 + compilerKind: ghc + compilerVersion: 8.6.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.4.4 + compilerKind: ghc + compilerVersion: 8.4.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.4.3 + compilerKind: ghc + compilerVersion: 8.4.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.4.2 + compilerKind: ghc + compilerVersion: 8.4.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.4.1 + compilerKind: ghc + compilerVersion: 8.4.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.2.2 + compilerKind: ghc + compilerVersion: 8.2.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.2.1 + compilerKind: ghc + compilerVersion: 8.2.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.0.2 + compilerKind: ghc + compilerVersion: 8.0.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-8.0.1 + compilerKind: ghc + compilerVersion: 8.0.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: bar + - compiler: ghc-9.12.2 + compilerKind: ghc + compilerVersion: 9.12.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.12.1 + compilerKind: ghc + compilerVersion: 9.12.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.10.2 + compilerKind: ghc + compilerVersion: 9.10.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.8.4 + compilerKind: ghc + compilerVersion: 9.8.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.8.3 + compilerKind: ghc + compilerVersion: 9.8.3 + setup-method: ghcup-vanilla + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.8.1 + compilerKind: ghc + compilerVersion: 9.8.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.7 + compilerKind: ghc + compilerVersion: 9.6.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.6 + compilerKind: ghc + compilerVersion: 9.6.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.5 + compilerKind: ghc + compilerVersion: 9.6.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.4 + compilerKind: ghc + compilerVersion: 9.6.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.3 + compilerKind: ghc + compilerVersion: 9.6.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.2 + compilerKind: ghc + compilerVersion: 9.6.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.6.1 + compilerKind: ghc + compilerVersion: 9.6.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.7 + compilerKind: ghc + compilerVersion: 9.4.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.6 + compilerKind: ghc + compilerVersion: 9.4.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.5 + compilerKind: ghc + compilerVersion: 9.4.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.4 + compilerKind: ghc + compilerVersion: 9.4.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.3 + compilerKind: ghc + compilerVersion: 9.4.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.2 + compilerKind: ghc + compilerVersion: 9.4.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.4.1 + compilerKind: ghc + compilerVersion: 9.4.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.7 + compilerKind: ghc + compilerVersion: 9.2.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.6 + compilerKind: ghc + compilerVersion: 9.2.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.5 + compilerKind: ghc + compilerVersion: 9.2.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.4 + compilerKind: ghc + compilerVersion: 9.2.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.3 + compilerKind: ghc + compilerVersion: 9.2.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.2 + compilerKind: ghc + compilerVersion: 9.2.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.2.1 + compilerKind: ghc + compilerVersion: 9.2.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.0.2 + compilerKind: ghc + compilerVersion: 9.0.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.0.1 + compilerKind: ghc + compilerVersion: 9.0.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.7 + compilerKind: ghc + compilerVersion: 8.10.7 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.6 + compilerKind: ghc + compilerVersion: 8.10.6 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.5 + compilerKind: ghc + compilerVersion: 8.10.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.4 + compilerKind: ghc + compilerVersion: 8.10.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.3 + compilerKind: ghc + compilerVersion: 8.10.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.2 + compilerKind: ghc + compilerVersion: 8.10.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.10.1 + compilerKind: ghc + compilerVersion: 8.10.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.8.4 + compilerKind: ghc + compilerVersion: 8.8.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.8.3 + compilerKind: ghc + compilerVersion: 8.8.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.8.2 + compilerKind: ghc + compilerVersion: 8.8.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.8.1 + compilerKind: ghc + compilerVersion: 8.8.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.6.5 + compilerKind: ghc + compilerVersion: 8.6.5 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.6.4 + compilerKind: ghc + compilerVersion: 8.6.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.6.3 + compilerKind: ghc + compilerVersion: 8.6.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.6.2 + compilerKind: ghc + compilerVersion: 8.6.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.6.1 + compilerKind: ghc + compilerVersion: 8.6.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.4.4 + compilerKind: ghc + compilerVersion: 8.4.4 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.4.3 + compilerKind: ghc + compilerVersion: 8.4.3 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.4.2 + compilerKind: ghc + compilerVersion: 8.4.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.4.1 + compilerKind: ghc + compilerVersion: 8.4.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.2.2 + compilerKind: ghc + compilerVersion: 8.2.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.2.1 + compilerKind: ghc + compilerVersion: 8.2.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.0.2 + compilerKind: ghc + compilerVersion: 8.0.2 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-8.0.1 + compilerKind: ghc + compilerVersion: 8.0.1 + setup-method: ghcup + allow-failure: false + abc: "1" + foo: baz + - compiler: ghc-9.12.2 + compilerKind: ghc + compilerVersion: 9.12.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.12.1 + compilerKind: ghc + compilerVersion: 9.12.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.10.2 + compilerKind: ghc + compilerVersion: 9.10.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.8.4 + compilerKind: ghc + compilerVersion: 9.8.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.8.3 + compilerKind: ghc + compilerVersion: 9.8.3 + setup-method: ghcup-vanilla + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.8.1 + compilerKind: ghc + compilerVersion: 9.8.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.7 + compilerKind: ghc + compilerVersion: 9.6.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.6 + compilerKind: ghc + compilerVersion: 9.6.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.5 + compilerKind: ghc + compilerVersion: 9.6.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.4 + compilerKind: ghc + compilerVersion: 9.6.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.3 + compilerKind: ghc + compilerVersion: 9.6.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.2 + compilerKind: ghc + compilerVersion: 9.6.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.6.1 + compilerKind: ghc + compilerVersion: 9.6.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.7 + compilerKind: ghc + compilerVersion: 9.4.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.6 + compilerKind: ghc + compilerVersion: 9.4.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.5 + compilerKind: ghc + compilerVersion: 9.4.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.4 + compilerKind: ghc + compilerVersion: 9.4.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.3 + compilerKind: ghc + compilerVersion: 9.4.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.2 + compilerKind: ghc + compilerVersion: 9.4.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.4.1 + compilerKind: ghc + compilerVersion: 9.4.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.7 + compilerKind: ghc + compilerVersion: 9.2.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.6 + compilerKind: ghc + compilerVersion: 9.2.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.5 + compilerKind: ghc + compilerVersion: 9.2.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.4 + compilerKind: ghc + compilerVersion: 9.2.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.3 + compilerKind: ghc + compilerVersion: 9.2.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.2 + compilerKind: ghc + compilerVersion: 9.2.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.2.1 + compilerKind: ghc + compilerVersion: 9.2.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.0.2 + compilerKind: ghc + compilerVersion: 9.0.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.0.1 + compilerKind: ghc + compilerVersion: 9.0.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.7 + compilerKind: ghc + compilerVersion: 8.10.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.6 + compilerKind: ghc + compilerVersion: 8.10.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.5 + compilerKind: ghc + compilerVersion: 8.10.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.4 + compilerKind: ghc + compilerVersion: 8.10.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.3 + compilerKind: ghc + compilerVersion: 8.10.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.2 + compilerKind: ghc + compilerVersion: 8.10.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.10.1 + compilerKind: ghc + compilerVersion: 8.10.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.8.4 + compilerKind: ghc + compilerVersion: 8.8.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.8.3 + compilerKind: ghc + compilerVersion: 8.8.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.8.2 + compilerKind: ghc + compilerVersion: 8.8.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.8.1 + compilerKind: ghc + compilerVersion: 8.8.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.6.5 + compilerKind: ghc + compilerVersion: 8.6.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.6.4 + compilerKind: ghc + compilerVersion: 8.6.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.6.3 + compilerKind: ghc + compilerVersion: 8.6.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.6.2 + compilerKind: ghc + compilerVersion: 8.6.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.6.1 + compilerKind: ghc + compilerVersion: 8.6.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.4.4 + compilerKind: ghc + compilerVersion: 8.4.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.4.3 + compilerKind: ghc + compilerVersion: 8.4.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.4.2 + compilerKind: ghc + compilerVersion: 8.4.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.4.1 + compilerKind: ghc + compilerVersion: 8.4.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.2.2 + compilerKind: ghc + compilerVersion: 8.2.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.2.1 + compilerKind: ghc + compilerVersion: 8.2.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.0.2 + compilerKind: ghc + compilerVersion: 8.0.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-8.0.1 + compilerKind: ghc + compilerVersion: 8.0.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: bar + - compiler: ghc-9.12.2 + compilerKind: ghc + compilerVersion: 9.12.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.12.1 + compilerKind: ghc + compilerVersion: 9.12.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.10.2 + compilerKind: ghc + compilerVersion: 9.10.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.8.4 + compilerKind: ghc + compilerVersion: 9.8.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.8.3 + compilerKind: ghc + compilerVersion: 9.8.3 + setup-method: ghcup-vanilla + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.8.1 + compilerKind: ghc + compilerVersion: 9.8.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.7 + compilerKind: ghc + compilerVersion: 9.6.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.6 + compilerKind: ghc + compilerVersion: 9.6.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.5 + compilerKind: ghc + compilerVersion: 9.6.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.4 + compilerKind: ghc + compilerVersion: 9.6.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.3 + compilerKind: ghc + compilerVersion: 9.6.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.2 + compilerKind: ghc + compilerVersion: 9.6.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.6.1 + compilerKind: ghc + compilerVersion: 9.6.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.7 + compilerKind: ghc + compilerVersion: 9.4.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.6 + compilerKind: ghc + compilerVersion: 9.4.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.5 + compilerKind: ghc + compilerVersion: 9.4.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.4 + compilerKind: ghc + compilerVersion: 9.4.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.3 + compilerKind: ghc + compilerVersion: 9.4.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.2 + compilerKind: ghc + compilerVersion: 9.4.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.4.1 + compilerKind: ghc + compilerVersion: 9.4.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.7 + compilerKind: ghc + compilerVersion: 9.2.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.6 + compilerKind: ghc + compilerVersion: 9.2.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.5 + compilerKind: ghc + compilerVersion: 9.2.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.4 + compilerKind: ghc + compilerVersion: 9.2.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.3 + compilerKind: ghc + compilerVersion: 9.2.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.2 + compilerKind: ghc + compilerVersion: 9.2.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.2.1 + compilerKind: ghc + compilerVersion: 9.2.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.0.2 + compilerKind: ghc + compilerVersion: 9.0.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-9.0.1 + compilerKind: ghc + compilerVersion: 9.0.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.7 + compilerKind: ghc + compilerVersion: 8.10.7 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.6 + compilerKind: ghc + compilerVersion: 8.10.6 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.5 + compilerKind: ghc + compilerVersion: 8.10.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.4 + compilerKind: ghc + compilerVersion: 8.10.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.3 + compilerKind: ghc + compilerVersion: 8.10.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.2 + compilerKind: ghc + compilerVersion: 8.10.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.10.1 + compilerKind: ghc + compilerVersion: 8.10.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.8.4 + compilerKind: ghc + compilerVersion: 8.8.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.8.3 + compilerKind: ghc + compilerVersion: 8.8.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.8.2 + compilerKind: ghc + compilerVersion: 8.8.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.8.1 + compilerKind: ghc + compilerVersion: 8.8.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.6.5 + compilerKind: ghc + compilerVersion: 8.6.5 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.6.4 + compilerKind: ghc + compilerVersion: 8.6.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.6.3 + compilerKind: ghc + compilerVersion: 8.6.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.6.2 + compilerKind: ghc + compilerVersion: 8.6.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.6.1 + compilerKind: ghc + compilerVersion: 8.6.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.4.4 + compilerKind: ghc + compilerVersion: 8.4.4 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.4.3 + compilerKind: ghc + compilerVersion: 8.4.3 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.4.2 + compilerKind: ghc + compilerVersion: 8.4.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.4.1 + compilerKind: ghc + compilerVersion: 8.4.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.2.2 + compilerKind: ghc + compilerVersion: 8.2.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.2.1 + compilerKind: ghc + compilerVersion: 8.2.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.0.2 + compilerKind: ghc + compilerVersion: 8.0.2 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + - compiler: ghc-8.0.1 + compilerKind: ghc + compilerVersion: 8.0.1 + setup-method: ghcup + allow-failure: false + abc: "2" + foo: baz + fail-fast: false + steps: + - name: apt-get install + run: | + apt-get update + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + - name: Install GHCup + run: | + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + - name: Install cabal-install + run: | + "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + - name: Install GHC (GHCup) + if: matrix.setup-method == 'ghcup' + run: | + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + 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" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: Install GHC (GHCup vanilla) + if: matrix.setup-method == 'ghcup-vanilla' + run: | + "$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + 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" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: Set PATH and environment variables + run: | + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "LANG=C.UTF-8" >> "$GITHUB_ENV" + echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" + echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$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" + echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: env + run: | + env + - name: write cabal config + run: | + mkdir -p $CABAL_DIR + cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz + echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - + xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan + rm -f cabal-plan.xz + chmod a+x $HOME/.cabal/bin/cabal-plan + cabal-plan --version + - name: checkout + uses: actions/checkout@v4 + with: + path: source + - name: initial cabal.project for sdist + run: | + touch cabal.project + echo "packages: $GITHUB_WORKSPACE/source/splitmix" >> cabal.project + cat cabal.project + - name: sdist + run: | + mkdir -p sdist + $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist + - name: unpack + run: | + mkdir -p unpacked + find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; + - name: generate cabal.project + run: | + PKGDIR_splitmix="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/splitmix-[0-9.]*')" + echo "PKGDIR_splitmix=${PKGDIR_splitmix}" >> "$GITHUB_ENV" + rm -f cabal.project cabal.project.local + touch cabal.project + touch cabal.project.local + echo "packages: ${PKGDIR_splitmix}" >> cabal.project + if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo "package splitmix" >> cabal.project ; fi + if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + cat >> cabal.project <> 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@v4 + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- + - name: install dependencies + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all + - name: build w/o tests + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: build + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always + - name: tests + run: | + if [ $((! GHCJSARITH)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi + - name: cabal check + run: | + cd ${PKGDIR_splitmix} || false + ${CABAL} -vnormal check + - name: haddock + run: | + if [ $((! GHCJSARITH)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi + - name: unconstrained build + run: | + rm -f cabal.project.local + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: save cache + if: always() + uses: actions/cache/save@v4 + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store diff --git a/fixtures/matrix-extra.project b/fixtures/matrix-extra.project new file mode 100644 index 00000000..b1f6a74e --- /dev/null +++ b/fixtures/matrix-extra.project @@ -0,0 +1 @@ +packages: splitmix diff --git a/fixtures/matrix-extra.travis b/fixtures/matrix-extra.travis new file mode 100644 index 00000000..3dcde097 --- /dev/null +++ b/fixtures/matrix-extra.travis @@ -0,0 +1,298 @@ +# SUCCESS +# *INFO* Generating Travis-CI config for testing for GHC versions: 7.0.1 7.0.2 7.0.3 7.0.4 7.2.1 7.2.2 7.4.1 7.4.2 7.6.1 7.6.2 7.6.3 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.4.1 9.4.2 ghcjs-8.4 +# This Travis job script has been generated by a script via +# +# haskell-ci '--matrix-extra=abc:1,2' '--matrix-extra=foo:bar,baz' 'travis' 'matrix-extra.project' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +version: ~> 1.0 +language: c +os: linux +dist: bionic +git: + # whether to recursively clone submodules + submodules: false +cache: + directories: + - $HOME/.cabal/packages + - $HOME/.cabal/store + - $HOME/.hlint +before_cache: + - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log + # remove files that are regenerated by 'cabal update' + - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.* + - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx + - rm -rfv $CABALHOME/packages/head.hackage +jobs: + include: + - compiler: ghcjs-8.4 + addons: {"apt":{"packages":["ghcjs-8.4","cabal-install-3.4","ghc-8.4.4","nodejs"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"},{"sourceline":"deb http://ppa.launchpad.net/hvr/ghcjs/ubuntu bionic main"},{"key_url":"https://deb.nodesource.com/gpgkey/nodesource.gpg.key","sourceline":"deb https://deb.nodesource.com/node_10.x bionic main"}]}} + os: linux + - compiler: ghc-9.4.2 + addons: {"apt":{"packages":["ghc-9.4.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.4.1 + addons: {"apt":{"packages":["ghc-9.4.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.4 + addons: {"apt":{"packages":["ghc-9.2.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.3 + addons: {"apt":{"packages":["ghc-9.2.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.2 + addons: {"apt":{"packages":["ghc-9.2.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.2.1 + addons: {"apt":{"packages":["ghc-9.2.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.0.2 + addons: {"apt":{"packages":["ghc-9.0.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-9.0.1 + addons: {"apt":{"packages":["ghc-9.0.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.7 + addons: {"apt":{"packages":["ghc-8.10.7","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.6 + addons: {"apt":{"packages":["ghc-8.10.6","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.5 + addons: {"apt":{"packages":["ghc-8.10.5","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.4 + addons: {"apt":{"packages":["ghc-8.10.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.3 + addons: {"apt":{"packages":["ghc-8.10.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.2 + addons: {"apt":{"packages":["ghc-8.10.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.10.1 + addons: {"apt":{"packages":["ghc-8.10.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.4 + addons: {"apt":{"packages":["ghc-8.8.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.3 + addons: {"apt":{"packages":["ghc-8.8.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.2 + addons: {"apt":{"packages":["ghc-8.8.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.8.1 + addons: {"apt":{"packages":["ghc-8.8.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.5 + addons: {"apt":{"packages":["ghc-8.6.5","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.4 + addons: {"apt":{"packages":["ghc-8.6.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.3 + addons: {"apt":{"packages":["ghc-8.6.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.2 + addons: {"apt":{"packages":["ghc-8.6.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.6.1 + addons: {"apt":{"packages":["ghc-8.6.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.4 + addons: {"apt":{"packages":["ghc-8.4.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.3 + addons: {"apt":{"packages":["ghc-8.4.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.2 + addons: {"apt":{"packages":["ghc-8.4.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.4.1 + addons: {"apt":{"packages":["ghc-8.4.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.2.2 + addons: {"apt":{"packages":["ghc-8.2.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.2.1 + addons: {"apt":{"packages":["ghc-8.2.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.0.2 + addons: {"apt":{"packages":["ghc-8.0.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-8.0.1 + addons: {"apt":{"packages":["ghc-8.0.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.10.3 + addons: {"apt":{"packages":["ghc-7.10.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.10.2 + addons: {"apt":{"packages":["ghc-7.10.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.10.1 + addons: {"apt":{"packages":["ghc-7.10.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.4 + addons: {"apt":{"packages":["ghc-7.8.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.3 + addons: {"apt":{"packages":["ghc-7.8.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.2 + addons: {"apt":{"packages":["ghc-7.8.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.8.1 + addons: {"apt":{"packages":["ghc-7.8.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.6.3 + addons: {"apt":{"packages":["ghc-7.6.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.6.2 + addons: {"apt":{"packages":["ghc-7.6.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.6.1 + addons: {"apt":{"packages":["ghc-7.6.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.4.2 + addons: {"apt":{"packages":["ghc-7.4.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.4.1 + addons: {"apt":{"packages":["ghc-7.4.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.2.2 + addons: {"apt":{"packages":["ghc-7.2.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.2.1 + addons: {"apt":{"packages":["ghc-7.2.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.4 + addons: {"apt":{"packages":["ghc-7.0.4","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.3 + addons: {"apt":{"packages":["ghc-7.0.3","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.2 + addons: {"apt":{"packages":["ghc-7.0.2","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux + - compiler: ghc-7.0.1 + addons: {"apt":{"packages":["ghc-7.0.1","cabal-install-3.6"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}} + os: linux +before_install: + - | + if echo $CC | grep -q ghcjs; then + GHCJS=true; GHCJSARITH=1; + else + GHCJS=false; GHCJSARITH=0; + fi + - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//') + - WITHCOMPILER="-w $HC" + - if [ $((GHCJSARITH)) -ne 0 ] ; then HC=${HC}js ; fi + - if [ $((GHCJSARITH)) -ne 0 ] ; then WITHCOMPILER="--ghcjs ${WITHCOMPILER}js" ; fi + - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//') + - if [ $((GHCJSARITH)) -ne 0 ] ; then PATH="/opt/ghc/8.4.4/bin:$PATH" ; fi + - HCPKG="$HC-pkg" + - unset CC + - CABAL=/opt/ghc/bin/cabal + - CABALHOME=$HOME/.cabal + - export PATH="$CABALHOME/bin:$PATH" + - TOP=$(pwd) + - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')" + - echo $HCNUMVER + - CABAL="$CABAL -vnormal+nowrap" + - set -o pipefail + - TEST=--enable-tests + - BENCH=--enable-benchmarks + - HEADHACKAGE=false + - rm -f $CABALHOME/config + - | + echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config + echo "remote-build-reporting: anonymous" >> $CABALHOME/config + echo "write-ghc-environment-files: never" >> $CABALHOME/config + echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config + echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config + echo "world-file: $CABALHOME/world" >> $CABALHOME/config + echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config + echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config + echo "installdir: $CABALHOME/bin" >> $CABALHOME/config + echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config + echo "store-dir: $CABALHOME/store" >> $CABALHOME/config + echo "install-dirs user" >> $CABALHOME/config + echo " prefix: $CABALHOME" >> $CABALHOME/config + echo "repository hackage.haskell.org" >> $CABALHOME/config + echo " url: http://hackage.haskell.org/" >> $CABALHOME/config +install: + - ${CABAL} --version + - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" + - node --version + - echo $GHCJS + - | + echo "program-default-options" >> $CABALHOME/config + echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config + - cat $CABALHOME/config + - rm -fv cabal.project cabal.project.local cabal.project.freeze + - travis_retry ${CABAL} v2-update -v + # Generate cabal.project + - rm -rf cabal.project cabal.project.local cabal.project.freeze + - touch cabal.project + - | + echo "packages: splitmix" >> cabal.project + - if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo 'package splitmix' >> cabal.project ; fi + - "if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi" + - "" + - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(splitmix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" + - cat cabal.project || true + - cat cabal.project.local || true + - if [ -f "splitmix/configure.ac" ]; then (cd "splitmix" && autoreconf -i); fi + - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} + - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'" + - rm cabal.project.freeze + - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all + - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all +script: + - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX) + # Packaging... + - ${CABAL} v2-sdist all + # Unpacking... + - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/ + - cd ${DISTDIR} || false + - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \; + - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \; + - PKGDIR_splitmix="$(find . -maxdepth 1 -type d -regex '.*/splitmix-[0-9.]*')" + # Generate cabal.project + - rm -rf cabal.project cabal.project.local cabal.project.freeze + - touch cabal.project + - | + echo "packages: ${PKGDIR_splitmix}" >> cabal.project + - if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo 'package splitmix' >> cabal.project ; fi + - "if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi" + - "" + - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(splitmix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" + - cat cabal.project || true + - cat cabal.project.local || true + # Building... + # this builds all libraries and executables (without tests/benchmarks) + - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all + # Building with tests and benchmarks... + # build & run tests, build benchmarks + - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all --write-ghc-environment-files=always + # Testing... + - if [ $((! GHCJSARITH)) -ne 0 ] ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all --test-show-details=direct ; fi + # cabal check... + - (cd ${PKGDIR_splitmix} && ${CABAL} -vnormal check) + # haddock... + - if [ $((! GHCJSARITH)) -ne 0 ] ; then ${CABAL} v2-haddock --haddock-all $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all ; fi + # Building without installed constraints for packages in global-db... + - rm -f cabal.project.local + - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all + +# REGENDATA ["--matrix-extra=abc:1,2","--matrix-extra=foo:bar,baz","travis","matrix-extra.project"] +# EOF diff --git a/src/HaskellCI/Config/Grammar.hs b/src/HaskellCI/Config/Grammar.hs index 785917bb..d447c481 100644 --- a/src/HaskellCI/Config/Grammar.hs +++ b/src/HaskellCI/Config/Grammar.hs @@ -9,6 +9,7 @@ module HaskellCI.Config.Grammar where import HaskellCI.Prelude import qualified Data.Map as M +import qualified Data.Set as S import qualified Distribution.Compat.CharParsing as C import qualified Distribution.Compat.Newtype as C import qualified Distribution.FieldGrammar as C @@ -53,6 +54,7 @@ configGrammar , c CopyFields , c CopyFields , c Env + , c MatrixExtra , c HeadVersion , c Jobs , c Natural @@ -140,6 +142,8 @@ configGrammar = Config ^^^ help "Add google-chrome service" <*> monoidalFieldAla "env" Env (field @"cfgEnv") ^^^ metahelp "ENV" "Environment variables per job (e.g. `8.0.2:HADDOCK=false`)" + <*> monoidalFieldAla "matrix-extra" MatrixExtra (field @"cfgMatrixExtra") + ^^^ metahelp "MATRIX" "Extra matrix dimensions (e.g. `libfoo:2.6,3.0,git`)" <*> optionalFieldDefAla "allow-failures" Range (field @"cfgAllowFailures") defaultConfig ^^^ metahelp "JOB" "Allow failures of particular GHC version" <*> booleanFieldDef "last-in-series" (field @"cfgLastInSeries") defaultConfig @@ -194,3 +198,23 @@ instance C.Parsec Env where instance C.Pretty Env where pretty (Env m) = PP.fsep . PP.punctuate PP.comma . map p . M.toList $ m where p (v, s) = C.pretty v PP.<> PP.colon PP.<> PP.text s + +------------------------------------------------------------------------------- +-- MatrixExtra +------------------------------------------------------------------------------- + +newtype MatrixExtra = MatrixExtra (M.Map String (S.Set String)) + deriving anyclass (C.Newtype (M.Map String (S.Set String))) + +instance C.Parsec MatrixExtra where + parsec = MatrixExtra . M.fromList . toList <$> C.sepByNonEmpty p (C.char ';') + where + p = do + k <- C.munch1 (/= ':') + _ <- C.char ':' + v <- foldMap S.singleton <$> C.sepByNonEmpty (C.munch1 (`notElem` [',', ';'])) (C.char ',') + pure (k, v) + +instance C.Pretty MatrixExtra where + pretty (MatrixExtra m) = PP.fsep . PP.punctuate PP.semi . map p . M.toList $ m where + p (k, v) = PP.text k PP.<> PP.colon PP.<> PP.fsep (PP.punctuate PP.comma (map PP.text (toList v))) diff --git a/src/HaskellCI/Config/Initial.hs b/src/HaskellCI/Config/Initial.hs index 74c36e22..61e0e396 100644 --- a/src/HaskellCI/Config/Initial.hs +++ b/src/HaskellCI/Config/Initial.hs @@ -57,6 +57,7 @@ initialConfig = Config , cfgPostgres = False , cfgGoogleChrome = False , cfgEnv = mempty + , cfgMatrixExtra = mempty , cfgAllowFailures = noVersion , cfgLastInSeries = False , cfgLinuxJobs = anyVersion diff --git a/src/HaskellCI/Config/Type.hs b/src/HaskellCI/Config/Type.hs index e16f8c5a..268ffad6 100644 --- a/src/HaskellCI/Config/Type.hs +++ b/src/HaskellCI/Config/Type.hs @@ -62,6 +62,7 @@ data Config = Config , cfgPostgres :: !Bool , cfgGoogleChrome :: !Bool , cfgEnv :: M.Map Version String + , cfgMatrixExtra :: M.Map String (S.Set String) , cfgAllowFailures :: !VersionRange , cfgLastInSeries :: !Bool , cfgLinuxJobs :: !VersionRange diff --git a/src/HaskellCI/GitHub.hs b/src/HaskellCI/GitHub.hs index 221f6f11..22431821 100644 --- a/src/HaskellCI/GitHub.hs +++ b/src/HaskellCI/GitHub.hs @@ -115,6 +115,13 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do [ "Using submodules on the GitHub Actions backend requires" , "Ubuntu 20.04 (Focal Fossa) or later." ] + when (length matrix > maxMatrixJobs) $ + throwErr $ ValidationError $ unwords + [ "The matrix has" + , show (length matrix) + , "jobs, exceeding the limit of" + , show maxMatrixJobs ++ "." + ] steps <- sequence $ buildList $ do githubRun "apt-get install" $ do @@ -536,23 +543,7 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do , ghjServices = mconcat [ Map.singleton "postgres" postgresService | cfgPostgres ] , ghjTimeout = max 10 cfgTimeoutMinutes - , ghjMatrix = concat $ - -- we can have multiple setup methods for the same - -- compiler version, if jobs overlap. - [ [ GitHubMatrixEntry - { ghmeCompiler = translateCompilerVersion cfgVersionMapping $ compiler - , ghmeAllowFailure = - isGHCHead compiler - || maybeGHC False (`C.withinRange` cfgAllowFailures) compiler - , ghmeSetupMethod = sp - } - | sp <- [GHCUP, GHCUPvanilla, GHCUPprerelease, HVRPPA] - , compilerWithinGhcRange compiler $ index cfgSetupMethods sp - ] - | compiler <- reverse $ toList linuxVersions - , compiler /= GHCHead -- TODO: Make this work - -- https://github.com/haskell-CI/haskell-ci/issues/458 - ] + , ghjMatrix = matrix }) unless (null cfgIrcChannels) $ @@ -571,6 +562,34 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do isGHCUP :: CompilerVersion -> Bool isGHCUP v = compilerWithinRange v (RangeGHC /\ Range (index cfgSetupMethods GHCUP)) + -- extra matrix fields + matrixExtra :: [[(String, String)]] + matrixExtra = + traverse (\(k, vs) -> fmap (\v -> (k, v)) (toList vs)) + $ Map.toList cfgMatrixExtra + + mkMatrixEntries :: [(String, String)] -> [GitHubMatrixEntry] + mkMatrixEntries extra = + [ GitHubMatrixEntry + { ghmeCompiler = translateCompilerVersion cfgVersionMapping $ compiler + , ghmeAllowFailure = + isGHCHead compiler + || maybeGHC False (`C.withinRange` cfgAllowFailures) compiler + , ghmeSetupMethod = sp + , ghmeMatrixExtra = extra + } + | compiler <- reverse $ toList linuxVersions + , compiler /= GHCHead -- TODO: Make this work + -- https://github.com/haskell-CI/haskell-ci/issues/458 + , sp <- [GHCUP, GHCUPvanilla, GHCUPprerelease, HVRPPA] + , compilerWithinGhcRange compiler $ index cfgSetupMethods sp + ] + + matrix :: [GitHubMatrixEntry] + matrix = case matrixExtra of + [] -> mkMatrixEntries [] + xs -> xs >>= mkMatrixEntries + -- step primitives githubRun' :: String -> Map.Map String String -> ShM () -> ListBuilder (Either HsCiError GitHubStep) () githubRun' name env shm = item $ do @@ -788,3 +807,9 @@ ghcRunsOnVer = "ubuntu-24.04" translateCompilerVersion :: Map Version Version -> CompilerVersion -> CompilerVersion translateCompilerVersion m (GHC v) = GHC (Map.findWithDefault v v m) translateCompilerVersion _ x = x + +-- | GitHub has a limit of 256 jobs. +-- See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#using-a-matrix-strategy +-- +maxMatrixJobs :: Int +maxMatrixJobs = 256 diff --git a/src/HaskellCI/GitHub/Yaml.hs b/src/HaskellCI/GitHub/Yaml.hs index adb4a145..b29ec854 100644 --- a/src/HaskellCI/GitHub/Yaml.hs +++ b/src/HaskellCI/GitHub/Yaml.hs @@ -47,6 +47,7 @@ data GitHubJob = GitHubJob data GitHubMatrixEntry = GitHubMatrixEntry { ghmeCompiler :: CompilerVersion , ghmeAllowFailure :: Bool + , ghmeMatrixExtra :: [(String, String)] , ghmeSetupMethod :: SetupMethod } deriving (Show) @@ -129,13 +130,13 @@ instance ToYaml GitHubJob where item $ "steps" ~> ylistFilt [] (map toYaml $ filter notEmptyStep ghjSteps) instance ToYaml GitHubMatrixEntry where - toYaml GitHubMatrixEntry {..} = ykeyValuesFilt [] + toYaml GitHubMatrixEntry {..} = ykeyValuesFilt [] $ [ "compiler" ~> fromString compiler , "compilerKind" ~> fromString (compilerKind ghmeCompiler) , "compilerVersion" ~> fromString (compilerVersion ghmeCompiler) , "setup-method" ~> toYaml ghmeSetupMethod , "allow-failure" ~> toYaml ghmeAllowFailure - ] + ] ++ fmap (\(k, v) -> k ~> fromString v) ghmeMatrixExtra where compiler | GHCUP <- ghmeSetupMethod diff --git a/test/Tests.hs b/test/Tests.hs index 6017158d..e3f446b4 100644 --- a/test/Tests.hs +++ b/test/Tests.hs @@ -34,6 +34,8 @@ main = do , fixtureGoldenTest "enabled-jobs" , fixtureGoldenTest "doctest" , fixtureGoldenTest "doctest-version" + , fixtureGoldenTest "matrix-extra" + , fixtureGoldenTest "matrix-extra-toomany" , testGroup "copy-fields" [ fixtureGoldenTest "copy-fields-all" , fixtureGoldenTest "copy-fields-some"