-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (61 loc) · 2.02 KB
/
build_and_test_host.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
name: host-HAMR
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install_deps
run: |
export DEBIAN_FRONTEND="noninteractive"
export TZ="America/Los_Angeles"
sudo apt-get update -qq
sudo apt-get install -qq -y git-core gcc g++ cmake automake m4 wget swig python-dev
python3 -mvenv py3k_testing
source py3k_testing/bin/activate
python3 -mpip install numpy
# build for host only
- name: build_host
run: |
source py3k_testing/bin/activate
mkdir build_host
cd build_host
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DHAMR_ENABLE_PYTHON=ON -DCMAKE_INSTALL_PREFIX=`pwd`/../../hamr-install-host ..
make -j2 install
cd ..
# test the host build
- name: test_host
run: |
source py3k_testing/bin/activate
cd build_host
tmp_llp=$LD_LIBRARY_PATH
tmp_pp=$PYTHONPATH
source ./bin/hamr_python_env.sh
ctest --output-on-failure
export LD_LIBRARY_PATH=$tmp_llp PYTHONPATH=$tmp_pp
cd ..
# build for host only
- name: build_host_separate_impl
run: |
source py3k_testing/bin/activate
mkdir build_host_sep
cd build_host_sep
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DHAMR_ENABLE_PYTHON=ON -DHAMR_SEPARATE_IMPL=ON -DCMAKE_INSTALL_PREFIX=`pwd`/../../hamr-install-host-sep ..
make -j2 install
cd ..
# test the host build
- name: test_host_separate_impl
run: |
source py3k_testing/bin/activate
cd build_host_sep
tmp_llp=$LD_LIBRARY_PATH
tmp_pp=$PYTHONPATH
source ./bin/hamr_python_env.sh
ctest --output-on-failure
export LD_LIBRARY_PATH=$tmp_llp PYTHONPATH=$tmp_pp
cd ..