-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (58 loc) · 2 KB
/
build.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
name: "FlorisBoard NLP: Build"
on:
push:
branches: [ main ]
paths-ignore:
- ".github/ISSUE_TEMPLATE/**"
- ".github/FUNDING.yml"
- ".clang-format"
- ".clang-tidy"
- ".editorconfig"
- "CONTRIBUTING.md"
- "LICENSE"
- "README.md"
pull_request:
branches: [ main ]
jobs:
build_host:
name: "Build for Desktop"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up clang-16 dependencies & environment
run: |
sudo apt-get install -y libncurses5
echo "llvm_toolchain=$HOME/clang+llvm-16.0.3-x86_64-linux-gnu-ubuntu-22.04" >> "$GITHUB_ENV"
- name: Cache clang-16
id: restore-clang
uses: actions/cache@v3
with:
path: "${{ env.llvm_toolchain }}"
key: clang-download-ubuntu-22.04
- name: Download and extract clang-16
if: ${{ steps.restore-clang.outputs.cache-hit != 'true' }}
run: |
cd $HOME
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.3/clang+llvm-16.0.3-x86_64-linux-gnu-ubuntu-22.04.tar.xz
tar -xf clang+llvm-16.0.3-x86_64-linux-gnu-ubuntu-22.04.tar.xz
- name: "Set up CMake and Ninja"
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.26.0"
- name: "CMake: Configure release"
run: |
cmake --preset=release $(pwd) \
-DCMAKE_C_COMPILER="${{ env.llvm_toolchain }}/bin/clang" \
-DCMAKE_CXX_COMPILER="${{ env.llvm_toolchain }}/bin/clang++"
- name: "CMake: Build release"
run: |
cmake --build --preset=release $(pwd) \
-DCMAKE_C_COMPILER="${{ env.llvm_toolchain }}/bin/clang" \
-DCMAKE_CXX_COMPILER="${{ env.llvm_toolchain }}/bin/clang++"
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
with:
name: florisboard-nlp-artifacts
path: build/release/bin/*