-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.45 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
libhdf5-dev \
libgmp-dev \
libmpfr-dev \
libmpc-dev \
libeigen3-dev;
- name: Download CADET-semi-analytic dependencies
run: |
# Download and build the required libraries if needed
# Note: Add commands here if any libraries need to be downloaded and built
- name: Create build directory
run: mkdir build && cd build
- name: Run CMake
working-directory: build
run: |
# Set environment variables for CMake to locate libraries
export GMP_ROOT=/usr/include
export MPFR_ROOT=/usr/include
export MPC_ROOT=/usr/include
export HDF5_ROOT=/usr/include
cmake -DCMAKE_INSTALL_PREFIX=install/ \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DUSE_FADBAD=ON \
-DENABLE_TESTS=OFF \
..
- name: Build
working-directory: build
run: make -j$(nproc)
- name: Install
working-directory: build
run: make install
- name: Verify installation
run: |
./build/install/bin/cadet-cli --version