Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CI #68

Merged
merged 9 commits into from
May 2, 2024
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
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env: &env
# Common options
# ------------------------------------------------------------------------
# GHC_OPTIONS: "-Werror"
GHCUPVER: 0.1.20.0
GHCUP_VERSION: 0.1.20.0
CABAL_REINIT_CONFIG: "y"
LC_ALL: "C.UTF-8"

Expand Down Expand Up @@ -57,7 +57,7 @@ env: &env
# 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: "v0.7.0"
PACKCHECK_GITHUB_COMMIT: "101c73b53473ddfb763d65058b80123991cfeb4f"

# image is a tag from docker registery
executors:
Expand All @@ -74,6 +74,7 @@ executors:

preinstall: &preinstall
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
# For sdl build flag
apt-get install -y libsdl2-dev
Expand All @@ -94,7 +95,7 @@ preinstall: &preinstall
apt-get install -y zlib1g-dev

# For ghcup to install ghc
if test -n "$GHCUPVER"
if test -n "$GHCUP_VERSION"
then
apt-get install -y gcc
apt-get install -y g++
Expand Down Expand Up @@ -244,7 +245,7 @@ jobs:
- run:
name: Hlint examples
environment:
HLINTVER: 3.6.1
HLINT_VERSION: 3.6.1
HLINT_OPTIONS: lint
HLINT_TARGETS: examples
command: |
Expand Down
38 changes: 26 additions & 12 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,50 @@ jobs:
STACK_UPGRADE: "y"

CABAL_CHECK_RELAX: y
CABAL_NO_SANDBOX: y

PACKCHECK: "./packcheck.sh"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.7.0"
PACKCHECK_GITHUB_COMMIT: "101c73b53473ddfb763d65058b80123991cfeb4f"

BUILD: ${{ matrix.build }}
GHCUPVER: 0.1.20.0
GHCUP_VERSION: 0.1.20.0
GHCVER: ${{ matrix.ghc_version }}
CABALVER: ${{ matrix.cabal_version }}
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
CABAL_PROJECT: ${{ matrix.cabal_project }}
DISABLE_DOCS: ${{ matrix.disable_docs }}
DISABLE_DOCS: "y"
DISABLE_TEST: "y"
DISABLE_BENCH: "y"
DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}

# XXX macos?
runs-on: macos-latest
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: 9.8.1
ghc_version: 9.8.1
runner: ubuntu-latest
build: cabal
cabal_project: cabal.project.user
cabal_version: 3.10.1.0
disable_sdist_build: "y"
ignore_error: false
- name: 9.6.3-macos
ghc_version: 9.6.3
runner: macos-latest
build: cabal
cabal_project: cabal.project.user
disable_sdist_build: "y"
cabal_version: 3.10.1.0
cabal_build_options: "--flag interop"
ignore_error: false
- name: 9.4.4
ghc_version: 9.4.4
runner: ubuntu-latest
build: cabal
cabal_project: cabal.project.user
cabal_version: 3.8.1.0
disable_docs: "y"
disable_sdist_build: "y"
ignore_error: false
- name: 9.2.7
Expand All @@ -53,17 +68,16 @@ jobs:
build: cabal
cabal_project: cabal.project.user
cabal_version: 3.6.2.0
disable_docs: "y"
disable_sdist_build: "y"
ignore_error: false
- name: 8.10.7+macOS
- name: 8.10.7 # There is some llvm versioning issue in 8.10.7 and the
# mac machine
ghc_version: 8.10.7
runner: macos-latest
runner: ubuntu-latest
build: cabal
cabal_project: cabal.project.user
disable_sdist_build: "y"
cabal_version: 3.6.2.0
disable_docs: "y"
cabal_build_options: "--flag interop"
ignore_error: false
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ 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/harendra-kumar/packcheck"
PACKCHECK_GITHUB_COMMIT: "a68b7b9c7c21eef8ed273e67030efb1d4fec027c"
PACKCHECK_GITHUB_COMMIT: "101c73b53473ddfb763d65058b80123991cfeb4f"

# Override the temp directory to avoid sed escaping issues
# See https://github.com/haskell/cabal/issues/5386
Expand Down
4 changes: 2 additions & 2 deletions examples/CSVParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Data.Stream as Stream
import qualified Streamly.FileSystem.Handle as Handle
import qualified System.IO as IO
import qualified Streamly.Internal.Data.Array.Stream as ArrayStream (splitOn)
import qualified Streamly.Internal.Data.Array as Array (compactOnByte)

main :: IO ()
main = do
inFile <- fmap head getArgs
src <- IO.openFile inFile ReadMode

Handle.readChunks src -- Stream IO (Array Word8)
& ArrayStream.splitOn 10 -- Stream IO (Array Word8)
& Array.compactOnByte 10 -- Stream IO (Array Word8)
& Stream.fold (Fold.drainMapM parseLine) -- IO ()

where
Expand Down
5 changes: 2 additions & 3 deletions examples/CoreUtilsHandle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Data.Stream as Stream
import qualified Streamly.FileSystem.Handle as Handle
import qualified Streamly.Unicode.Stream as Unicode

import qualified Streamly.Internal.Data.Array.Stream as ArrayStream (splitOn)
import qualified Streamly.Internal.Data.Array as Array (compactOnByte)

-- | Read the contents of a file to stdout.
--
Expand Down Expand Up @@ -74,7 +73,7 @@ wclChar src =
wcl :: Handle -> IO Int
wcl src =
Handle.readChunks src -- Stream IO (Array Word8)
& ArrayStream.splitOn 10 -- Stream IO (Array Word8)
& Array.compactOnByte 10 -- Stream IO (Array Word8)
& Stream.fold Fold.length -- IO ()

main :: IO ()
Expand Down
22 changes: 14 additions & 8 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
resolver: nightly-2023-12-14
resolver: lts-20.13
packages:
- '.'
extra-deps:
- lockfree-queue-0.2.4
#- streamly-core-0.1.0
#- streamly-0.9.0
#- fusion-plugin-0.2.6

# - git: https://github.com/composewell/streamly
# commit: 147750cc437388b276e07f69c25ceb4d1229bcc7
# - git: https://github.com/composewell/streamly
# commit: 147750cc437388b276e07f69c25ceb4d1229bcc7
# subdirs:
# - core
- git: https://github.com/composewell/streamly
commit: e4ce30bd6393080397ee52927372f33dcde94d0b
- git: https://github.com/composewell/streamly
commit: e4ce30bd6393080397ee52927372f33dcde94d0b
subdirs:
- core
# - lockfree-queue-0.2.4@sha256:156e7ccc193fc5d8b43f065e9cd31c3171c79ec25863283d546900d92930846d,2963
# - tasty-bench-0.3.2@sha256:e7678a19114e1ff5effbe9b96a4688fa085cee39a50003d1170ec271f83e0792,2209

rebuild-ghc-options: true

# For mac ports installed SDL library on Mac OS X
extra-include-dirs:
- /opt/local/include

flags:
mintty:
Win32-2-13-1: false
4 changes: 2 additions & 2 deletions streamly-examples.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ flag interop

common exe-dependencies
build-depends:
streamly == 0.10.0
, streamly-core == 0.2.0
streamly == 0.11.0
, streamly-core == 0.3.0
, base >= 4.9 && < 4.20
, directory >= 1.2 && < 1.4
, transformers >= 0.4 && < 0.7
Expand Down
Loading