Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
4eUeP committed May 23, 2024
1 parent 8649905 commit 24221e2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8"]
# ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8"]
ghc: ["9.0.2"]
cabal: ["3.8"]
# TODO:
# zk_server: ["3.4.14", "3.6.2"]
# zk_client: ["3.4.14", "3.6.2"]
os: [ubuntu-latest, macOS-latest]
#os: [ubuntu-latest, macOS-latest]
os: [macOS-latest]

name: ghc-${{ matrix.ghc }} cabal-${{matrix.cabal}} on ${{ matrix.os }}

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

- uses: actions/cache@v2
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-
#- name: xxx
# run: |
# type clang
# clang --version
# ghc --info
# tree $(brew --prefix llvm@15)
# exit 1

# FIXME: use the same client version as the one in the matrix
- name: Install zookeeper-dev on ubuntu
Expand All @@ -54,7 +54,7 @@ jobs:
if [ "$(uname -m)" == "arm64" ]; then
sed -i'.bak' -e "s/^clientPort=2181$/clientPort=2182/g" /opt/homebrew/etc/zookeeper/zoo.cfg
cat /opt/homebrew/etc/zookeeper/zoo.cfg
echo "BUILD_ARGS=--extra-include-dirs=/opt/homebrew/include --extra-lib-dirs=/opt/homebrew/lib" >> $GITHUB_ENV
# echo "BUILD_ARGS=--extra-include-dirs=/opt/homebrew/include --extra-lib-dirs=/opt/homebrew/lib" >> $GITHUB_ENV
else
sed -i'.bak' -e "s/^clientPort=2181$/clientPort=2182/g" /usr/local/etc/zookeeper/zoo.cfg
cat /usr/local/etc/zookeeper/zoo.cfg
Expand All @@ -66,11 +66,21 @@ jobs:
run: sudo rm -rf /Library/Developer/CommandLineTools/SDKs

- name: Setup Haskell
uses: haskell/actions/setup@v2
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- uses: actions/cache@v4
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-
- name: sdist
run: |
mkdir -p $HOME/sdist
Expand All @@ -82,10 +92,16 @@ jobs:
find $HOME/sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE -xzvf {} --strip 1 \;
- name: build
run: cabal build ${{ env.BUILD_ARGS }} --upgrade-dependencies --enable-tests --enable-benchmarks
run: |
export PATH="$(brew --prefix llvm@15)/bin:$PATH"
echo $PATH
type opt
cabal build cryptohash-sha1
exit 1
# cabal build ${{ env.BUILD_ARGS }} --upgrade-dependencies --enable-tests --enable-benchmarks
- name: test
run: cabal test ${{ env.BUILD_ARGS }} --test-show-details=always
run: cabal test --enable-tests ${{ env.BUILD_ARGS }} --test-show-details=always

- name: check
run: cabal check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
${{ runner.os }}-
- name: Setup Haskell
uses: haskell/actions/setup@v2
uses: haskell-actions/setup@v2
with:
# can't build docs on ghc-9.2 with cabal-3.8, see
# - https://github.com/haskell/cabal/issues/8104
Expand Down

0 comments on commit 24221e2

Please sign in to comment.