Skip to content

fix potential deadlock in the global watcher callback #124

fix potential deadlock in the global watcher callback

fix potential deadlock in the global watcher callback #124

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8"]
cabal: ["3.8"]
zk: ["3.4.14", "3.6.2"]
os: [ubuntu-latest, macOS-latest]
name: ghc-${{ matrix.ghc }} cabal-${{matrix.cabal}} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- 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: Install zookeeper-dev on ubuntu
if: runner.os == 'Linux'
# FIXME: use the same client version as the one in the matrix
run: sudo apt-get update && sudo apt-get install libzookeeper-mt-dev
- name: Install zookeeper-dev on osx
if: runner.os == 'macOS'
run: brew install zookeeper@${{ matrix.zk }}
- name: Setup zookeeper server on ubuntu
if: runner.os == 'Linux'
run: docker run --name some-zookeeper -p 2182:2181 -d zookeeper:${{ matrix.zk }}
- name: Setup zookeeper server on osx
if: runner.os == 'macOS'
run: |
# https://docs.brew.sh/Installation
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
else
sed -i'.bak' -e "s/^clientPort=2181$/clientPort=2182/g" /usr/local/etc/zookeeper/zoo.cfg
cat /usr/local/etc/zookeeper/zoo.cfg
fi
zkServer start
- name: remove xcode devtools on osx
if: runner.os == 'macOS'
run: sudo rm -rf /Library/Developer/CommandLineTools/SDKs
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: sdist
run: |
mkdir -p $HOME/sdist
cabal sdist --output-dir $HOME/sdist
- name: unpack
run: |
rm -rf $GITHUB_WORKSPACE/*
find $HOME/sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE -xzvf {} --strip 1 \;
- name: build
run: cabal build --upgrade-dependencies --enable-tests --enable-benchmarks
- name: test
run: cabal test --test-show-details=always
- name: check
run: cabal check
- name: haddock
run: cabal haddock