-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·25 lines (21 loc) · 1.04 KB
/
Copy pathpackage.sh
File metadata and controls
executable file
·25 lines (21 loc) · 1.04 KB
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
#!/bin/bash
# Build ConcurrentWitness2Test.zip: a self-contained pyz bundling the
# python sources and pure-python dependencies, plus svcomp.c, docs,
# examples and a start.sh wrapper. Used both locally and by
# .github/actions/create-archive.
set -e
scriptdir=$(cd "$(dirname "$0")" && pwd)
cd "$scriptdir"
rm -rf build ConcurrentWitness2Test ConcurrentWitness2Test.pyz ConcurrentWitness2Test.zip
mkdir build
pip install --target build -r requirements.txt
cp *.py build/
mv build/main.py build/__main__.py
python3 -m zipapp build -o ConcurrentWitness2Test.pyz -p "/usr/bin/env python3"
rm -rf build
mkdir ConcurrentWitness2Test
cp ConcurrentWitness2Test.pyz *.md LICENSE svcomp.c example headers smoketest.sh ConcurrentWitness2Test/ -r
printf '#!/bin/bash\nscriptdir=$(dirname "$0")\npython3 "$scriptdir"/ConcurrentWitness2Test.pyz "$@"\n' > ConcurrentWitness2Test/start.sh
chmod +x ConcurrentWitness2Test/start.sh ConcurrentWitness2Test/smoketest.sh
zip ConcurrentWitness2Test.zip ConcurrentWitness2Test -r
echo "Created $scriptdir/ConcurrentWitness2Test.zip"