Skip to content

Overhaul FileTest module, remove Switch, other updates #320

Overhaul FileTest module, remove Switch, other updates

Overhaul FileTest module, remove Switch, other updates #320

Workflow file for this run

# packcheck-0.7.1
# You can use any of the options supported by packcheck as environment
# variables here. See https://github.com/composewell/packcheck for all
# options and their explanation.
name: packcheck
#-----------------------------------------------------------------------------
# Events on which the build should be triggered
#-----------------------------------------------------------------------------
on:
push:
branches:
- master
pull_request:
#-----------------------------------------------------------------------------
# Build matrix
#-----------------------------------------------------------------------------
jobs:
build:
name: >-
${{ matrix.runner }}
${{ matrix.command }}
${{ matrix.ghc_version }}
${{ matrix.name }}
env:
# ------------------------------------------------------------------------
# Common options
# ------------------------------------------------------------------------
CABAL_REINIT_CONFIG: y
LC_ALL: C.UTF-8
# ------------------------------------------------------------------------
# What to build
# ------------------------------------------------------------------------
# DISABLE_TEST: "y"
# DISABLE_BENCH: "y"
# DISABLE_DOCS: "y"
# DISABLE_SDIST_BUILD: "y"
# DISABLE_SDIST_GIT_CHECK: "y"
# DISABLE_DIST_CHECKS: "y"
# ------------------------------------------------------------------------
# Selecting tool versions
# ------------------------------------------------------------------------
# For updating see: https://downloads.haskell.org/~ghcup/
GHCUP_VERSION: 0.1.50.2
GHCVER: ${{ matrix.ghc_version }}
# ------------------------------------------------------------------------
# stack options
# ------------------------------------------------------------------------
# Note requiring a specific version of stack using STACKVER may fail due to
# github API limit while checking and upgrading/downgrading to the specific
# version.
#STACKVER: "1.6.5"
#STACK_UPGRADE: "y"
STACK_YAML: "stack.yaml"
# ------------------------------------------------------------------------
# cabal options
# ------------------------------------------------------------------------
CABAL_CHECK_RELAX: y
# ------------------------------------------------------------------------
# Where to find the required tools
# ------------------------------------------------------------------------
PATH: /sbin:/usr/sbin:/bin:/usr/bin
# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
# ------------------------------------------------------------------------
# You can either commit the packcheck.sh script at this path in your repo or
# you can use it by specifying the PACKCHECK_REPO_URL option below in which
# case it will be automatically copied from the packcheck repo to this path
# during CI tests. In any case it is finally invoked from this path.
PACKCHECK: "./packcheck.sh"
# If you have not committed packcheck.sh in your repo at PACKCHECK
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "a78c3a9010b19338155c2abb318a7ae10119d5c8"
# ------------------------------------------------------------------------
# Final build variables
# ------------------------------------------------------------------------
PACKCHECK_COMMAND: ${{ matrix.command }} ${{ matrix.pack_options }}
# ubuntu seems to have better support than debian on CI systems
runs-on: ${{ matrix.runner }}
#continue-on-error: ${{ matrix.ignore_error }}
strategy:
fail-fast: false
matrix:
# The order of jobs is important to optimize fail-fast.
# This section is to order the important jobs first especially for
# "fail-fast" so that these are the ones started first.
name:
- werror-fusion
# The name of the CI is built using the name and other info from CI,
# therefore, the "name" field can be same for all tests here.
#
# The reason we have an explicit "name" field here is to force
# an additional config instead of adding to an existing config
# while adding additional configs.
# Look at <https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix>
# for more info about adding matrix elements.
# Adding any element to the list will increase the number of matrix
# elements proportional to the cross product.
include:
#- name: ci
# runner: ubuntu-latest
# command: cabal
# ghc_version: head
# # The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/
# # Find a debian10/11/12 job, click on a passed/failed status, at the
# # end of the output you will find the tar.xz name, put that tar
# # name after "raw/", and put the job name after "job=".
# # Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix
# #
# # May also use ghcup for installing ghc head version, use the
# # version "LatestNightly", and the following config:
# # ghcup config add-release-channel https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml
# pack_options: >-
# GHCUP_GHC_OPTIONS="-u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-linux-deb10-int_native-validate.tar.xz?job=x86_64-linux-deb10-int_native-validate"
# CABAL_PROJECT=cabal.project.ghc-head
#- name: ci
# runner: ubuntu-latest
# command: cabal
# ghc_version: 9.14.1
# #pack_options: >-
# #CABAL_PROJECT=cabal.project.d/master
- name: ci
runner: macos-latest
command: cabal
ghc_version: 9.12.2
#pack_options: >-
#CABAL_PROJECT=cabal.project.d/master
- name: werror-fusion
runner: ubuntu-latest
command: cabal
ghc_version: 9.10.3
pack_options: >-
CABAL_BUILD_OPTIONS="--flag fusion-plugin"
CABAL_PROJECT=cabal.project.d/master-Werror
- name: ci
runner: ubuntu-latest
command: cabal
ghc_version: 9.8.4
#pack_options: >-
#CABAL_PROJECT=cabal.project.d/master
- name: ci
runner: ubuntu-latest
command: cabal
ghc_version: 9.6.3
#pack_options: >-
#CABAL_PROJECT=cabal.project.d/master
- name: ci
runner: ubuntu-latest
command: cabal
ghc_version: 9.4.4
#pack_options: >-
#CABAL_PROJECT=cabal.project.d/master
- name: ci
runner: ubuntu-latest
command: cabal
ghc_version: 9.2.7
#pack_options: >-
#CABAL_PROJECT=cabal.project.d/master
- name: ci
runner: ubuntu-latest
command: cabal
ghc_version: 8.10.7
pack_options: >-
DISABLE_DOCS="y"
#CABAL_PROJECT=cabal.project.d/master
#- name: ci
# runner: ubuntu-latest
# command: hlint
# pack_options: >-
# HLINT_VERSION=3.6.1
# HLINT_OPTIONS="lint"
# HLINT_TARGETS="src test Benchmark"
# #CABAL_PROJECT=cabal.project.d/master
- name: docspec
runner: ubuntu-latest
command: cabal
ghc_version: 9.12.2
pack_options: >-
ENABLE_DOCSPEC="y"
DOCSPEC_URL=https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20250606/cabal-docspec-0.0.0.20250606-x86_64-linux.xz
DOCSPEC_OPTIONS="--timeout 60"
#CABAL_PROJECT=cabal.project.d/master
- name: ci
runner: ubuntu-latest
command: stack
ghc_version: 9.10.3
pack_options: >-
STACK_UPGRADE="y"
DISABLE_SDIST_BUILD="y"
#CABAL_PROJECT=cabal.project
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
name: Cache common directories
with:
path: |
~/.local
~/.cabal
~/.stack
~/.ghcup
key: ${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.runner }}
- name: Download packcheck
run: |
if test ! -e "$PACKCHECK"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
chmod +x $PACKCHECK
elif test ! -x "$PACKCHECK"
then
chmod +x $PACKCHECK
fi
- name: Run packcheck
run: |
bash -c "$PACKCHECK $PACKCHECK_COMMAND"