Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit c4e1d7e

Browse files
committed
Fixed release build
1 parent a51833f commit c4e1d7e

File tree

5 files changed

+50
-25
lines changed

5 files changed

+50
-25
lines changed

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ matrix:
1313
- TOOLCHAIN=archlinux
1414
# - os: osx
1515
# env:
16-
# - DEPLOY=1
16+
# - TOOLCHAIN=osx
1717
# install:
1818
# - brew upgrade python wget cmake
1919
# - brew install rust
@@ -61,11 +61,11 @@ before_deploy:
6161
/build/tools/make_release.sh
6262

6363
deploy:
64-
provider: releases
65-
api_key:
66-
secure: HVF8CkBTelG3qd0R9D8ODEwzYcwU8Sk7wKZ5vDTZajdqSFcHllJfY8UUBJQ2iXH1a2Q9vFqcbd+O44mvKyk/6KGg5xfoxgo4SQvXqvQ/s9AsrMEEOOT/++MMwDEZM6NCSL6CvoH9EOGRw6Dd+XEgS2EiotgvvTi3W9oeq3/qt7UqPqxVgTcqY4ZdIsEHDwPcjcd/B8YZ9G4aq/gRWHoS9OD5exfsMWd+FbN/BD00QJxzVz96IrPXu80d7HpTis34ROO1D+tSBNBqTovfHwTa1A99LLygismY70BofXwrxuanFQH4Jq3kXvMnmZCHFYFqdAw2k5y49yJTwlkf4gmwXQXDfHsos+fSdm5xmuEpUT2asW+riWYcyQ9s0ygZx7FBa3fgamiBSxaP5ogwWX2k41IqV/nPp5S9uATaquyBgSTEQga6xQP68+1igpWi/na77DkH3QS3Fa4UMs6Lef1QTiUkNDSXwdLXV0ljrr3wye6vqz1g6C9/7lPF3Nm5uDy/mYjqZdF/H2mjg+G9smEkSI1/xciDJaTZRxly+SEZRoo1FX7Gk0e58EDgCXHI7Kb8X7ju82hHFpCIgzqDbfxAnmWujBRhy4Qka2wHnezAKOOu7zWqpDUPabcMXg/6eMWtj5h63YAXsalrkYwV4gtyzhOmtICT4MfhzzU0/DmU84U=
67-
file: build_rel/python/task-maker-$TRAVIS_TAG-$TRAVIS_OS_NAME.zip
68-
skip_cleanup: true
69-
on:
70-
tags: true
71-
condition: "$DEPLOY = 1"
64+
- provider: releases
65+
api_key:
66+
secure: HVF8CkBTelG3qd0R9D8ODEwzYcwU8Sk7wKZ5vDTZajdqSFcHllJfY8UUBJQ2iXH1a2Q9vFqcbd+O44mvKyk/6KGg5xfoxgo4SQvXqvQ/s9AsrMEEOOT/++MMwDEZM6NCSL6CvoH9EOGRw6Dd+XEgS2EiotgvvTi3W9oeq3/qt7UqPqxVgTcqY4ZdIsEHDwPcjcd/B8YZ9G4aq/gRWHoS9OD5exfsMWd+FbN/BD00QJxzVz96IrPXu80d7HpTis34ROO1D+tSBNBqTovfHwTa1A99LLygismY70BofXwrxuanFQH4Jq3kXvMnmZCHFYFqdAw2k5y49yJTwlkf4gmwXQXDfHsos+fSdm5xmuEpUT2asW+riWYcyQ9s0ygZx7FBa3fgamiBSxaP5ogwWX2k41IqV/nPp5S9uATaquyBgSTEQga6xQP68+1igpWi/na77DkH3QS3Fa4UMs6Lef1QTiUkNDSXwdLXV0ljrr3wye6vqz1g6C9/7lPF3Nm5uDy/mYjqZdF/H2mjg+G9smEkSI1/xciDJaTZRxly+SEZRoo1FX7Gk0e58EDgCXHI7Kb8X7ju82hHFpCIgzqDbfxAnmWujBRhy4Qka2wHnezAKOOu7zWqpDUPabcMXg/6eMWtj5h63YAXsalrkYwV4gtyzhOmtICT4MfhzzU0/DmU84U=
67+
# TODO add the support for the different file names
68+
file: build_rel/python/task-maker-${TRAVIS_TAG}_${TOOLCHAIN}_amd64.deb
69+
skip_cleanup: true
70+
on:
71+
tags: true

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ include(GoogleTest)
4848

