Skip to content

Add missing Pyre mode headers] [batch:12/N] [shard:8/N] #3601

Add missing Pyre mode headers] [batch:12/N] [shard:8/N]

Add missing Pyre mode headers] [batch:12/N] [shard:8/N] #3601

Workflow file for this run

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, 9.4.7, 9.6.6, 9.8.2]
buildtype: [getdeps]
include:
- ghc: 9.4.7
buildtype: cabal
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
- if: matrix.buildtype == 'getdeps'
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
- 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"
- if: matrix.buildtype == 'getdeps'
name: Setup PACKAGES
run: |
echo "BUILD_PACKAGES=folly-clib fb-util fb-stubs mangle thrift-lib thrift-server thrift-compiler thrift-tests thrift-haxl thrift-cpp-channel thrift-http" >> "$GITHUB_ENV"
echo "TEST_PACKAGES=fb-util mangle thrift-lib thrift-server thrift-compiler thrift-tests thrift-http" >> "$GITHUB_ENV"
- if: matrix.buildtype == 'cabal'
name: Setup PACKAGES
run: |
echo "BUILD_PACKAGES=folly-clib fb-util fb-stubs mangle thrift-lib thrift-compiler thrift-haxl thrift-http" >> "$GITHUB_ENV"
echo "TEST_PACKAGES=fb-util mangle thrift-lib thrift-compiler thrift-http" >> "$GITHUB_ENV"
- if: matrix.buildtype == 'getdeps'
name: Install folly, fizz, wangle, fbthrift
run: ./new_install_deps.sh
- if: matrix.buildtype == 'getdeps'
name: Add fbthrift/thrift1 to PATH
run: echo "$HOME/.hsthrift/bin" >> "$GITHUB_PATH"
- if: matrix.buildtype == 'getdeps'
name: Set Cabal flags
run: |
echo CABAL_CONFIG_FLAGS="$CABAL_CONFIG_FLAGS -f-bundled-folly" >>"$GITHUB_ENV"
- if: matrix.buildtype == 'cabal'
name: Set Cabal flags
run: |
echo CABAL_CONFIG_FLAGS="$CABAL_CONFIG_FLAGS -f-fbthrift" >>"$GITHUB_ENV"
- if: matrix.buildtype == 'cabal'
name: Install dependencies needed by the Cabal build
run: |
apt-get install -y libfmt-dev
- name: Grab folly sources
run: |
apt-get install -y libfast-float-dev wget
make setup-folly
make setup-folly-version
- name: Setup cabal.project
run: |
ln -s cabal-github.project cabal.project
- name: Populate hackage index
run: cabal update
- if: matrix.buildtype == 'getdeps'
name: Generate C++ code from thrift files
run: make thrift-cpp
- name: Build everything up to thrift-compiler
run: cabal $CABAL_CONFIG_FLAGS build exe:thrift-compiler
- name: Generate Haskell code from thrift files
run: make thrift-hs
- name: Generate source distributions for all packages
run: |
cabal sdist $BUILD_PACKAGES
- 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 $CABAL_CONFIG_FLAGS build $BUILD_PACKAGES
working-directory: ./_sdists
- name: Run testsuites
run: cabal $CABAL_CONFIG_FLAGS test $TEST_PACKAGES --keep-going
working-directory: ./_sdists