forked from aibasel/lab
-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (121 loc) · 4.38 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
138
139
140
141
142
143
144
name: Ubuntu
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set revision
run: |
# Set environment variable with the latest revision hash.
echo "GIT_DOWNWARD_REV=`git ls-remote --exit-code --quiet https://github.com/aibasel/downward.git HEAD | cut -f1`" >> $GITHUB_ENV
# Compile each Fast Downward revision only once and cache the results.
- name: Cache revisions
id: cache-revisions
uses: actions/cache@v3
with:
path: revision-cache
key: ${{ matrix.os }}-revision-cache-${{ env.GIT_DOWNWARD_REV }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
tox -e docs,style
- name: Set up directory for dependencies
run: |
mkdir ../deps
pushd ../deps
# Add directory to PATH.
echo "$(pwd)" >> $GITHUB_PATH
- name: Compile FF
working-directory: ../deps
run: |
# GCC 10 fails to compile FF 2.3, so we use a precompiled FF binary.
# 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
# pushd FF-v2.3/
# make -j
# cp ff ../
# popd
# rm -r FF-v2.3/ FF-v2.3.tgz
wget 'https://github.com/hectorpal/fast-forward-linux-binaries/raw/main/ff.gz'
gunzip ff.gz
chmod +x ff
- name: Compile runsolver
working-directory: ../deps
run: |
sudo apt-get -y install g++ make
git clone https://github.com/jendrikseipp/runsolver.git runsolver-dir
pushd runsolver-dir/src
make -j
cp runsolver ../..
popd
rm -r runsolver-dir/
- name: Install Apptainer
working-directory: ../deps
run: |
sudo add-apt-repository -y ppa:apptainer/ppa
sudo apt-get update
sudo apt-get install -y apptainer
- 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
pushd VAL
git checkout a5565396007eee73ac36527fbf904142b3077c74
make clean # Remove old build artifacts and binaries.
sed -i 's/-Werror //g' Makefile # Ignore warnings.
make -j
mv validate ../
popd
rm -r 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 "DOWNWARD_BENCHMARKS=${DOWNWARD_BENCHMARKS}" >> $GITHUB_ENV
- name: Clone Fast Downward Git
working-directory: ../deps
run: |
export DOWNWARD_REPO=`realpath fast-downward-git`
git clone --depth 1 https://github.com/aibasel/downward.git ${DOWNWARD_REPO}
echo "DOWNWARD_REPO=${DOWNWARD_REPO}" >> $GITHUB_ENV
- name: Download example Singularity image
working-directory: ../deps
run: |
wget --no-verbose https://ai.dmi.unibas.ch/_tmp_files/seipp/lama-first.img -O fd1906-lama-first.img
export SINGULARITY_IMAGES=`realpath .`
echo "SINGULARITY_IMAGES=${SINGULARITY_IMAGES}" >> $GITHUB_ENV
- 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=${DOWNWARD_REPO}
time tox -e py,downward,ff,singularity
- name: Test installation with pip
run: |
pip install .
pushd /tmp
python -c "import lab"
popd
pip uninstall -y lab