-
Notifications
You must be signed in to change notification settings - Fork 40
71 lines (58 loc) · 1.79 KB
/
core.yaml
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
name: Build and test core
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_core:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11]
include:
- os: ubuntu-20.04
- os: ubuntu-20.04
compiler: "clang"
- os: windows-2019
cmake_generator: "-G \"Visual Studio 16 2019\" -A x64"
- os: windows-2019
cmake_generator: "-G \"Visual Studio 16 2019\" -A Win32"
steps:
- uses: actions/checkout@v3
- name: Elevate privileges
if: ${{ !contains( matrix.os, 'windows') }}
run: |
echo "PRIVLEDGES=sudo" >> $GITHUB_ENV
- name: Install clang
if: ${{ matrix.compiler == 'clang' }}
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install clang
echo "CC=/usr/bin/clang" >> $GITHUB_ENV
echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV
- uses: './.github/actions/build_core_dependencies'
with:
privileges: $PRIVLEDGES
cmake_generator: ${{ matrix.cmake_generator }}
- name: Build dlisio
shell: bash
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_PYTHON=OFF \
${{ matrix.cmake_generator }}
- name: Install dlisio
shell: bash
run: |
$PRIVLEDGES cmake \
--build build \
--parallel \
--target install \
--config Release
- name: Test Core
shell: bash
run: |
cd build
ctest -C Release --output-on-failure