Commit 25f7e7da authored by wyykak's avatar wyykak

Update .gitlab-ci.yml

parent 4db5f22b
Pipeline #11989 failed with stages
in 25 seconds
stages:
- prepare
- build
- combine
- pack
- deploy
variables:
GIT_DEPTH: "1"
......@@ -58,70 +55,6 @@ mat_irrklang:
- irrklang
- ikpmp3
mat_linux:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install git wget tar
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-linux.tar.gz | tar zfx -
- env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts:
paths:
- premake5
- irrlicht
- libevent-stable
mat_macos_platform_x86:
stage: prepare
tags:
- macos
variables:
PROCESSOR_COUNT: '4'
script: ./.ci/libevent-prebuild.sh
artifacts:
paths:
- libevent-stable
mat_macos_platform_m1:
stage: prepare
tags:
- linux
script:
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-m1mac.tar.gz | tar zfx -
artifacts:
paths:
- libevent-stable
mat_macos_irrklang_patched:
stage: build
tags:
- linux
dependencies: []
script:
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libirrklang-patched-dylib.tar.gz | tar zfx -
artifacts:
paths:
- libirrklang-patched.dylib
mat_macos:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install wget tar
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-macosx.tar.gz | tar zfx -
- mkdir irrlicht
- cd irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx -
- cd ..
artifacts:
paths:
- premake5
- irrlicht
mat_windows:
stage: prepare
tags:
......@@ -169,267 +102,3 @@ exec_windows:
artifacts:
paths:
- ygopro.exe
exec_linux:
extends: ._exec_build
tags:
- linux
dependencies:
- mat_common
- mat_irrklang
- mat_linux
- mat_submodules
script:
- apt update; apt -y install git build-essential libgl1-mesa-dev libglu-dev libxxf86vm-dev
- mkdir lib
- cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so ./lib/
# - cp -rf irrklang/bin/linux-gcc-64/ikpMP3.so ./lib/
- export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
- export EVENT_LIB_DIR=$PWD/libevent-stable/lib
- ./premake5 gmake --build-freetype --build-sqlite --build-irrlicht --build-ikpmp3 --irrklang-pro
- cd build
- make config=release -j$(nproc)
- cd ..
- mv bin/release/YGOPro ./ygopro
- strip ygopro
artifacts:
paths:
- ygopro
- lib
._exec_macos_platform:
extends: ._exec_build
tags:
- macos
script:
- ./.ci/exec-macos-platform.sh
artifacts:
paths:
- ygopro-platforms
exec_macos_platform_x86:
extends: ._exec_macos_platform
dependencies:
- mat_irrklang
- mat_macos
- mat_common
- mat_macos_platform_x86
- mat_submodules
variables:
TARGET_PLATFORM: x86
BUILD_IKPMP3: '1'
exec_macos_platform_m1:
extends: ._exec_macos_platform
dependencies:
- mat_macos
- mat_common
- mat_macos_platform_m1
- mat_submodules
variables:
TARGET_PLATFORM: m1
MAC_ARM: '1'
NO_USE_IRRKLANG: '1'
exec_macos:
stage: combine
tags:
- macos
dependencies:
- exec_macos_platform_x86
- exec_macos_platform_m1
- mat_macos_irrklang_patched
script:
- mkdir -p ygopro.app/Contents/MacOS ygopro.app/Contents/Frameworks;
- lipo -create -output ygopro.app/Contents/MacOS/ygopro ygopro-platforms/ygopro-platform-x86 ygopro-platforms/ygopro-platform-m1;
# do some special things for irrklang
- mv ./libirrklang-patched.dylib ygopro.app/Contents/Frameworks/libirrklang.dylib
#- install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ygopro.app/Contents/MacOS/ygopro
#- dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd -i @executable_path/../Frameworks;
#- strip ygopro.app/Contents/MacOS/ygopro;
- mkdir ygopro.app/Contents/Resources;
- mv premake/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns;
- defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIconFile" "Icon.icns";
- defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro";
artifacts:
paths:
- ygopro.app
#exec_macos_sign:
# stage: sign
# tags:
# - macos
# dependencies:
# - exec_macos
# script: ./.ci/sign-macos.sh
# artifacts:
# paths:
# - ygopro.app
# only:
# - tags
# - master
assets:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install tar wget git
# starter pack
- wget -O - https://code.mycard.moe/mycard/ygopro-starter-pack/-/archive/master/ygopro-starter-pack-master.tar.gz | tar zfx -
- mv ygopro-starter-pack-master/* .
# sound
- wget -O - https://code.mycard.moe/mycard/ygopro-sounds/-/archive/master/ygopro-sounds-master.tar.gz | tar zfx -
- mv ygopro-sounds-master/sound/* sound
# fonts
- mkdir fonts
- cd fonts
- wget -O - https://cdn01.moecube.com/ygopro-fonts.tar.gz | tar zfx -
- cd ..
# locales
- git clone --depth=1 https://code.mycard.moe/nanahira/ygopro-database
- mv ygopro-database/locales .
artifacts:
paths:
- deck
- single
- sound
- fonts
- locales
only:
- tags
- master
assets_nonwindows:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install tar wget
- wget -O - https://cdn01.moecube.com/windbot/windbot.tar.gz | tar zfx -
artifacts:
paths:
- bot.conf
- windbot
- bot
only:
- tags
- master
assets_windows:
stage: prepare
tags:
- linux
script:
- wget https://cdn01.moecube.com/windbot/WindBot.7z
- 7z x -y WindBot.7z
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync s3://mycard/koishipro/contents/update-koishipro/ ./update-koishipro
- rm -rf update-koishipro/.git || true
artifacts:
paths:
- bot.conf
- WindBot
- Bot.exe
- update-koishipro
only:
- tags
- master
._locale_zh-CN:
variables:
TARGET_LOCALE: zh-CN
._locale_en-US:
variables:
TARGET_LOCALE: en-US
._assets_locale:
stage: build
tags:
- linux
script: ./.ci/assets-locale.sh
artifacts:
paths:
- pics
- cards.cdb
- strings.conf
- bot.conf
only:
- tags
- master
assets_zh-CN:
extends:
- ._assets_locale
- ._locale_zh-CN
assets_en-US:
extends:
- ._assets_locale
- ._locale_en-US
._pack:
stage: pack
tags:
- linux
artifacts:
paths:
- dist
only:
- tags
- master
._pack_format_gz:
extends: ._pack
variables:
ARCHIVE_SUFFIX: gz
._pack_script_windows_non7z:
extends: ._pack
script: ./.ci/pack-windows.sh
._pack_script_windows_7z:
extends: ._pack
script: ./.ci/pack-windows-7z.sh
._pack_script_linux:
extends: ._pack
script: ./.ci/pack-linux.sh
._pack_assets_windows_zh-CN:
extends: ._pack
dependencies:
- assets
- assets_windows
- exec_windows
- assets_zh-CN
- mat_submodules
._pack_assets_linux_zh-CN:
extends: ._pack
dependencies:
- assets
- assets_nonwindows
- exec_linux
- assets_zh-CN
- mat_submodules
pack_windows_zh-CN_7z:
extends:
- ._pack_assets_windows_zh-CN
- ._pack_script_windows_7z
- ._locale_zh-CN
pack_linux_zh-CN_gz:
extends:
- ._pack_assets_linux_zh-CN
- ._pack_script_linux
- ._pack_format_gz
- ._locale_zh-CN
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