-
Notifications
You must be signed in to change notification settings - Fork 4
105 lines (85 loc) · 2.42 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
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
BUILD_TYPE: Debug
jobs:
mpiwrapper:
strategy:
matrix:
os: [ubuntu-22.04]
mpi: [MPICH, OpenMPI]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install ${{matrix.mpi}}
run: |
case "${{matrix.mpi}}" in
MPICH)
sudo apt-get update
sudo apt-get install libmpich-dev
;;
OpenMPI)
;;
esac
- name: Restore dependencies
id: cache
uses: actions/cache/restore@v3
with:
path: /usr/local
key: ${{runner.os}}-${{matrix.mpi}}-dependencies
- name: Build ${{matrix.mpi}}
if: steps.cache.outputs.cache-hit != 'true'
run: |
case "${{matrix.mpi}}" in
MPICH)
;;
OpenMPI)
./.github/workflows/install-openmpi.sh
;;
esac
- name: Save dependencies
uses: actions/cache/save@v3
with:
path: /usr/local
key: ${{steps.cache.cache-primary-key}}
- name: Configure
run: |
cd mpiwrapper
cmake \
-B ${{github.workspace}}/build \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_INSTALL_PREFIX=$HOME/mpiwrapper-${{matrix.mpi}}
- name: Build
run: cd mpiwrapper && cmake --build ${{github.workspace}}/build --verbose
# - name: Test
# working-directory: ${{github.workspace}}/build
# run: ctest -C ${{env.BUILD_TYPE}}
- name: Install
run: cd mpiwrapper && cmake --install ${{github.workspace}}/build
mpitrampoline:
strategy:
matrix:
os: [ubuntu-22.04]
shared: [shared-off, shared-on]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Configure
run: |
shared=$(echo ${{matrix.shared}} | sed -e 's/shared-//')
cd mpitrampoline
cmake \
-B ${{github.workspace}}/build \
-DBUILD_SHARED_LIBS=${shared} \
-DCMAKE_INSTALL_PREFIX=$HOME/mpitrampoline
- name: Build
run: cd mpitrampoline && cmake --build ${{github.workspace}}/build --verbose
# - name: Test
# working-directory: ${{github.workspace}}/build
# run: ctest -C ${{env.BUILD_TYPE}}
- name: Install
run: cd mpitrampoline && cmake --install ${{github.workspace}}/build