-
Notifications
You must be signed in to change notification settings - Fork 75
98 lines (83 loc) · 2.73 KB
/
ci-linux-osx-conda.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
name: CI - Linux/OSX - Conda
on:
push:
pull_request:
jobs:
build-with-conda:
name: '[conda:${{ matrix.os }}:${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge
python-version: "3.10"
activate-environment: tsid
- name: Install dependencies [Conda]
shell: bash -l {0}
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
# Compilation related dependencies
mamba install cmake compilers make pkg-config doxygen ninja graphviz
# Main dependencies
mamba install tsid --only-deps
mamba install proxsuite osqp-eigen
- name: Activate ccache [Conda]
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-${{ matrix.type }}
max-size: 1G
- name: Print environment [Conda]
shell: bash -l {0}
run: |
conda info
mamba list
env
- name: Configure [Conda]
shell: bash -l {0}
run: |
echo $(whereis ccache)
echo $(which ccache)
git submodule update --init
mkdir build
cd build
cmake .. -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_PYTHON_INTERFACE:BOOL=ON -DPYTHON_EXECUTABLE=$(which python3) -DINSTALL_DOCUMENTATION:BOOL=ON -DBUILD_WITH_PROXQP:BOOL=ON -DBUILD_WITH_OSQP:BOOL=ON
- name: Build [Conda]
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} -v
- name: Build documentation [Conda]
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} --target doc
- name: Install [Conda]
shell: bash -l {0}
run: |
cd build
cmake --install . --config ${{ matrix.build_type }}
- name: Test [Conda]
shell: bash -l {0}
run: |
find $CONDA_PREFIX -name tsid*
python -c "import tsid"
cd build
ctest --output-on-failure -C ${{ matrix.build_type }}
- name: Uninstall [Conda]
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} --target uninstall
- name: Display ccache statistics [Conda]
shell: bash -l {0}
run: |
echo $(ccache -s)