Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ save: &save
save_cache:
key: v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
paths:
- ~/.local
- ~/.local/bin
- ~/.cabal
- ~/.stack
- ~/.ghcup
Expand Down
26 changes: 19 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ freebsd_instance:
task:
name: FreeBSD+ghc-9.10.3+cabal
env:
BUILD_TYPE: cabal
PACKCHECK_COMMAND: cabal

# ------------------------------------------------------------------------
# Common options
Expand Down Expand Up @@ -45,11 +45,6 @@ task:
CABAL_CHECK_RELAX: y
CABAL_PROJECT: cabal.project

# ------------------------------------------------------------------------
# Where to find the required tools
# ------------------------------------------------------------------------
PATH: /usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin

# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
# ------------------------------------------------------------------------
Expand All @@ -63,6 +58,18 @@ task:
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "fac7ab9aad48d5b80a1d65efb34ff353a848e927"

cabal_cache:
folder: ~/.cabal
fingerprint_script: cat *.cabal cabal.project 2>/dev/null || cat *.cabal

ghcup_cache:
folder: ~/.ghcup
fingerprint_script: echo $GHCUP_VERSION $GHCVER

#local_bin_cache:
# folder: ~/.local/bin
# fingerprint_script: echo $HLINT_VERSION

deps_install_script: |
pkg install -y gmake
pkg install -y bash
Expand All @@ -83,4 +90,9 @@ task:
fi

packcheck_run_script: |
bash -c "$PACKCHECK $BUILD_TYPE"
PTH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Use "bash -c" instead of invoking directly to preserve quoted
# arguments in PACKCHECK_COMMAND e.g. DOCSPEC_OPTIONS="--timeout 60".
# Direct invocation would word-split on spaces inside quoted values.
bash -c "$PACKCHECK $PACKCHECK_COMMAND PATH=$PTH"

52 changes: 42 additions & 10 deletions .github/workflows/packcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ jobs:
# ------------------------------------------------------------------------
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 ).
# ------------------------------------------------------------------------
Expand Down Expand Up @@ -192,25 +187,51 @@ jobs:
STACK_UPGRADE="y"
DISABLE_SDIST_BUILD="y"

- name: ci
runner: windows-latest
command: cabal
ghc_version: 9.10.3
pack_options: >-
CABAL_PROJECT=cabal.project
DISABLE_SDIST_BUILD="y"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/cache@v4
name: Cache common directories
name: Cache common directories (non-Windows)
if: runner.os != 'Windows'
with:
# On macos ghcup gets installed in ~/.ghcup
# On Linux it is /usr/local/.ghcup
path: |
~/.local
~/.local/bin
~/.cabal
~/.stack
~/.ghcup
/usr/local/.ghcup
# Bump the key version to clear the cache
key: ${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.runner }}

- uses: actions/cache@v4
name: Cache common directories (Windows)
if: runner.os == 'Windows'
with:
path: |
${{ env.APPDATA }}/local/bin
C:/ghcup
C:/cabal
key: ${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.runner }}

- name: Download packcheck
# on windows-latest GitHub Actions defaults to PowerShell
shell: bash
run: |
if test ! -e "$PACKCHECK"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
die "PACKCHECK_GITHUB_COMMIT env var is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
Expand All @@ -221,5 +242,16 @@ jobs:
fi

- name: Run packcheck
# on windows-latest GitHub Actions defaults to PowerShell
shell: bash
run: |
bash -c "$PACKCHECK $PACKCHECK_COMMAND"
PATH_VAR=/sbin:/usr/sbin:/bin:/usr/bin
case "$(uname)" in
CYGWIN*|MINGW*|MSYS*)
PATH_VAR="$PATH_VAR:/c/Program Files/7-Zip:/mingw64/bin"
;;
esac
# Use "bash -c" instead of invoking directly to preserve quoted
# arguments in PACKCHECK_COMMAND e.g. DOCSPEC_OPTIONS="--timeout 60".
# Direct invocation would word-split on spaces inside quoted values.
bash -c "$PACKCHECK $PACKCHECK_COMMAND PATH=\"$PATH_VAR\""
9 changes: 5 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ environment:
# DISABLE_TEST: "y"
# DISABLE_BENCH: "y"
# DISABLE_DOCS: "y"
DISABLE_DIST_CHECKS: "y"
DISABLE_SDIST_BUILD: "y"
# DISABLE_DIST_CHECKS: "y"
# DISABLE_SDIST_BUILD: "y"
# Note: these require the "diff" utility.
# DISABLE_SDIST_GIT_CHECK: "y"
# DISABLE_SDIST_PROJECT_CHECK: "y"
DISABLE_SDIST_PROJECT_CHECK: "y"

# ------------------------------------------------------------------------
# cabal options
# ------------------------------------------------------------------------
CABAL_CHECK_RELAX: "y"
CABAL_PROJECT: "cabal.project"
#CABAL_PROJECT: "cabal.project"

# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
Expand All @@ -68,6 +68,7 @@ environment:
cache:
- "%APPDATA%\\local\\bin -> v1"
- "%APPDATA%\\cabal"
- "%LOCALAPPDATA%\\cabal"
- "C:\\ghcup"
- "C:\\cabal"

Expand Down
Loading
Loading