Updating submodules #3175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
LANG: en_US.UTF-8 | |
LOCAL_BIN: ${{ github.workspace }}/.local/bin | |
jobs: | |
ci-getdeps: | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: [8.6.5, 8.8.4, 8.10.7, 9.2.8] | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:24.04 | |
options: --security-opt=seccomp=unconfined | |
env: | |
LD_LIBRARY_PATH: "/github/home/.hsthrift/lib" | |
PKG_CONFIG_PATH: "/github/home/.hsthrift/lib/pkgconfig" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Initialize APT | |
run: | | |
apt-get update | |
apt-get install -y curl | |
- name: Setup en_US.UTF-8 locale | |
run: | | |
apt-get install -y locales | |
locale-gen en_US.UTF-8 | |
update-locale LANG=en_US.UTF-8 | |
- name: Setup LOCAL_BIN environment | |
run: | | |
mkdir -p "$LOCAL_BIN" | |
echo "$LOCAL_BIN" >> "$GITHUB_PATH" | |
- name: Env | |
run: env | |
- name: Drop system libfmt | |
run: apt-get remove -y libfmt-dev | |
- name: Install required packages | |
run : >- | |
apt-get install -y | |
g++ | |
cmake | |
make | |
ninja-build | |
bison | |
flex | |
git | |
curl | |
rsync | |
m4 | |
libzstd-dev | |
libboost-all-dev | |
libevent-dev | |
libdouble-conversion-dev | |
libgoogle-glog-dev | |
libgflags-dev | |
libiberty-dev | |
liblz4-dev | |
liblzma-dev | |
libsnappy-dev | |
zlib1g-dev | |
binutils-dev | |
libjemalloc-dev | |
libssl-dev | |
pkg-config | |
libunwind-dev | |
libsodium-dev | |
libpcre3-dev | |
libfftw3-dev | |
libxxhash-dev | |
libgtest-dev | |
libtinfo-dev | |
libfast-float-dev | |
- name: Setup Haskell | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf "https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup" -o "$LOCAL_BIN"/ghcup | |
chmod +x "$LOCAL_BIN"/ghcup | |
ghcup install cabal --set | |
apt-get install -y build-essential libgmp-dev libnuma-dev | |
ghcup install ghc ${{ matrix.ghc }} --set | |
echo "$HOME/.ghcup/bin" >> "$GITHUB_PATH" | |
- name: Install folly, fizz, wangle, fbthrift | |
run: ./new_install_deps.sh | |
- name: Add fbthrift/thrift1 to PATH | |
run: echo "$HOME/.hsthrift/bin" >> "$GITHUB_PATH" | |
- name: Populate hackage index | |
run: cabal update | |
- name: Generate C++ code from thrift files | |
run: make thrift-cpp | |
- name: Build everything up to thrift-compiler | |
run: cabal build --project-file=ci.cabal.project exe:thrift-compiler | |
- name: Generate Haskell code from thrift files | |
run: make thrift-hs | |
- name: Generate source distributions for all packages | |
run: cabal sdist --project-file=ci.cabal.project all | |
- name: Unpack source distributions in new directory | |
run: | | |
mkdir _sdists | |
cd _sdists | |
for f in $(ls ../dist-newstyle/sdist/*.tar.gz); do | |
tar xzf $f; | |
done | |
cp ../ci-sdist.cabal.project cabal.project | |
cd .. | |
- name: Build all packages | |
run: cabal build all | |
working-directory: ./_sdists | |
- name: Run testsuites | |
run: cabal test mangle fb-util thrift-compiler thrift-lib thrift-tests thrift-server --keep-going | |
working-directory: ./_sdists |