-
-
Notifications
You must be signed in to change notification settings - Fork 51
148 lines (128 loc) · 4.42 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: ${{ matrix.config.name }} SCALAR_DOUBLE=${{ matrix.scalar_double }}
runs-on: ${{ matrix.config.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
scalar_double: ["OFF", "ON"]
config:
- {
name: "macOS Clang",
os: macos-latest,
generator: "Ninja",
}
- {
name: "Ubuntu GCC",
os: ubuntu-latest,
generator: "Ninja",
}
- {
name: "Windows MSVC",
os: windows-latest,
generator: "Ninja",
}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup (Windows)
if: matrix.config.os == 'windows-latest'
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Dependencies (macOS)
if: matrix.config.os == 'macos-latest'
run: |
#with cgal: brew install cgal ninja qt5 tbb
brew install ninja qt5 tbb
echo "Qt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5" >> $GITHUB_ENV
- name: Install Dependencies (Ubuntu)
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libcgal-dev libtbb-dev ninja-build qtbase5-dev
# DGM: caching conda doesn't seem to work properly anymore
#- name: Conda Cache (Windows)
# if: matrix.config.os == 'windows-latest'
# uses: actions/cache@v3
# with:
# path: C:\Miniconda3\envs\CCCoreLib
# key: conda-cache-${{ runner.os }}-${{ hashFiles('.ci/conda.yml') }}
# DGM: without caching, using conda takes too long...
#- name: Install Dependencies (Windows)
# if: matrix.config.os == 'windows-latest'
# uses: conda-incubator/setup-miniconda@v2
# with:
# activate-environment: CCCoreLib
# auto-activate-base: false
# environment-file: .ci/conda.yml
# channels: conda-forge
# miniconda-version: 'latest'
# DGM: we'll just use Qt for now (and not CGAL)
- name: Install Qt
if: matrix.config.os == 'windows-latest'
uses: jurplel/install-qt-action@v3
- name: Configure MSVC console (Windows)
if: matrix.config.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Set environment for MSVC (Windows)
if: matrix.config.os == 'windows-latest'
run: |
# Set these env vars so cmake picks the correct compiler
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
echo "CXX=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CC=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Configure (macOS)
if: matrix.config.os == 'macos-latest'
run: >
mkdir cccorelib-build
cmake
-B cccorelib-build
-G "${{ matrix.config.generator }}"
-DCMAKE_BUILD_TYPE=Release
-DCCCORELIB_USE_CGAL=FALSE
-DCCCORELIB_USES_TBB=TRUE
-DCCCORELIB_SCALAR_DOUBLE=${{ matrix.scalar_double }}
.
- name: Configure (Ubuntu)
if: matrix.config.os == 'ubuntu-latest'
run: >
mkdir cccorelib-build
cmake
-B cccorelib-build
-G "${{ matrix.config.generator }}"
-DCMAKE_BUILD_TYPE=Release
-DCCCORELIB_USE_CGAL=TRUE
-DCCCORELIB_USES_TBB=TRUE
-DCCCORELIB_SCALAR_DOUBLE=${{ matrix.scalar_double }}
.
- name: Configure (Windows)
if: matrix.config.os == 'windows-latest'
run: >
mkdir cccorelib-build
cmake
-B cccorelib-build
-G "${{ matrix.config.generator }}"
-DCMAKE_BUILD_TYPE=Release
# DGM: without caching, using conda takes tool long...
#-DCCCORELIB_USE_CGAL=TRUE
-DCCCORELIB_USE_CGAL=FALSE
-DCCCORELIB_USES_TBB=TRUE
-DCCCORELIB_SCALAR_DOUBLE=${{ matrix.scalar_double }}
.
- name: Build
run: |
cmake --build cccorelib-build