File: linux_build.sh

package info (click to toggle)
lightyears 1.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,804 kB
  • sloc: python: 5,532; sh: 39; makefile: 6
file content (39 lines) | stat: -rwxr-xr-x 863 bytes parent folder | download | duplicates (2)
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
#!/bin/bash -xe

git clean -d -f -x .

export ROOT=$PWD
export PYTHON=python3.8

# Build environment: pygame 2.0.1
$PYTHON -m venv test-env
source test-env/bin/activate

$PYTHON -m pip install wheel==0.36.2
$PYTHON -m pip install pygame==2.0.1
$PYTHON -m pip install PyInstaller==4.2
$PYTHON -m pip install mypy==0.812
$PYTHON -m pip install pytest==6.2.2
$PYTHON -m pip install pytest-cov==2.11.1

# derive the version number
PYTHONPATH=$ROOT $PYTHON pyinstaller/linux/version_setup.py
source version.txt
export LY=20kly-$VERSION

# make the executable for the game
pyinstaller -F pyinstaller/linux/lightyears.spec

# make the zip file
cd dist
mkdir $LY
cp 20kly $LY
cp ../LICENSE.txt ../manual.pdf $LY
zip -9r $LY.zip $LY
cd ..

# Test the version just built
dist/20kly --playback tests/recordings/beginner

# Run all other tests
$PYTHON tests/run_all_tests.py