Code generation constructor for 'all' #30
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
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions | |
name: CI-ARM | |
on: [push, pull_request] | |
env: | |
LANG: en_US.UTF-8 | |
LOCAL_BIN: ${{ github.workspace }}/.local/bin | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: [8.10.7] | |
compiler: [clang] | |
runs-on: 4-core-ubuntu-arm | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Initialize APT | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl | |
- name: Setup en_US.UTF-8 locale | |
run: | | |
sudo apt-get install -y locales | |
sudo locale-gen en_US.UTF-8 | |
sudo update-locale LANG=en_US.UTF-8 | |
- name: Setup LOCAL_BIN environment | |
run: | | |
mkdir -p "$LOCAL_BIN" | |
echo "$LOCAL_BIN" >> "$GITHUB_PATH" | |
- name: Setup build time flags | |
run: | | |
echo "MAKEFLAGS=-j$(nproc)" >> "$GITHUB_ENV" | |
- name: Setup Haskell | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf "https://downloads.haskell.org/~ghcup/aarch64-linux-ghcup" -o "$LOCAL_BIN"/ghcup | |
chmod +x "$LOCAL_BIN"/ghcup | |
ghcup install cabal --set | |
sudo apt-get install -y build-essential libgmp-dev libnuma-dev | |
ghcup install ghc ${{ matrix.ghc }} --set | |
echo "$HOME/.ghcup/bin" >> "$GITHUB_PATH" | |
# This needs to be before the Clang step since they install GCC. We want to remove GCC if Clang is enabled. | |
- name: Install CMake and Boost | |
run : sudo apt-get install -y cmake libboost-all-dev | |
- name: Setup Clang | |
run: | | |
export VER=15 | |
sudo apt-get install -y clang-$VER | |
sudo apt-get remove -y gcc g++ | |
sudo apt-get autoremove -y | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-$VER 10 | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-$VER 10 | |
# needed for `ghc`, it actually invokes `gcc` explicitly. | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-$VER 10 | |
# needed for `hsc2hs`, `g++` is hardcoded into `hsc2hs-options`. | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-$VER 10 | |
# and ghc 8.10 on arm needs opt and llc from llvm-12 | |
- name: Install llvm tools for GHC/ARM | |
run : | | |
sudo apt-get install -y llvm-12 | |
sudo update-alternatives --install /usr/bin/opt opt /usr/lib/llvm-12/bin/opt 10 | |
sudo update-alternatives --install /usr/bin/llc llc /usr/lib/llvm-12/bin/llc 10 | |
- name: Install folly and rocksdb dependencies | |
run: | | |
sudo apt-get install -y git ninja-build \ | |
libaio-dev libbz2-dev libdouble-conversion-dev libdwarf-dev libgoogle-glog-dev libiberty-dev libjemalloc-dev \ | |
liblzma-dev liblz4-dev libsnappy-dev libsodium-dev libssl-dev libunwind-dev libzstd-dev | |
- name: Fetch hsthrift and build folly, rocksdb | |
run: ./install_deps.sh --threads 2 | |
- name: Nuke build artifacts | |
run: rm -rf /tmp/fbcode_builder_getdeps-Z__wZGleanZGleanZhsthriftZbuildZfbcode_builder-root/ | |
- name: Setup hsthrift environment | |
run: | | |
echo "LD_LIBRARY_PATH=$HOME/.hsthrift/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" | |
echo "PKG_CONFIG_PATH=$HOME/.hsthrift/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV" | |
echo "$HOME/.hsthrift/bin" >> "$GITHUB_PATH" | |
- name: Populate hackage index | |
run: cabal update | |
- name: Disable some tests | |
run: echo CABAL_CONFIG_FLAGS="-f-hack-tests -f-rust-tests -f-python-tests" >> "$GITHUB_ENV" | |
- name: Install hsthrift and Glean dependencies | |
run: sudo apt-get install -y pkg-config rsync libgmock-dev libpcre3-dev libtinfo-dev libxxhash-dev | |
- name: Build hsthrift and Glean | |
run: make | |
- name: Build glass | |
run: make glass | |
- name: Install glean-clang dependencies | |
run: sudo apt-get install -y clang-15 libclang-15-dev libclang-cpp15-dev libre2-dev | |
- name: Build glean-clang | |
run: make glean-clang | |
- name: Build hiedb-indexer | |
run: make glean-hiedb | |
# check the vscode extension builds | |
vscode: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Build VS Code Extension | |
run: npx vsce package | |
working-directory: glean/vscode | |
- name: Archive .vsix extension file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: glean-vsix | |
path: | | |
glean/vscode/*.vsix |