Skip to content

Commit c6f369f

Browse files
committed
Merge pull request #486 from ariadne-cps/working into master
Release 2.1
2 parents dceac80 + 0f9056d commit c6f369f

File tree

582 files changed

+27738
-25250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

582 files changed

+27738
-25250
lines changed

.github/workflows/ci.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- working
8+
- actions
9+
pull_request:
10+
11+
env:
12+
BUILD_TYPE: Release
13+
14+
jobs:
15+
build:
16+
17+
name: ${{ matrix.config.name }}
18+
runs-on: ${{ matrix.config.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {
24+
name: "macOS 10.15 AppleClang",
25+
os: macos-10.15,
26+
cxx: "clang++"
27+
}
28+
- {
29+
name: "macOS 10.15 GCC 10",
30+
os: macos-10.15,
31+
cxx: "g++-10"
32+
}
33+
- {
34+
name: "Ubuntu 20.04 Clang 11",
35+
os: ubuntu-20.04,
36+
cxx: "clang++-11"
37+
}
38+
- {
39+
name: "Ubuntu 20.04 GCC 10",
40+
os: ubuntu-20.04,
41+
cxx: "g++-10"
42+
}
43+
44+
steps:
45+
- uses: actions/checkout@v2
46+
47+
- name: Get macOS Concurrency
48+
if: runner.os == 'macOS'
49+
run: |
50+
echo NPROC="sysctl -n hw.ncpu" >> $GITHUB_ENV
51+
echo "Running on $(sysctl -n hw.ncpu) threads ..."
52+
53+
- name: Get Linux Concurrency
54+
if: runner.os == 'Linux'
55+
run: |
56+
echo NPROC="nproc" >> $GITHUB_ENV
57+
echo "Running on $(nproc) threads ..."
58+
59+
- name: Set Up macOS Dependencies
60+
if: runner.os == 'macOS'
61+
run: |
62+
brew install ninja gcc@10 python3 mpfr cairo
63+
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
64+
sudo easy_install pip
65+
sudo pip3 install --upgrade pip
66+
sudo pip3 install pytest
67+
68+
- name: Set Up Linux Dependencies
69+
if: runner.os == 'Linux'
70+
run: |
71+
sudo apt install -y cmake ninja-build pkg-config clang-11 g++-10 libcairo2-dev libmpfr-dev python3-pip python3-dev
72+
sudo pip3 install pytest
73+
74+
- name: Create Build Environment
75+
run: cmake -E make_directory ${{runner.workspace}}/build
76+
77+
- name: Configure CMake
78+
working-directory: ${{runner.workspace}}/build
79+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} -G "Ninja" -DWERROR=ON
80+
81+
- name: Build Library and Bindings
82+
working-directory: ${{runner.workspace}}/build
83+
run: cmake --build . --parallel $($NPROC)
84+
85+
- name: Build Examples and Demonstrations
86+
working-directory: ${{runner.workspace}}/build
87+
run: cmake --build . --parallel $($NPROC) --target examples demonstrations
88+
89+
- name: Build Tests
90+
working-directory: ${{runner.workspace}}/build
91+
run: cmake --build . --parallel $($NPROC) --target tests
92+
93+
- name: Test
94+
working-directory: ${{runner.workspace}}/build
95+
run: ctest -j $($NPROC)
96+
97+
- name: Prepare Environment for Tutorials
98+
working-directory: ${{runner.workspace}}/build
99+
run: |
100+
sudo cmake --build . --target install
101+
cp -Rf $GITHUB_WORKSPACE/tutorials ${{runner.workspace}}/tutorials
102+
mkdir ${{runner.workspace}}/tutorials/python
103+
cp -Rf $GITHUB_WORKSPACE/python/tutorials/* ${{runner.workspace}}/tutorials/python
104+
105+
- name: Check C++ Rigorous Numerics Tutorial
106+
working-directory: ${{runner.workspace}}/tutorials/rigorous_numerics
107+
run: |
108+
cmake . -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} -G "Ninja"
109+
cmake --build . --parallel $($NPROC)
110+
./rigorous_numerics_tutorial -v 0 > /dev/null
111+
112+
- name: Check C++ Hybrid Evolution Tutorial
113+
working-directory: ${{runner.workspace}}/tutorials/hybrid_evolution
114+
run: |
115+
cmake . -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} -G "Ninja"
116+
cmake --build . --parallel $($NPROC)
117+
./hybrid_evolution_tutorial -v 0 > /dev/null
118+
119+
- name: Check Python Rigorous Numerics Tutorial
120+
working-directory: ${{runner.workspace}}/tutorials/python
121+
run: |
122+
export LD_LIBRARY_PATH=/usr/local/lib
123+
python3 rigorous_numerics_tutorial.py > /dev/null
124+
125+
- name: Check Python Hybrid Evolution Tutorial
126+
working-directory: ${{runner.workspace}}/tutorials/python
127+
run: |
128+
export LD_LIBRARY_PATH=/usr/local/lib
129+
python3 hybrid_evolution_tutorial.py > /dev/null

.github/workflows/codecov.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Code Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- working
8+
- actions
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Get Concurrency
19+
run: echo NPROC="nproc" >> $GITHUB_ENV
20+
21+
- name: Set Up Dependencies
22+
run: |
23+
sudo apt install -y cmake ninja-build pkg-config lcov g++-10 libcairo2-dev libmpfr-dev python3-pip python3-dev
24+
sudo pip3 install coverage pytest
25+
26+
- name: Create Build Environment
27+
run: cmake -E make_directory ${{runner.workspace}}/build
28+
29+
- name: Configure CMake
30+
working-directory: ${{runner.workspace}}/build
31+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-10 -G "Ninja" -DCOVERAGE=ON
32+
33+
- name: Build Library, Bindings and Tests
34+
working-directory: ${{runner.workspace}}/build
35+
run: cmake --build . --parallel $($NPROC) --target pyariadne tests
36+
37+
- name: Test
38+
working-directory: ${{runner.workspace}}/build
39+
run: ctest -j $($NPROC)
40+
41+
- name: Generate Code Coverage
42+
working-directory: ${{runner.workspace}}/ariadne
43+
run: |
44+
lcov --directory ${{runner.workspace}}/build --capture --output-file coverage.info
45+
lcov --remove coverage.info '/usr/*' --output-file coverage.info
46+
lcov --list coverage.info
47+
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "external/pybind11"]
2-
path = external/pybind11
1+
[submodule "python/pybind11"]
2+
path = python/pybind11
33
url = https://github.com/pybind/pybind11

.travis.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)