mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-20 05:23:12 -07:00
Move Rest of CI to Sourcehut
This commit is contained in:
parent
db5b3a1499
commit
dfc0f32ac2
20 changed files with 165 additions and 278 deletions
|
@ -2,7 +2,7 @@
|
|||
FROM debian:bullseye
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install git g++ cmake pkg-config \
|
||||
RUN apt-get -y install git g++ cmake ninja-build pkg-config \
|
||||
libjerasure-dev nanopb libnanopb-dev libavcodec-dev libopus-dev \
|
||||
libssl-dev protobuf-compiler python3 python3-protobuf \
|
||||
libevdev-dev libudev-dev \
|
||||
|
|
13
scripts/Dockerfile.xenial
Normal file
13
scripts/Dockerfile.xenial
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
FROM ubuntu:xenial
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y software-properties-common
|
||||
RUN add-apt-repository ppa:beineri/opt-qt-5.12.3-xenial
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install git g++ cmake ninja-build curl unzip python3-pip \
|
||||
libssl-dev libopus-dev qt512base qt512multimedia qt512svg \
|
||||
libgl1-mesa-dev nasm libudev-dev libva-dev fuse
|
||||
|
||||
CMD []
|
||||
|
|
@ -12,7 +12,7 @@ cd .. || exit 1
|
|||
|
||||
export PATH="$PWD/ninja:$PWD/yasm:/c/Qt/5.12/msvc2017_64/bin:$PATH"
|
||||
|
||||
scripts/build-ffmpeg.sh --target-os=win64 --arch=x86_64 --toolchain=msvc || exit 1
|
||||
scripts/build-ffmpeg.sh . --target-os=win64 --arch=x86_64 --toolchain=msvc || exit 1
|
||||
|
||||
git clone https://github.com/xiph/opus.git && cd opus && git checkout ad8fe90db79b7d2a135e3dfd2ed6631b0c5662ab || exit 1
|
||||
mkdir build && cd build || exit 1
|
||||
|
|
43
scripts/build-appimage.sh
Executable file
43
scripts/build-appimage.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
mkdir appimage
|
||||
|
||||
pip3 install --user protobuf
|
||||
scripts/fetch-protoc.sh appimage
|
||||
export PATH="`pwd`/appimage/protoc/bin:$PATH"
|
||||
scripts/build-ffmpeg.sh appimage
|
||||
scripts/build-sdl2.sh appimage
|
||||
|
||||
mkdir build_appimage
|
||||
cd build_appimage
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
"-DCMAKE_PREFIX_PATH=`pwd`/../appimage/ffmpeg-prefix;`pwd`/../appimage/sdl2-prefix;/opt/qt512" \
|
||||
-DCHIAKI_ENABLE_TESTS=ON \
|
||||
-DCHIAKI_ENABLE_CLI=OFF \
|
||||
-DCHIAKI_GUI_ENABLE_SDL_GAMECONTROLLER=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
..
|
||||
cd ..
|
||||
ninja -C build_appimage
|
||||
build_appimage/test/chiaki-unit
|
||||
|
||||
DESTDIR=`pwd`/appimage/appdir ninja -C build_appimage install
|
||||
cd appimage
|
||||
|
||||
curl -L -O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
curl -L -O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
set +e
|
||||
source /opt/qt512/bin/qt512-env.sh
|
||||
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
|
||||
mv Chiaki-*-x86_64.AppImage Chiaki.AppImage
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")/..
|
||||
cd "./$1"
|
||||
shift
|
||||
ROOT="`pwd`"
|
||||
|
||||
TAG=n4.2
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")/..
|
||||
cd "./$1"
|
||||
ROOT="`pwd`"
|
||||
|
||||
URL=https://www.libsdl.org/release/SDL2-2.0.10.tar.gz
|
||||
|
@ -8,8 +11,8 @@ FILE=SDL2-2.0.10.tar.gz
|
|||
DIR=SDL2-2.0.10
|
||||
|
||||
if [ ! -d "$DIR" ]; then
|
||||
wget "$URL" || exit 1
|
||||
tar -xf "$FILE" || exit 1
|
||||
curl -L "$URL" -O
|
||||
tar -xf "$FILE"
|
||||
fi
|
||||
|
||||
cd "$DIR" || exit 1
|
||||
|
@ -33,9 +36,9 @@ cmake \
|
|||
-DSDL_THREADS=ON \
|
||||
-DSDL_TIMERS=OFF \
|
||||
-DSDL_VIDEO=OFF \
|
||||
.. || exit 1
|
||||
..
|
||||
# SDL_THREADS is not needed, but it doesn't compile without
|
||||
|
||||
make -j4 || exit 1
|
||||
make install || exit 1
|
||||
make -j4
|
||||
make install
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DCHIAKI_ENABLE_SETSU=ON "$@"
|
||||
make -j8
|
||||
make test
|
|
@ -1,10 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")/..
|
||||
cd "./$1"
|
||||
ROOT="`pwd`"
|
||||
|
||||
URL=https://github.com/protocolbuffers/protobuf/releases/download/v3.9.1/protoc-3.9.1-linux-x86_64.zip
|
||||
|
||||
wget "$URL" -O protoc.zip || exit 1
|
||||
unzip protoc.zip -d protoc || exit 1
|
||||
curl -L "$URL" -o protoc.zip
|
||||
unzip protoc.zip -d protoc
|
||||
|
||||
|
|
15
scripts/run-docker-build-appimage.sh
Executable file
15
scripts/run-docker-build-appimage.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
cd "`dirname $(readlink -f ${0})`"
|
||||
|
||||
docker build -t chiaki-xenial . -f Dockerfile.xenial
|
||||
cd ..
|
||||
docker run --rm \
|
||||
-v "`pwd`:/build/chiaki" \
|
||||
-w "/build/chiaki" \
|
||||
--device /dev/fuse \
|
||||
--cap-add SYS_ADMIN \
|
||||
-t chiaki-xenial \
|
||||
/bin/bash -c "scripts/build-appimage.sh"
|
||||
|
14
scripts/run-docker-build-bullseye.sh
Executable file
14
scripts/run-docker-build-bullseye.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
cd "`dirname $(readlink -f ${0})`"
|
||||
|
||||
docker build -t chiaki-bullseye . -f Dockerfile.bullseye
|
||||
cd ..
|
||||
docker run --rm -v "`pwd`:/build" chiaki-bullseye /bin/bash -c "
|
||||
cd /build &&
|
||||
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 &&
|
||||
ninja -C build_bullseye test"
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd build && make install DESTDIR=../appdir && cd .. || exit 1
|
||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage || exit 1
|
||||
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage && chmod +x linuxdeploy-plugin-qt-x86_64.AppImage || exit 1
|
||||
source /opt/qt512/bin/qt512-env.sh || exit 1
|
||||
|
||||
if [ -n "$SDL2_FROM_SRC" ]; then
|
||||
export LD_LIBRARY_PATH="$TRAVIS_BUILD_DIR/sdl2-prefix/lib:$LD_LIBRARY_PATH" || exit 1
|
||||
fi
|
||||
|
||||
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 || exit 1
|
||||
export DEPLOY_FILE="Chiaki-${CHIAKI_VERSION}-Linux-x86_64.AppImage" || exit 1
|
||||
mv Chiaki-*-x86_64.AppImage "$DEPLOY_FILE" || exit 1
|
Loading…
Add table
Add a link
Reference in a new issue