-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (85 loc) · 3.02 KB
/
main.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
99
100
101
102
103
104
105
106
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Update repo
run: sudo apt-get update -y
- name: Install mpich
run: sudo apt-get install -y mpich
- name: Checkout CPL APP
uses: actions/checkout@v3
# Checks-out cpl-library repository
- uses: actions/checkout@v3
with:
repository: Crompulence/cpl-library
path: cpl-library
- name: Build cpl-library
working-directory: ./cpl-library
run: |
pwd
ls
make PLATFORM=gcc
source SOURCEME.sh
#Contents of SOURCEME
echo "CPL_PATH=$CPL_PATH" >> $GITHUB_ENV
echo "CPL_BIN_PATH=$CPL_BIN_PATH" >> $GITHUB_ENV
echo "CPL_LIBRARY_PATH=$CPL_LIBRARY_PATH" >> $GITHUB_ENV
echo "CPL_INCLUDE_PATH=$CPL_INCLUDE_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
echo "CPLPY_PATH=$CPLPY_PATH" >> $GITHUB_ENV
echo "CPL_THIRD_PARTY=$CPL_THIRD_PARTY" >> $GITHUB_ENV
echo "CPL_THIRD_PARTY_INC=$CPL_THIRD_PARTY_INC" >> $GITHUB_ENV
echo "CPL_THIRD_PARTY_LIB=$CPL_THIRD_PARTY_LIB" >> $GITHUB_ENV
echo "$CPL_BIN_PATH" >> $GITHUB_PATH
- name: Checkout LAMMPS
uses: actions/checkout@v3
with:
repository: lammps/lammps
path: lammps
ref: release
- name: Build CPL LAMMPS
run: |
echo $GITHUB_WORKSPACE/lammps > ./CODE_INST_DIR
echo granular >> config/lammps_packages.in
cd config
sh ./enable-packages.sh make
cd ../
make patch-lammps
make -j 8
source SOURCEME.sh
echo "LAMMPS_PATH=$LAMMPS_PATH" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install pytest
run: pip install pytest
- name: Install mpi4py
run: pip install mpi4py
- name: Install scientific packages
run: pip install numpy scipy matplotlib
#- name: Test Single Particle
# if: always()
# run: |
# source SOURCEME.sh
# make test-single
- name: Test Couette Flow Case
if: always()
run: |
source SOURCEME.sh
make test-couette
- uses: actions/checkout@v2
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3