forked from auto-07p/auto-07p
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (114 loc) · 3.61 KB
/
test.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v1
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install gfortran libmotif-dev libsoqt520-dev
sudo apt-get install python-tk python3-matplotlib
sudo apt-get install openmpi-bin libopenmpi-dev
sudo apt-get install texlive texlive-latex-extra transfig
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew reinstall gfortran
# workaround for brew link failure
rm -f /usr/local/bin/{2to3-,idle,pydoc,python}3*
rm -f /usr/local/bin/python3*-config /usr/local/bin/2to3
brew install cmake qt@5 openmotif open-mpi coin3d
brew link qt@5 --force
export PATH="/usr/local/opt/qt@5/bin:$PATH"
curl -O -L https://github.com/coin3d/soqt/releases/download/SoQt-1.6.0/soqt-1.6.0-src.tar.gz
tar xf soqt-1.6.0-src.tar.gz
cd soqt/build
cmake ..
make -j3
sudo make install
brew install basictex fig2dev
brew install python-tk
brew install pyenv
pyenv install 2.7.18
pyenv global 2.7.18
PATH=$(pyenv root)/shims:$PATH
pip install numpy==1.16.6
pip install matplotlib
pip3 install matplotlib
- name: Install packages for Ubuntu 20.04 only
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get install python-numpy
- name: Install packages for Ubuntu 22.04 only
if: matrix.os == 'ubuntu-22.04'
run: |
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
pip2 install numpy
- name: Compile
run: |
# compile auto
if [ "$RUNNER_OS" == "macOS" ]; then
eval "$(/usr/libexec/path_helper)"
fi
./configure --enable-gui --with-mpi
make
# compile manual
make -C doc auto.pdf ../plaut04/doc/userguide.pdf
- name: Run test (python2)
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
PATH=$(pyenv root)/shims:$PATH
fi
export OMPI_MCA_btl="^openib"
cd test
python2 ../python/auto all.auto
mv *_log07p python2log.txt
- uses: actions/upload-artifact@v1
with:
name: python2log
path: test/python2log.txt
- uses: actions/upload-artifact@v1
with:
name: python2verification
path: test/verification
- name: Run test (python3)
run: |
export OMPI_MCA_btl="^openib"
cd test
python3 ../python/auto all.auto
mv *_log07p python3log.txt
- uses: actions/upload-artifact@v1
with:
name: python3log
path: test/python3log.txt
- uses: actions/upload-artifact@v1
with:
name: python3verification
path: test/verification
- name: Run test (MPI + python3)
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
touch test/python3mpilog.txt
else
export AUTO_COMMAND_PREFIX="mpirun -n 2"
export OMP_NUM_THREADS=1
export OMPI_MCA_btl="^openib"
cd test
python3 ../python/auto all.auto
mv *_log07p python3mpilog.txt
fi
- uses: actions/upload-artifact@v1
with:
name: python3mpilog
path: test/python3mpilog.txt
- uses: actions/upload-artifact@v1
with:
name: python3mpiverification
path: test/verification