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
56 changes: 46 additions & 10 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
# 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: "3f0f1d1dd8252a8e8b5256bc86428b46039d8dba"
PACKCHECK_GITHUB_COMMIT: "b8579a2d2a75c9d9cad5957eea63855a2e14a91d"

# ubuntu seems to have better support than debian on CI systems
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -217,8 +217,10 @@ jobs:
runner: windows-latest
command: cabal
ghc_version: 9.14.1
# On Windows, DISABLE_SDIST_BUILD is useful for (1) avoiding
# path length restriction, (2) avoid installing autoreconf
# for configure builds.
# WARNING! cannot use # comments inside pack_options.
# DISABLE_SDIST_BUILD for shorter paths on Windows
pack_options: >-
DISABLE_SDIST_BUILD="y"
CABAL_PROJECT=cabal.project.user
Expand Down Expand Up @@ -271,6 +273,38 @@ jobs:

- uses: actions/checkout@v4

# The macOS image may ship Command Line Tools newer than the default
# Xcode (e.g. CLT 27.0 with Xcode 26.6). Linking against the CLT SDK then
# fails with "tapi error: malformed file ... unknown architecture
# arm64e.x1-macos". Select the default Xcode so that the compiler, linker
# and SDK come from the same toolchain. packcheck clears the environment,
# so SDKROOT or DEVELOPER_DIR cannot be used instead.
#
# The GHC bindists for macOS hardcode the CLT SDK path from their build
# machine, e.g. the rts and ghci package confs of GHC 9.14.1 have
# /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib in
# library-dirs, so the linker uses the CLT SDK even when Xcode is
# selected. Point the CLT MacOSX.sdk symlink at the Xcode SDK.
#
# The GHC and dependency cache keys include the Xcode version and build,
# so a runner image with a different Xcode installs GHC afresh.
- name: Select default Xcode (macOS)
id: xcode
if: runner.os == 'macOS'
run: |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcode-select -p
sdk=$(xcrun --show-sdk-path)
echo "$sdk"
clt=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
if test -L "$clt"; then
ls -ld "$clt"
sudo ln -sfn "$sdk" "$clt"
ls -ld "$clt"
fi
ver=$(xcodebuild -version | awk 'NR==1{v=$2} /Build version/{b=$3} END{print v "-" b}')
echo "toolchain=-xcode-$ver" >> "$GITHUB_OUTPUT"

# This should happen before cache restore.
- name: Remove ~/.ghcup symlink (non-Windows)
if: runner.os != 'Windows'
Expand All @@ -280,15 +314,16 @@ jobs:
# See the "cabal path" output in the CI logs to tweak the cache
# locations.

# Shared by all tests, all platforms
# Shared by all tests, all platforms. Other workflows can restore it
# with the same key.
- name: Restore hackage package index (non-Windows)
id: restore-hackage
uses: actions/cache/restore@v4
if: runner.os != 'Windows'
with:
path: |
~/.cache/cabal/packages
key: cabal-hackage-index-non-windows
key: cabal-hackage-index

# GHC is not test/options specific
- name: Restore ghcup and ghc (non-Windows)
Expand All @@ -298,7 +333,7 @@ jobs:
with:
path: |
~/.ghcup
key: ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}
key: ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}${{ steps.xcode.outputs.toolchain }}

# GHC is not test/options specific
#- name: Restore ghcup and ghc (Windows)
Expand Down Expand Up @@ -329,7 +364,7 @@ jobs:
~/.local/bin
~/.local/state/cabal
~/.stack
key: ${{ matrix.command }}-deps-ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}-${{ matrix.name }}
key: ${{ matrix.command }}-deps-ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}-${{ matrix.name }}${{ steps.xcode.outputs.toolchain }}

