-
Notifications
You must be signed in to change notification settings - Fork 9
133 lines (115 loc) · 4.53 KB
/
release.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
name: Release
on:
push:
branches:
- master
pull_request:
env:
BUILD_TYPE: Release
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "macOS 13 AppleClang 14 [Release]",
os: macos-13,
cxx-cmd: "clang++",
pyld: "DY"
}
- {
name: "macOS 13 GCC 12 [Release]",
os: macos-13,
cxx-pkg: "gcc@12",
cxx-cmd: "g++-12"
}
- {
name: "Ubuntu 22.04 Clang 15 [Release]",
os: ubuntu-22.04,
cxx-pkg: "clang-15",
cxx-cmd: "clang++-15"
}
- {
name: "Ubuntu 22.04 GCC 10 [Release]",
os: ubuntu-22.04,
cxx-pkg: "g++-10",
cxx-cmd: "g++-10"
}
- {
name: "Ubuntu 22.04 GCC 12 [Release]",
os: ubuntu-22.04,
cxx-pkg: "g++-12",
cxx-cmd: "g++-12"
}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Get macOS Concurrency
if: runner.os == 'macOS'
run: |
echo NPROC="sysctl -n hw.ncpu" >> $GITHUB_ENV
echo "Running on $(sysctl -n hw.ncpu) threads ..."
- name: Get Linux Concurrency
if: runner.os == 'Linux'
run: |
echo NPROC="nproc" >> $GITHUB_ENV
echo "Running on $(nproc) threads ..."
- name: Set Up macOS Dependencies
if: runner.os == 'macOS'
run: |
brew install ninja gcc@12 mpfr cairo gnuplot pkg-config
- name: Set Up Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt install -y cmake ninja-build pkg-config ${{matrix.config.cxx-pkg}} libcairo2-dev gnuplot libmpfr-dev python3-pip python3.11-dev
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
sudo pip3 install pytest
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=${{matrix.config.cxx-cmd}} -G "Ninja" -DWERROR=ON
- name: Build Library and Bindings
working-directory: ${{runner.workspace}}/build
run: cmake --build . --parallel $($NPROC)
- name: Build Examples and Demonstrations
working-directory: ${{runner.workspace}}/build
run: cmake --build . --parallel $($NPROC) --target examples demonstrations
- name: Prepare Environment for Tutorials
working-directory: ${{runner.workspace}}/build
run: |
sudo cmake --build . --target install
cp -Rf $GITHUB_WORKSPACE/tutorials ${{runner.workspace}}/tutorials
mkdir ${{runner.workspace}}/tutorials/python
cp -Rf $GITHUB_WORKSPACE/python/tutorials/* ${{runner.workspace}}/tutorials/python
- name: Check C++ Rigorous Numerics Tutorial
working-directory: ${{runner.workspace}}/tutorials/rigorous_numerics
run: |
export ${{matrix.config.pyld}}LD_LIBRARY_PATH=/usr/local/lib
cmake . -DCMAKE_CXX_COMPILER=${{matrix.config.cxx-cmd}} -G "Ninja"
cmake --build . --parallel $($NPROC)
./rigorous_numerics_tutorial
- name: Check C++ Hybrid Evolution Tutorial
working-directory: ${{runner.workspace}}/tutorials/hybrid_evolution
run: |
export ${{matrix.config.pyld}}LD_LIBRARY_PATH=/usr/local/lib
cmake . -DCMAKE_CXX_COMPILER=${{matrix.config.cxx-cmd}} -G "Ninja"
cmake --build . --parallel $($NPROC)
./hybrid_evolution_tutorial
- name: Check Python Rigorous Numerics Tutorial
working-directory: ${{runner.workspace}}/tutorials/python
run: |
export ${{matrix.config.pyld}}LD_LIBRARY_PATH=/usr/local/lib
export PYTHONPATH=/usr/local/lib/python3.11/site-packages/:/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/
python3 rigorous_numerics_tutorial.py
- name: Check Python Hybrid Evolution Tutorial
working-directory: ${{runner.workspace}}/tutorials/python
run: |
export ${{matrix.config.pyld}}LD_LIBRARY_PATH=/usr/local/lib
export PYTHONPATH=/usr/local/lib/python3.11/site-packages/:/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/
python3 hybrid_evolution_tutorial.py