4949
find_package(PythonInterp 3.5 REQUIRED)
5050

51+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/DEBIAN/control.in
52+
${CMAKE_CURRENT_BINARY_DIR}/DEBIAN/control)
53+
5154
# Enable colors in ninja
5255
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
5356
# Other flags

python/uis/terry_curses_ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin python3
1+
#!/usr/bin/env python3
22
from task_maker.printer import CursesPrinter
33
from task_maker.uis import CursesUI, get_max_sol_len
44
from task_maker.uis.ioi_curses_ui import print_compilation_status

tools/DEBIAN/control.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Package: task-maker
2+
Version: ${GIT_LAST_VERSION}
3+
Architecture: amd64
4+
Depends: libc6, libdw1, libgcc1, libstdc++6, build-essential, python3, python3-traits, python3-ruamel.yaml
5+
Maintainer: Edoardo Morassutto <[email protected]>
6+
Homepage: https://github.com/algorithm-ninja/task-maker
7+
Description: The new cmsMake!
8+
The new cmsMake!

tools/make_release.sh

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
#!/usr/bin/env bash
22

3-
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
4-
source /venv/bin/activate
5-
else
6-
source /tmp/venv/bin/activate
7-
fi
3+
set -ex
84

9-
cmake -H. -Bbuild_rel -DHUNTER_ROOT=hunter-root -DCMAKE_BUILD_TYPE=Release
10-
11-
cmake --build build_rel
5+
if [ "$CI" != "true" ]; then
6+
echo "This script is supposed to run on the CI, it may break your system"
7+
exit 1
8+
fi
129

13-
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
14-
strip -s build_rel/python/task_maker/bin/task-maker
15-
else
10+
if [ "$TOOLCHAIN" == "archlinux" ]; then
11+
# TODO pull from aur.archlinux.org the PKGBUILD and build the package from
12+
# that
13+
echo "Release not supported yet"
14+
elif [ "$TOOLCHAIN" == "osx" ]; then
15+
source /tmp/venv/bin/activate
16+
cmake -H. -Bbuild_rel -DHUNTER_ROOT=hunter-root -DCMAKE_BUILD_TYPE=Release
17+
cmake --build build_rel
1618
strip build_rel/python/task_maker/bin/task-maker
19+
# TODO strip the frontend?
20+
chmod +x build_rel/python/setup.py
21+
# TODO build something?
22+
else
23+
cmake -H. -Bbuild_rel -DHUNTER_ROOT=hunter-root -DCMAKE_BUILD_TYPE=Release
24+
cmake --build build_rel
25+
strip -s build_rel/python/task_maker/bin/task-maker
26+
strip -s build_rel/python/task_maker/task_maker_frontend.so
27+
chmod +x build_rel/python/setup.py
28+
cd build_rel/python
29+
./setup.py install --root=root --prefix=/usr --optimize=1
30+
find root -name __pycache__ -exec rm -rv "{}" +
31+
find -name site-packages | sed -e "p;s/site/dist/" | xargs -n2 mv
32+
cp -r ../DEBIAN root
33+
dpkg-deb --build root task-maker-${TRAVIS_TAG}_${TOOLCHAIN}_amd64.deb
34+
lintian task-maker-${TRAVIS_TAG}_${TOOLCHAIN}_amd64.deb -i || true
1735
fi
18-
19-
chmod +x build_rel/python/setup.py
20-
21-
( cd build_rel/python && zip -r task-maker-$TRAVIS_TAG-$TRAVIS_OS_NAME.zip requirements.txt setup.py task_maker )

0 commit comments

Comments
 (0)