generated from allen-cell-animated/github-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 7
189 lines (185 loc) · 6.05 KB
/
build_and_test.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: C++ Build
on:
push:
branches-ignore:
- "master"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
pre-build-command: "apt-get --allow-releaseinfo-change update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended"
build-command: "make latexpdf"
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: docs/_build/html/
- uses: actions/upload-artifact@v3
with:
name: agave-macos
path: docs/_build/latex/agave.pdf
- uses: actions/upload-artifact@v3
with:
name: agave-win
path: docs/_build/latex/agave.pdf
docs_pythonclient:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "agave_pyclient/docs/"
pre-build-command: "pip install -e ./agave_pyclient"
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "agave_pyclient/docs/"
pre-build-command: "pip install -e ./agave_pyclient && apt-get --allow-releaseinfo-change update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended"
build-command: "make latexpdf"
- uses: actions/upload-artifact@v3
with:
name: DocumentationPythonClientHTML
path: agave_pyclient/docs/_build/html/
- uses: actions/upload-artifact@v3
with:
name: agave-macos
path: agave_pyclient/docs/_build/latex/agave_pyclient.pdf
- uses: actions/upload-artifact@v3
with:
name: agave-win
path: agave_pyclient/docs/_build/latex/agave_pyclient.pdf
cmake-build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
modules: qtwebsockets qtimageformats
- name: macos install deps
if: matrix.os == 'macos-latest'
env:
CC: clang
CXX: clang++
run: |
export MACOSX_DEPLOYMENT_TARGET=10.15
brew install spdlog glm libtiff nasm zstd
- name: macos build and test
if: matrix.os == 'macos-latest'
env:
CC: clang
CXX: clang++
run: |
export MACOSX_DEPLOYMENT_TARGET=10.15
mkdir ./build
cd build
cmake ..
cmake --build . --target agave_test --config Release
sudo cmake --build . --target install --config Release
zip -vr agave-macos.zip agave.app/
shell: bash
- name: Upload mac artifact
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: agave-macos
path: ./build/agave-macos.zip
- name: linux install deps
if: matrix.os == 'ubuntu-latest'
env:
CC: gcc
CXX: g++
run: |
sudo apt-get install libspdlog-dev libglm-dev libgl1-mesa-dev libegl1-mesa-dev libtiff-dev libzstd-dev nasm
- name: linux build and test
if: matrix.os == 'ubuntu-latest'
env:
CC: gcc-10
CXX: g++-10
run: |
mkdir ./build
cd build
cmake ..
cmake --build . --target agave_test --config Release
cmake --build . --target install --config Release
shell: bash
- name: windows install deps
if: matrix.os == 'windows-latest'
env:
vc_arch: "x64"
run: |
vcpkg install --triplet x64-windows tiff glm zlib libjpeg-turbo liblzma spdlog zstd
- name: windows get nasm
if: matrix.os == 'windows-latest'
uses: ilammy/setup-nasm@v1
- name: windows build and test
if: matrix.os == 'windows-latest'
env:
vc_arch: "x64"
run: |
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -A x64 ..
cmake --build . --target agave_test --config Release
cmake --build . --target agaveapp --config Release
cmake --build . --target INSTALL --config Release
cmake --install .
powershell Compress-Archive -Path .\agave-install -DestinationPath agave-win.zip
shell: cmd
- name: Upload windows artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: agave-win
path: ./build/agave-win.zip
lint-and-test-webclient:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: |
cd webclient
npm ci
npm run lint
npm run typeCheck
npm run test --if-present
lint-and-test-pyclient:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
cd agave_pyclient
pip install .[test]
- name: Lint with flake8
run: |
cd agave_pyclient
flake8 agave_pyclient --count --verbose --show-source --statistics
black --check --exclude vendor agave_pyclient
pytest agave_pyclient/tests/