forked from aibasel/lab
-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (115 loc) · 4.1 KB
/
ubuntu.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
131
132
133
134
135
136
137
name: Ubuntu
# see https://github.community/t5/GitHub-Actions/How-to-trigger-an-action-on-push-or-pull-request-but-not-both/m-p/35805
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set revision
run: |
# Set environment variable with the latest revision hash.
echo "::set-env name=GIT_DOWNWARD_REV::`git ls-remote --exit-code --quiet https://github.com/aibasel/downward.git HEAD | cut -f1`"
# Compile each Fast Downward revision only once and cache the results.
- name: Cache revisions
id: cache-revisions
uses: actions/cache@v1
with:
path: revision-cache
key: ${{ runner.os }}-revision-cache-${{ env.GIT_DOWNWARD_REV }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Show environment
run: |
python --version
python3 -c "import multiprocessing as m; print('CPUs:', m.cpu_count())"
- name: Install tox
run: |
python -m pip install --upgrade pip tox
- name: Check style
if: matrix.python-version == '3.6'
run: |
tox -e docs,style
- name: Set up directory for dependencies
run: |
mkdir ../deps
pushd ../deps
# Add directory to PATH.
echo "::add-path::$(pwd)"
- name: Compile FF
working-directory: ../deps
run: |
sudo apt-get -y install g++ make flex bison
wget http://fai.cs.uni-saarland.de/hoffmann/ff/FF-v2.3.tgz
tar -xzvf FF-v2.3.tgz
cd FF-v2.3/
make -j
cp ff ../
cd ..
rm -rf FF-v2.3/ FF-v2.3.tgz
- name: Compile VAL
working-directory: ../deps
run: |
sudo apt-get -y install g++ make flex bison
git clone https://github.com/KCL-Planning/VAL.git
cd VAL
git checkout a5565396007eee73ac36527fbf904142b3077c74
make clean # Remove old build artifacts and binaries.
sed -i 's/-Werror //g' Makefile # Ignore warnings.
make -j
mv validate ../
cd ../
rm -rf VAL
- name: Clone benchmarks
working-directory: ../deps
run: |
export DOWNWARD_BENCHMARKS=`realpath downward-benchmarks`
git clone --depth 1 https://github.com/aibasel/downward-benchmarks ${DOWNWARD_BENCHMARKS}
echo "::set-env name=DOWNWARD_BENCHMARKS::${DOWNWARD_BENCHMARKS}"
- name: Clone Fast Downward Mercurial
working-directory: ../deps
run: |
sudo apt-get -y install cmake g++ git make python3
export HG_DOWNWARD_REPO=`realpath fast-downward`
hg clone http://hg.fast-downward.org ${HG_DOWNWARD_REPO}
echo "::set-env name=HG_DOWNWARD_REPO::${HG_DOWNWARD_REPO}"
- name: Clone Fast Downward Git
working-directory: ../deps
run: |
export GIT_DOWNWARD_REPO=`realpath fast-downward-git`
git clone --depth 1 https://github.com/aibasel/downward.git ${GIT_DOWNWARD_REPO}
echo "::set-env name=GIT_DOWNWARD_REPO::${GIT_DOWNWARD_REPO}"
- name: Download example Singularity image
working-directory: ../deps
run: |
wget --no-verbose https://ai.dmi.unibas.ch/_tmp_files/seipp/lama-first.img
export SINGULARITY_IMAGES=`realpath .`
echo "::set-env name=SINGULARITY_IMAGES::${SINGULARITY_IMAGES}"
- name: Run tests
run: |
# Updating the installed packages takes very long, so we don't do it.
# sudo apt-get update && sudo apt-get -y upgrade
export DOWNWARD_REVISION_CACHE="${GITHUB_WORKSPACE}/revision-cache"
echo CACHE: ${DOWNWARD_REVISION_CACHE}
export DOWNWARD_REPO=${HG_DOWNWARD_REPO}
time tox -e py
export DOWNWARD_REPO=${GIT_DOWNWARD_REPO}
time tox -e py
- name: Test installation with pip
run: |
pip install .
pushd /tmp
python -c "import lab"
popd
pip uninstall -y lab