forked from cyclops-community/ctf
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (112 loc) · 3.57 KB
/
autotest.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Based on Nick Naso's cpp.yml workflow, https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
on:
push:
pull_request:
release:
jobs:
build_cpp:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu_Latest_GCC",
os: ubuntu-latest,
artifact: "ubuntu_gcc.7z",
build_type: "Release",
cc: "gcc",
cxx: "g++",
archiver: "7z a",
}
- {
name: "Ubuntu_GCC_9",
os: ubuntu-latest,
artifact: "ubuntu_gcc9.7z",
build_type: "Release",
cc: "gcc",
cxx: "g++",
archiver: "7z a",
}
- {
name: "macOS Latest Clang",
os: macos-latest,
artifact: "macos_clang.7z",
build_type: "Release",
cc: "clang",
cxx: "clang++",
archiver: "7za a",
}
build_scalapack: [True, False]
steps:
- uses: actions/checkout@v2
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
echo matrix.config.build_scalapack
echo ${{ matrix.config.build_scalapack }}
- name: Install dependencies on ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
run: |
sudo apt-get update;
sudo apt install -y g++ gfortran git make libblas-dev liblapack-dev mpich
- name: Install dependencies on macos
if: startsWith(matrix.config.os, 'macos')
run: |
brew install mpich
- name: Configure Cyclops and Build Scalapack
if: matrix.config.build_scalapack
shell: bash
run:
./configure CXXFLAGS="-O0" --build-scalapack
- name: Configure Cyclops without Scalapack
if: ( ! matrix.config.build_scalapack )
shell: bash
run:
./configure CXXFLAGS="-O0"
- name: Build Cyclops
shell: bash
run:
make -j4
- name: Build Tests and Test Cyclops C++
run:
make test
- name: Test Cyclops C++ with 2 MPI processes
if: startsWith(matrix.config.name, 'Ubuntu')
shell: bash
run:
export OMP_NUM_THREADS=1;
export MPIR_CVAR_DEVICE_COLLECTIVES=none;
make test2
- name: Build Python Install dependencies on ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
run: |
sudo apt install -y python3-dev virtualenv;
mkdir envs
- name: Build Python Install dependencies on macos
if: startsWith(matrix.config.os, 'macos')
run: |
brew install virtualenv
- name: Create Python virtual environment and install dependencies via pip
run: |
virtualenv -p python3 ./envs/py3env;
source ./envs/py3env/bin/activate;
pip install numpy cython setuptools
- name: Build Python library
run:
source ./envs/py3env/bin/activate;
make python
- name: Test Cyclops Python
run:
source ./envs/py3env/bin/activate;
make python_test
- name: Test Cyclops Python with 2 MPI processes
if: startsWith(matrix.config.name, 'Ubuntu')
shell: bash
run:
source ./envs/py3env/bin/activate;
export OMP_NUM_THREADS=1;
export MPIR_CVAR_DEVICE_COLLECTIVES=none;
make python_test2