mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-07-05 04:26:38 -07:00
Update dependencies and fix CI
* nanopb 0.4.6.4 with PB_C99_STATIC_ASSERT to avoid depending on C11 * OpenSSL 1.1.1q on windows * Switched from docker to podman in CI * Appdir in appimage build container is now in /build/appdir to fix "Invalid cross-device link" errors in linuxdeploy when appdir is in mount * Use python protobuf==3.19.5 in bionic image, which still supports python 3.6, and on windows where nanopb otherwise has issues * Purge nanopb_pb2.py to force regeneration of it for possibly different python protobuf versions in subsequent builds * FreeBSD needs py39 packages now
This commit is contained in:
parent
b790fb3fb5
commit
4164255ef9
14 changed files with 48 additions and 23 deletions
|
@ -5,6 +5,7 @@ image:
|
|||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /^v\d.*$/
|
||||
- /^deploy-test(-.*)?$/
|
||||
|
||||
|
|
|
@ -16,8 +16,9 @@ packages:
|
|||
- qt5-qtmultimedia-dev
|
||||
- ffmpeg-dev
|
||||
- sdl2-dev
|
||||
- docker
|
||||
- podman
|
||||
- fuse
|
||||
- udev
|
||||
- argp-standalone
|
||||
|
||||
artifacts:
|
||||
|
@ -25,10 +26,17 @@ artifacts:
|
|||
- Chiaki.AppImage
|
||||
|
||||
tasks:
|
||||
- start_docker: |
|
||||
sudo service docker start
|
||||
sudo chmod +s /usr/bin/docker # Yes, I know what I am doing
|
||||
sudo service fuse start # Fuse for AppImages
|
||||
- setup_podman: |
|
||||
sudo rc-service udev start
|
||||
sudo rc-service cgroups start
|
||||
sudo rc-service fuse start # Fuse for AppImages
|
||||
echo build:100000:65536 | sudo tee /etc/subuid
|
||||
echo build:100000:65536 | sudo tee /etc/subgid
|
||||
# https://www.kernel.org/doc/Documentation/networking/tuntap.txt
|
||||
# for slirp4netns
|
||||
sudo mkdir -p /dev/net
|
||||
sudo mknod /dev/net/tun c 10 200
|
||||
sudo chmod 0666 /dev/net/tun
|
||||
- local_build_and_test: |
|
||||
cd chiaki
|
||||
cmake -Bbuild -GNinja -DCHIAKI_ENABLE_CLI=ON -DCHIAKI_ENABLE_GUI=ON -DCHIAKI_CLI_ARGP_STANDALONE=ON
|
||||
|
@ -36,12 +44,12 @@ tasks:
|
|||
build/test/chiaki-unit
|
||||
- appimage: |
|
||||
cd chiaki
|
||||
scripts/run-docker-build-appimage.sh
|
||||
scripts/run-podman-build-appimage.sh
|
||||
cp appimage/Chiaki.AppImage ../Chiaki.AppImage
|
||||
- switch: |
|
||||
cd chiaki
|
||||
scripts/switch/run-docker-build-chiaki.sh
|
||||
scripts/switch/run-podman-build-chiaki.sh
|
||||
cp build_switch/switch/chiaki.nro ../chiaki.nro
|
||||
- bullseye: |
|
||||
cd chiaki
|
||||
scripts/run-docker-build-bullseye.sh
|
||||
scripts/run-podman-build-bullseye.sh
|
||||
|
|
|
@ -7,7 +7,7 @@ sources:
|
|||
packages:
|
||||
- cmake
|
||||
- protobuf
|
||||
- py38-protobuf
|
||||
- py39-protobuf
|
||||
- opus
|
||||
- qt5-core
|
||||
- qt5-qmake
|
||||
|
|
|
@ -26,7 +26,7 @@ ninja || exit 1
|
|||
ninja install || exit 1
|
||||
cd ../.. || exit 1
|
||||
|
||||
wget https://mirror.firedaemon.com/OpenSSL/openssl-1.1.1n.zip && 7z x openssl-1.1.1n.zip || exit 1
|
||||
wget https://mirror.firedaemon.com/OpenSSL/openssl-1.1.1q.zip && 7z x openssl-1.1.1q.zip || exit 1
|
||||
|
||||
wget https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip && 7z x SDL2-devel-2.0.10-VC.zip || exit 1
|
||||
export SDL_ROOT="$APPVEYOR_BUILD_FOLDER/SDL2-2.0.10" || exit 1
|
||||
|
@ -41,7 +41,7 @@ cd .. || exit 1
|
|||
export PATH="$PWD/protoc/bin:$PATH" || exit 1
|
||||
|
||||
PYTHON="C:/Python37/python.exe"
|
||||
"$PYTHON" -m pip install protobuf || exit 1
|
||||
"$PYTHON" -m pip install protobuf==3.19.5 || exit 1
|
||||
|
||||
QT_PATH="C:/Qt/5.15/msvc2019_64"
|
||||
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
set -xe
|
||||
|
||||
# sometimes there are errors in linuxdeploy in docker/podman when the appdir is on a mount
|
||||
appdir=${1:-`pwd`/appimage/appdir}
|
||||
|
||||
mkdir appimage
|
||||
|
||||
pip3 install --user protobuf
|
||||
pip3 install --user protobuf==3.19.5 # need support for python 3.6 for running on bionic
|
||||
scripts/fetch-protoc.sh appimage
|
||||
export PATH="`pwd`/appimage/protoc/bin:$PATH"
|
||||
scripts/build-ffmpeg.sh appimage
|
||||
|
@ -24,10 +27,14 @@ cmake \
|
|||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
..
|
||||
cd ..
|
||||
|
||||
# purge leftover proto/nanopb_pb2.py which may have been created with another protobuf version
|
||||
rm -fv third-party/nanopb/generator/proto/nanopb_pb2.py
|
||||
|
||||
ninja -C build_appimage
|
||||
build_appimage/test/chiaki-unit
|
||||
|
||||
DESTDIR=`pwd`/appimage/appdir ninja -C build_appimage install
|
||||
DESTDIR="${appdir}" ninja -C build_appimage install
|
||||
cd appimage
|
||||
|
||||
curl -L -O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
|
@ -41,5 +48,5 @@ set -e
|
|||
export LD_LIBRARY_PATH="`pwd`/sdl2-prefix/lib:$LD_LIBRARY_PATH"
|
||||
export EXTRA_QT_PLUGINS=opengl
|
||||
|
||||
./linuxdeploy-x86_64.AppImage --appdir=appdir -e appdir/usr/bin/chiaki -d appdir/usr/share/applications/chiaki.desktop --plugin qt --output appimage
|
||||
./linuxdeploy-x86_64.AppImage --appdir="${appdir}" -e "${appdir}/usr/bin/chiaki" -d "${appdir}/usr/share/applications/chiaki.desktop" --plugin qt --output appimage
|
||||
mv Chiaki-*-x86_64.AppImage Chiaki.AppImage
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# purge leftover proto/nanopb_pb2.py which may have been created with another protobuf version
|
||||
rm -fv third-party/nanopb/generator/proto/nanopb_pb2.py
|
||||
|
||||
mkdir build && cd build || exit 1
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
set -xe
|
||||
cd "`dirname $(readlink -f ${0})`"
|
||||
|
||||
docker build -t chiaki-bionic . -f Dockerfile.bionic
|
||||
podman build -t chiaki-bionic . -f Dockerfile.bionic
|
||||
cd ..
|
||||
docker run --rm \
|
||||
podman run --rm \
|
||||
-v "`pwd`:/build/chiaki" \
|
||||
-w "/build/chiaki" \
|
||||
--device /dev/fuse \
|
||||
--cap-add SYS_ADMIN \
|
||||
-t chiaki-bionic \
|
||||
/bin/bash -c "scripts/build-appimage.sh"
|
||||
/bin/bash -c "scripts/build-appimage.sh /build/appdir"
|
||||
|
|
@ -3,10 +3,11 @@
|
|||
set -xe
|
||||
cd "`dirname $(readlink -f ${0})`"
|
||||
|
||||
docker build -t chiaki-bullseye . -f Dockerfile.bullseye
|
||||
podman build -t chiaki-bullseye . -f Dockerfile.bullseye
|
||||
cd ..
|
||||
docker run --rm -v "`pwd`:/build" chiaki-bullseye /bin/bash -c "
|
||||
podman run --rm -v "`pwd`:/build" chiaki-bullseye /bin/bash -c "
|
||||
cd /build &&
|
||||
rm -fv third-party/nanopb/generator/proto/nanopb_pb2.py &&
|
||||
mkdir build_bullseye &&
|
||||
cmake -Bbuild_bullseye -GNinja -DCHIAKI_ENABLE_SETSU=ON -DCHIAKI_USE_SYSTEM_JERASURE=ON -DCHIAKI_USE_SYSTEM_NANOPB=ON &&
|
||||
ninja -C build_bullseye &&
|
|
@ -16,6 +16,9 @@ build_chiaki (){
|
|||
pushd "${BASEDIR}"
|
||||
#rm -rf ./build
|
||||
|
||||
# purge leftover proto/nanopb_pb2.py which may have been created with another protobuf version
|
||||
rm -fv third-party/nanopb/generator/proto/nanopb_pb2.py
|
||||
|
||||
cmake -B "${build}" \
|
||||
-GNinja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${toolchain} \
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cd "`dirname $(readlink -f ${0})`/../.."
|
||||
|
||||
docker run \
|
||||
podman run \
|
||||
-v "`pwd`:/build/chiaki" \
|
||||
-w "/build/chiaki" \
|
||||
-t \
|
|
@ -7,7 +7,7 @@ but the easiest way is to use the following container.
|
|||
Build Project
|
||||
-------------
|
||||
```
|
||||
bash scripts/switch/run-docker-build-chiaki.sh
|
||||
bash scripts/switch/run-podman-build-chiaki.sh
|
||||
```
|
||||
|
||||
tools
|
||||
|
@ -15,7 +15,7 @@ tools
|
|||
Push to homebrew Netloader
|
||||
```
|
||||
# where X.X.X.X is the IP of your switch
|
||||
bash scripts/switch/push-docker-build-chiaki.sh -a 192.168.0.200
|
||||
bash scripts/switch/push-podman-build-chiaki.sh -a 192.168.0.200
|
||||
```
|
||||
|
||||
Troubleshoot
|
||||
|
|
2
third-party/CMakeLists.txt
vendored
2
third-party/CMakeLists.txt
vendored
|
@ -4,11 +4,13 @@ if(NOT CHIAKI_USE_SYSTEM_NANOPB)
|
|||
# nanopb
|
||||
##################
|
||||
|
||||
add_definitions(-DPB_C99_STATIC_ASSERT) # Fix PB_STATIC_ASSERT on msvc without using C11 for now
|
||||
add_subdirectory(nanopb EXCLUDE_FROM_ALL)
|
||||
set(NANOPB_GENERATOR_PY "${CMAKE_CURRENT_SOURCE_DIR}/nanopb/generator/nanopb_generator.py" PARENT_SCOPE)
|
||||
add_library(nanopb INTERFACE)
|
||||
target_link_libraries(nanopb INTERFACE protobuf-nanopb-static)
|
||||
target_include_directories(nanopb INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/nanopb")
|
||||
target_compile_definitions(nanopb INTERFACE -DPB_C99_STATIC_ASSERT) # see above
|
||||
add_library(Nanopb::nanopb ALIAS nanopb)
|
||||
endif()
|
||||
|
||||
|
|
2
third-party/nanopb
vendored
2
third-party/nanopb
vendored
|
@ -1 +1 @@
|
|||
Subproject commit ab19ecbe1b9f377ab4ee8e762bfe16c39068ad68
|
||||
Subproject commit afc499f9a410fc9bbf6c9c48cdd8d8b199d49eb4
|
Loading…
Add table
Add a link
Reference in a new issue