-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.34 KB
/
ccpp.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
name: C/C++ CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
id: cache-lammps
with:
path: build/lammps-build
key: ${{ runner.os }}-lammps-${{ hashFiles('**/deps/lammps/*') }}
restore-keys: |
${{ runner.os }}-lammps-
- name: Install Package Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev libboost-all-dev
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
# we need to install numpy first because of something phonopy does in its setup
pip install -r <(grep numpy requirements.txt)
pip install -r requirements.txt
- name: Configure (CMAKE)
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DSP2_ENABLE_TESTS=ON ../
- name: Build LAMMPS
if: steps.cache-lammps.outputs.cache-hit != 'true'
run: |
cd build
make -j2 lammps_external
- name: Make
run: |
cd build
# We want `--keep-going` just in case there are multiple errors
make -j2 --keep-going
- name: Test
run: build/src/sp2 --test