# Deps are test/options specific
- name: Restore build dependencies, hackage index, local/bin (Windows)
Expand Down Expand Up @@ -400,7 +435,8 @@ jobs:
ARGS="$ARGS CABAL_BUILDDIR=\"/c/b\" WINVER=$WINVER"
ARGS="$ARGS NUMBER_OF_PROCESSORS=$NUMBER_OF_PROCESSORS"
ARGS="$ARGS PROCESSOR_IDENTIFIER=\"$PROCESSOR_IDENTIFIER\""
PATH_VAR="$PATH_VAR:/c/ghcup:/c/Program Files/7-Zip:/mingw64/bin"
# Git for Windows 2.56 moved /mingw64 to /ucrt64
PATH_VAR="$PATH_VAR:/c/ghcup:/c/Program Files/7-Zip:/ucrt64/bin:/mingw64/bin"
;;
esac
ARGS="$ARGS PATH=\"$PATH_VAR\""
Expand Down Expand Up @@ -437,14 +473,14 @@ jobs:
if: always() && steps.deps-only.outcome == 'success' && runner.os != 'Windows' && steps.restore-hackage.outputs.cache-hit != 'true'
with:
path: ~/.cache/cabal/packages
key: cabal-hackage-index-non-windows
key: cabal-hackage-index

- name: Save ghcup and ghc (non-Windows)
uses: actions/cache/save@v4
if: always() && steps.deps-only.outcome == 'success' && runner.os != 'Windows' && steps.restore-ghcup.outputs.cache-hit != 'true'
with:
path: ~/.ghcup
key: ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}
key: ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}${{ steps.xcode.outputs.toolchain }}

# On Windows, ghc restore step takes 2-3 minutes whereas installing
# GHC takes less than 2 minutes. On top of this saving the ghc cache
Expand All @@ -466,7 +502,7 @@ jobs:
~/.local/bin
~/.local/state/cabal
~/.stack
key: ${{ matrix.command }}-deps-ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}-${{ matrix.name }}
key: ${{ matrix.command }}-deps-ghc-${{ matrix.ghc_version }}-v${{ matrix.ghc_salt }}-${{ matrix.runner }}-${{ matrix.name }}${{ steps.xcode.outputs.toolchain }}

# hackage package index is part of C:/cabal
# Deps are test/options specific, hence, matrix.name in the key
Expand Down
14 changes: 11 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ environment:
# DISABLE_BENCH: "y"
# DISABLE_DOCS: "y"
# DISABLE_DIST_CHECKS: "y"
# DISABLE_SDIST_BUILD: "y"
# On Windows, DISABLE_SDIST_BUILD is useful for (1) avoiding
# path length restriction, (2) avoid installing autoreconf
# for configure builds.
DISABLE_SDIST_BUILD: "y"
# Note: these require the "diff" utility.
# DISABLE_SDIST_GIT_CHECK: "y"
DISABLE_SDIST_PROJECT_CHECK: "y"
Expand All @@ -55,12 +58,16 @@ environment:
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "3f0f1d1dd8252a8e8b5256bc86428b46039d8dba"
PACKCHECK_GITHUB_COMMIT: "b8579a2d2a75c9d9cad5957eea63855a2e14a91d"

# Override the temp directory to avoid sed escaping issues
# See https://github.com/haskell/cabal/issues/5386
TMP: "c:\\tmp"

# ------------------------------------------------------------------------
# Usually you do not need to change anything below this line
# ------------------------------------------------------------------------

# Bump the -> version to clear the cache
# packcheck uses "%APPDATA%\\local" to install tools like hlint etc.
# cabal may use "%APPDATA%\\cabal" or "c:\\cabal"
Expand All @@ -72,7 +79,8 @@ cache:
- "C:\\ghcup"
- "C:\\cabal"

# Folder where the repository is cloned.
# Folder where the repository is cloned. Kept as short as possible to avoid
# long path issues on Windows.
clone_folder: "c:\\pkg"
build: off

Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ resolver: lts-24.37
packages:
- '.'
extra-deps:
- streamly-core-0.3.0
- streamly-0.11.0
- streamly-core-0.3.2
- streamly-0.11.1
- streamly-fsevents-0.1.1

#- git: https://github.com/composewell/streamly
Expand Down
4 changes: 2 additions & 2 deletions streamly-examples.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ flag interop

common exe-dependencies
build-depends:
streamly == 0.11.0
, streamly-core == 0.3.0
streamly >= 0.11.0 && < 0.11.2
, streamly-core >= 0.3.0 && < 0.3.3
, streamly-fsevents >= 0.1.0 && < 0.2
, base >= 4.9 && < 4.23
, directory >= 1.2 && < 1.4
Expand Down
Loading