Commit 1b2f1e4b authored by nanahira's avatar nanahira

fix ci dir

parent 5e5f5b56
Pipeline #36849 failed with stages
in 1 minute and 44 seconds
export ASSET_BRANCH_NAME="master"
# if $CI_COMMIT_REF_NAME includes develop or pre, then we use the develop branch
if [[ "$CI_COMMIT_REF_NAME" == *"develop"* || "$CI_COMMIT_REF_NAME" == *".pre"* ]]; then
export ASSET_BRANCH_NAME="develop"
fi
#!/bin/bash #!/bin/bash
set -x set -x
set -o errexit set -o errexit
source .ci/asset-branch
# ygopro-database # ygopro-database
apt update && apt -y install wget git libarchive-tools apt update && apt -y install wget git libarchive-tools sqlite3
git clone --depth=1 https://code.mycard.moe/mycard/ygopro-database git clone --depth=1 -b "$ASSET_BRANCH_NAME" https://code.moenext.com/mycard/ygopro-database
cp -rf ./ygopro-database/locales/$TARGET_LOCALE/* . cp -rf ./ygopro-database/locales/$TARGET_LOCALE/strings.conf .
rm -f cards.cdb
sqlite3 ./ygopro-database/locales/$TARGET_LOCALE/cards.cdb .dump | sqlite3 cards.cdb
# ygopro-images # ygopro-images
mkdir pics mkdir pics
wget -O - https://cdn01.moecube.com/images/ygopro-images-${TARGET_LOCALE}.zip | bsdtar -C pics -xf - if [[ "$ASSET_BRANCH_NAME" == "develop" ]]; then
echo "This is a pre-release, skipping download."
else
wget -O - https://cdn02.moecube.com:444/images/ygopro-images-${TARGET_LOCALE}.zip | bsdtar -C pics -xf -
fi
#!/bin/bash
libs_to_configure=(
"ogg"
# "opus"
)
cd miniaudio/external
for lib in "${libs_to_configure[@]}"; do
cd $lib
./configure
cd ..
done
#!/bin/sh
set -x
set -o errexit
cd event
./configure --disable-openssl --enable-static=yes --enable-shared=no
sed -f make-event-config.sed < config.h > ./include/event2/event-config.h
cd ..
...@@ -4,18 +4,15 @@ set -o errexit ...@@ -4,18 +4,15 @@ set -o errexit
TARGET_PLATFORM=$(arch) TARGET_PLATFORM=$(arch)
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
export IRRLICHT_LIB_DIR=$PWD/irrlicht
./.ci/libevent-prebuild.sh ./.ci/configure-audio.sh
chmod +x ./premake5 rm -rf sqlite3/VERSION sqlite3/version
./premake5 gmake --cc=clang --build-freetype --build-sqlite --no-use-irrklang
./premake5 gmake --cc=clang
cd build cd build
make config=release -j4 make config=release -j$(sysctl -n hw.ncpu)
cd .. cd ..
mkdir ygopro-platforms mkdir ygopro-platforms
......
...@@ -5,4 +5,4 @@ set -o errexit ...@@ -5,4 +5,4 @@ set -o errexit
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
mkdir dist replay mkdir dist replay
tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-linux-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro LICENSE README.md lib lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf pack tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-linux-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf pack fonts
...@@ -5,4 +5,4 @@ set -o errexit ...@@ -5,4 +5,4 @@ set -o errexit
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
mkdir dist replay mkdir dist replay
tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-darwin-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay windbot bot bot.conf pack tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-darwin-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf pack fonts
...@@ -5,4 +5,4 @@ set -o errexit ...@@ -5,4 +5,4 @@ set -o errexit
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
mkdir dist replay mkdir dist replay
tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot pack tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot pack fonts
#!/bin/bash
set -x
set -o errexit
source .ci/asset-branch
IRRLICHT_REPO_URL="https://code.moenext.com/mycard/irrlicht-new.git"
IRRLICHT_BRANCH_NAME="$ASSET_BRANCH_NAME"
if [ ! -d "irrlicht" ]; then
git clone --depth=1 --branch "$IRRLICHT_BRANCH_NAME" "$IRRLICHT_REPO_URL" irrlicht
else
cd irrlicht
git fetch origin "$IRRLICHT_BRANCH_NAME"
git checkout "$IRRLICHT_BRANCH_NAME"
git reset --hard origin/"$IRRLICHT_BRANCH_NAME"
cd ..
fi
#!/bin/sh
set -x
set -o errexit
if [ ! -d "miniaudio" ]; then
git clone --depth=1 --branch 0.11.22 https://github.com/mackron/miniaudio
fi
cp -rf miniaudio/extras/miniaudio_split/miniaudio.* miniaudio/
mkdir -p miniaudio/external
install_external() {
dir="$1"
url="$2"
if [ ! -d "miniaudio/external/$dir" ]; then
mkdir -p "miniaudio/external/$dir"
# Download the external library and strip one level of directories from the archive
wget -O - "$url" | tar --strip-components=1 -C "miniaudio/external/$dir" -zxf -
fi
}
install_external "ogg" "https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz"
install_external "opus" "https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz"
install_external "opusfile" "https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz"
install_external "vorbis" "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz"
...@@ -33,9 +33,15 @@ runForDepot() { ...@@ -33,9 +33,15 @@ runForDepot() {
echo "$result" | jq . echo "$result" | jq .
} }
runForDepot win32 zh-CN source .ci/asset-branch
runForDepot linux zh-CN
runForDepot darwin zh-CN if [[ "$ASSET_BRANCH_NAME" == "develop" ]]; then
runForDepot win32 en-US echo "This is a pre-release, skipping upload."
runForDepot linux en-US else
runForDepot darwin en-US runForDepot win32 zh-CN
runForDepot linux zh-CN
runForDepot darwin zh-CN
runForDepot win32 en-US
runForDepot linux en-US
runForDepot darwin en-US
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment