-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (51 loc) · 1.48 KB
/
github_actions(Linux&Mac).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
name: C/C++ CI
on:
push:
jobs:
example_matrix:
strategy:
matrix:
os: [ubuntu-22.04, macos-latest]
python-version: ["3.9"]
compiler: [gcc]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash # Use bash for all run steps by default
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install compiler
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: ${{ matrix.compiler }}
- name: Install dependencies
run: |
pip install pandas
pip install "pybind11[global]"
pip install cvxopt
pip install "OpenDSSDirect.py[extras]"
pip install helics
pip install numpy
- name: Configure build
run: |
mkdir -p build
cd build
rm -rf *
pwd
export CC=${{ steps.install_cc.outputs.cc }}
export CXX=${{ steps.install_cc.outputs.cxx }}
echo ${CC}
echo ${CXX}
if [[ "${{ matrix.os }}" == "ubuntu-22.04" ]]; then
sudo apt install libomp-dev
fi
cmake -DICM=ON -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation ..
make -j 4
make install
- name: Start Execute Script
run: python start_execution.py