-
Notifications
You must be signed in to change notification settings - Fork 44
133 lines (109 loc) · 4.63 KB
/
ci-aarch64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# 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