-
Notifications
You must be signed in to change notification settings - Fork 141
84 lines (80 loc) · 2.35 KB
/
main.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
name: pyGIMLi CI
on:
push:
branches:
- dev
pull_request:
branches:
- dev
jobs:
pgcore:
name: Building pgcore & bindings
runs-on: self-hosted
steps:
- name: Clean-up
run: rm -rf ~/.cache/pygimli
- name: Getting pyGIMLi sources
uses: actions/checkout@v4
with:
fetch-depth: 0 # checks out all branches and tags
path: source
- name: Running cmake
run: |
mkdir -p build
cd build
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ../source
- name: Build libgimli
run: make -j 8 gimli
working-directory: build
- name: Build Python bindings
run: make pygimli J=4
working-directory: build
pgtest:
name: Running tests
runs-on: self-hosted
needs: pgcore
env:
OPENBLAS_CORETYPE: "ARMV8" # current bug in OpenBlas core detection
steps:
- name: Run pg.test()
run: python3 -c "import pygimli; pygimli.test(show=False)"
working-directory: source
- name: Install as development package
working-directory: source
run: pip install -e . --break-system-packages --user # better to use virtual enviroment in the future
docs:
name: Build website with examples
needs: pgtest
runs-on: self-hosted
env:
DISPLAY: ":99.0"
PYVISTA_OFF_SCREEN: True
OPENBLAS_CORETYPE: "ARMV8" # current bug in OpenBlas core detection
steps:
- name: Clean gallery
working-directory: build
run: make clean-gallery
- name: Running sphinx
working-directory: build
run: xvfb-run make doc # xvfb is necessary for headless display of pyvista plots
merging:
name: Merging dev into master
runs-on: self-hosted
needs: docs
if: github.ref == 'refs/heads/dev' # Only merge from dev
steps:
- name: Merge into master
uses: devmasx/merge-branch@master
with:
type: now
target_branch: master
github_token: ${{ secrets.GITHUB_TOKEN }}
upload-html:
name: Upload HTML to dev.pygimli.org
runs-on: self-hosted
needs: docs
if: github.ref == 'refs/heads/dev' # Only merge from dev
steps:
- name: Merge into master
working-directory: build
run: rsync -avP --delete doc/html/ /var/www/html