-
Notifications
You must be signed in to change notification settings - Fork 8
79 lines (70 loc) · 2.15 KB
/
CI_cmake_build.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
name: CI based on CMake build
on:
push:
pull_request:
jobs:
cmake_build_test:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
defaults:
run:
# We need login shells (-l) for micromamba to work.
shell: bash -leo pipefail {0}
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
- name: Prepare mamba installation
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
# setup correct python version
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
- name: Build and install XCDF with Python bindings
run: |
cmake --version
cc --version
c++ --version
python --version
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=~/.local/xcdf
echo "Building...."
cmake --build build -- -j 2
echo "Installing..."
cmake --install build
- name: CTest suite
run: |
cd build
make test
doxygen-html-docs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
- name: HTML Documentation only Doxygen (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
echo "Installing dependencies..."
sudo apt update
sudo apt install -y doxygen
cd docs
make doxygen-html
- name: mamba setup (only for macos)
if: matrix.os == 'macos-latest'
uses: mamba-org/provision-with-micromamba@v14
- name: HTML Documentation only Doxygen (macos)
if: matrix.os == 'macos-latest'
# We need login shells (-l) for micromamba to work.
shell: bash -leo pipefail {0}
run: |
cd docs
make doxygen-html