-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (42 loc) · 2.07 KB
/
ubuntu.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
name: C/C++ CI Ubuntu
on: [push]
jobs:
build-in-ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
/var/cache/apt
/var/lib/apt/lists
${{ github.workspace }}/build/bin/Db*.solutions
key: ${{ runner.os }}-apt-${{ hashFiles('**/ubuntu.yml') }}
restore-keys: |
${{ runner.os }}-apt-
- name: OS prerequisites
run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt upgrade -y && sudo apt install -y libboost1.83-all-dev libxss-dev libx11-dev libxcb-screensaver0-dev ocl-icd-opencl-dev libopengl-dev freeglut3-dev libleveldb-dev libsnappy-dev libvulkan-dev liblz4-dev libfmt-dev librocksdb-dev libpython3-all-dev libopencl-clang-dev libtbb-dev ninja-build
- name: Create Build Dir
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure
working-directory: ${{github.workspace}}/build
run: cmake ${{github.workspace}} -DOPENMIND_BUILD_SAMPLES=OFF -DOPENMIND_BUILD_TESTS=ON -DOPENMIND_USE_OPENCL=OFF -G "Ninja Multi-Config"
# - name: Install prerequisites
# working-directory: ${{github.workspace}}/build
# run: cmake --build ${{github.workspace}}/build --target prerequisites -j `nproc`
# - name: ReConfigure to detect fetched prerequisites
# working-directory: ${{github.workspace}}/build
# run: cmake ${{github.workspace}}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build -j `nproc` --config Debug
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build -j `nproc` --config Release
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j`nproc` -C Release -E "ts" --rerun-failed --output-on-failure
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j`nproc` -C Debug -E "ts" --rerun-failed --output-on-failure