Commit 6487ce0f authored by nanahira's avatar nanahira

update server ci

parent 82d51d78
Pipeline #36846 failed with stages
in 1 minute and 4 seconds
...@@ -14,14 +14,21 @@ mat_common: ...@@ -14,14 +14,21 @@ mat_common:
- linux - linux
script: script:
# lua # lua
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.4.4.tar.gz | tar zfx - - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/lua-5.4.7.tar.gz | tar zfx -
- mv lua-5.4.4 lua - mv lua-5.4.7 lua
# sqlite3 # sqlite3
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3390300.tar.gz | tar zfx - - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/sqlite-autoconf-3490100.tar.gz | tar zfx -
- mv sqlite-autoconf-3390300 sqlite3 - mv sqlite-autoconf-3490100 sqlite3
# freetype # freetype
#- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx - #- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/freetype-2.13.3.tar.gz | tar zfx -
#- mv freetype-2.11.1 freetype #- mv freetype-2.13.3 freetype
# event
- wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/libevent-2.1.12-stable.tar.gz | tar zfx -
- mv libevent-2.1.12-stable event
# irrlicht
- ./.ci/prepare-irrlicht.sh
# miniaudio
#- ./.ci/prepare-miniaudio.sh
# premake # premake
- cp -rf premake/* .; - cp -rf premake/* .;
artifacts: artifacts:
...@@ -29,6 +36,9 @@ mat_common: ...@@ -29,6 +36,9 @@ mat_common:
- lua - lua
#- freetype #- freetype
- sqlite3 - sqlite3
- event
- irrlicht
#- miniaudio
mat_submodules: mat_submodules:
stage: prepare stage: prepare
...@@ -44,21 +54,29 @@ mat_submodules: ...@@ -44,21 +54,29 @@ mat_submodules:
- ocgcore - ocgcore
- script - script
mat_linux: #mat_linux:
# stage: prepare
# tags:
# - linux
# image: git-registry.mycard.moe/mycard/docker-runner-base:debian11
# script:
# - apt update; apt -y install git wget tar
# - ./.ci/prepare-irrlicht.sh
# artifacts:
# paths:
# - irrlicht
mat_macos:
stage: prepare stage: prepare
tags: tags:
- linux - linux
script: script:
- apt update; apt -y install git wget tar - apt update; apt -y install wget tar
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht - wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta6-macosx.tar.gz | tar zfx -
# - wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta5-linux.tar.gz | tar zfx - - chmod +x premake5
# - env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts: artifacts:
paths: paths:
# - premake5 - premake5
- irrlicht
# - libevent-stable
image: git-registry.mycard.moe/mycard/docker-runner-base:debian11
mat_windows: mat_windows:
stage: prepare stage: prepare
...@@ -67,30 +85,23 @@ mat_windows: ...@@ -67,30 +85,23 @@ mat_windows:
script: script:
- apt update; apt -y install wget tar patch p7zip-full - apt update; apt -y install wget tar patch p7zip-full
# premake5.exe # premake5.exe
- wget https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta5-windows.zip - wget https://cdn02.moecube.com:444/ygopro-build-materials/premake-5.0.0-beta6-windows.zip
- 7z x -y premake-5.0.0-beta5-windows.zip - 7z x -y premake-5.0.0-beta6-windows.zip
# event
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- mv libevent-2.0.22-stable event
# irrlicht
# - git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
artifacts: artifacts:
paths: paths:
- premake5.exe - premake5.exe
- event
# - irrlicht
._exec_build: ._exec_build:
stage: build stage: build
#variables: #variables:
# NO_LUA_SAFE: '1' # on client no lua safe # NO_LUA_SAFE: '1' # on client no lua safe
cache: #cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" # key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths: # paths:
- bin/ # - bin/
- obj/ # - obj/
exec_windows: .exec_windows:
extends: ._exec_build extends: ._exec_build
tags: tags:
- vs - vs
...@@ -98,56 +109,134 @@ exec_windows: ...@@ -98,56 +109,134 @@ exec_windows:
- mat_common - mat_common
- mat_windows - mat_windows
- mat_submodules - mat_submodules
script: before_script:
- bash -c 'cp -rf premake/* . ; cp -rf resource/* .' - bash -c 'cp -rf premake/* . ; cp -rf resource/* .'
- '.\premake5.exe vs2019'
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\YGOPro.sln /m /p:Configuration=Release'
- copy bin\release\ygopro.exe .
artifacts: artifacts:
paths: paths:
- ygopro.exe - dist
exec_linux: exec_windows:
extends: .exec_windows
script:
- '.\premake5.exe vs2019 --server-zip-support'
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\YGOPro.sln /m /p:Configuration=Release /p:Platform=x64'
- mkdir dist
- mkdir dist\windows
- copy bin\release\x64\ygopro.exe dist\windows\ygopro.exe
exec_windows_pro3:
extends: .exec_windows
script:
- '.\premake5.exe vs2019 --server-pro3-support --log-in-chat'
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\YGOPro.sln /m /p:Configuration=Release /p:Platform=x64'
- mkdir dist
- mkdir dist\windows
- copy bin\release\x64\ygoserver.dll dist\windows\ygoserver.dll
.exec_unix_common:
extends: ._exec_build extends: ._exec_build
tags: variables:
- linux RELEASE_DIR: ''
dependencies: TARGET_FILE: ygopro
- mat_common PREMAKE5_BIN: premake5
- mat_linux
- mat_submodules
script: script:
- apt update; apt -y install git build-essential - ./.ci/configure-libevent.sh
- premake5 gmake --build-sqlite --server-zip-support - $PREMAKE5_BIN gmake
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
- mv bin/release/ygopro ./ygopro - mkdir -p dist/$RELEASE_DIR
- strip ygopro - mv bin/release/$TARGET_FILE dist/$RELEASE_DIR/$TARGET_FILE
- |
if [ "$TARGET_FILE" = "ygopro" ]; then
strip dist/$RELEASE_DIR/$TARGET_FILE
fi
artifacts: artifacts:
paths: paths:
- ygopro - dist
image: git-registry.moenext.com/mycard/docker-ygopro-builder:latest
exec_debian: .exec_linux_common:
extends: ._exec_build extends: .exec_unix_common
tags: tags:
- linux - linux
image: git-registry.moenext.com/mycard/docker-ygopro-builder
dependencies:
- mat_common
#- mat_linux
- mat_submodules
.exec_linux:
extends: .exec_linux_common
variables:
BUILD_SQLITE: '1'
SERVER_ZIP_SUPPORT: '1'
RELEASE_DIR: linux-x64
.exec_debian:
extends: .exec_linux_common
variables:
LUA_DEB: '1'
RELEASE_DIR: debian-x64
before_script:
- apt update; apt -y install git build-essential liblua5.4-dev libsqlite3-dev libevent-dev
.use_arm:
image: git-registry.moenext.com/mycard/docker-ygopro-builder:fpic
tags:
- arm
exec_linux:
extends: .exec_linux
tags:
- noavx2
exec_debian:
extends: .exec_debian
.exec_macos_platform:
extends: .exec_unix_common
dependencies: dependencies:
- mat_common - mat_common
- mat_linux - mat_macos
- mat_submodules - mat_submodules
variables:
PREMAKE5_BIN: ./premake5
BUILD_SQLITE: '1'
BUILD_EVENT: '1'
SERVER_ZIP_SUPPORT: '1'
before_script:
- rm -rf sqlite3/VERSION sqlite3/version
exec_macos_x64:
extends: .exec_macos_platform
tags:
- macos
variables:
RELEASE_DIR: macos-x64
exec_macos_arm64:
extends: .exec_macos_platform
tags:
- macos-m1
variables:
RELEASE_DIR: macos-arm64
exec_macos:
stage: combine
tags:
- macos
dependencies:
- exec_macos_x64
- exec_macos_arm64
script: script:
- apt update; apt -y install git build-essential liblua5.3-dev libsqlite3-dev libevent-dev - mkdir -p dist/macos
- premake5 gmake --lua-deb - lipo -create -output dist/macos/ygopro dist/macos-x64/ygopro dist/macos-arm64/ygopro
- cd build - rm -rf dist/macos-x64 dist/macos-arm64
- make config=release -j$(nproc)
- cd ..
- mv bin/release/ygopro ./ygopro
- strip ygopro
artifacts: artifacts:
paths: paths:
- ygopro - dist
image: git-registry.moenext.com/mycard/docker-ygopro-builder:latest
#win_server_pack: #win_server_pack:
# stage: pack # stage: pack
...@@ -158,3 +247,18 @@ exec_debian: ...@@ -158,3 +247,18 @@ exec_debian:
# script: # script:
# - apt update; apt -y install p7zip-full wget # - apt update; apt -y install p7zip-full wget
# - wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-win-x64.7z # - wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-win-x64.7z
upload_to_minio:
stage: deploy
dependencies:
- exec_windows
- exec_linux
- exec_debian
- exec_macos
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/ygopro-server-builds
only:
- server
- tags
language: cpp
dist: bionic
git:
submodules: false
addons:
ssh_known_hosts:
- github.com
apt:
# sources:
# - ubuntu-toolchain-r-test
packages:
# - gcc-6
# - g++-6
- libevent-dev
- libsqlite3-dev
- liblua5.3-dev
before_install:
- git submodule update --init --recursive
#- sudo ln -s /usr/bin/gcc-6 /usr/local/bin/gcc
#- sudo ln -s /usr/bin/g++-6 /usr/local/bin/g++
#- g++ --version
- wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-linux.tar.gz | tar zfx -
#- wget -O - https://www.lua.org/ftp/lua-5.3.6.tar.gz | tar zfx -; cd lua-5.3.6; sudo make linux install; cd ..
script:
- ./premake5 gmake
- cd build
- make config=release
...@@ -9,32 +9,33 @@ install: ...@@ -9,32 +9,33 @@ install:
- git submodule update --init --recursive - git submodule update --init --recursive
# environment and system dependency # environment and system dependency
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta3/premake-5.0.0-beta3-windows.zip ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta6/premake-5.0.0-beta6-windows.zip ; exit 0"
- 7z x premake-5.0.0-beta3-windows.zip - 7z x premake-5.0.0-beta6-windows.zip
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz ; exit 0"
- tar xf libevent-2.0.22-stable.tar.gz - tar xf libevent-2.1.12-stable.tar.gz
- move libevent-2.0.22-stable event - move libevent-2.1.12-stable event
- xcopy /E event\WIN32-Code event\include
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.7.tar.gz ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.7.tar.gz ; exit 0"
- tar xf lua-5.4.7.tar.gz - tar xf lua-5.4.7.tar.gz
- move lua-5.4.7 lua - move lua-5.4.7 lua
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/2024/sqlite-amalgamation-3470000.zip ; exit 0" - bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip ; exit 0"
- 7z x sqlite-amalgamation-3470000.zip - 7z x sqlite-amalgamation-3490100.zip
- move sqlite-amalgamation-3470000 sqlite3 - move sqlite-amalgamation-3490100 sqlite3
- git clone --depth=1 https://github.com/mercury233/irrlicht
before_build: before_build:
- xcopy /E premake\* . - xcopy /E premake\* .
- xcopy /E resource\* . - xcopy /E resource\* .
- premake5 vs2022 - premake5 vs2022
configuration: Release
build: build:
project: build/YGOPro.sln project: build/YGOPro.sln
parallel: true parallel: true
configuration: Release
platform: x64
test: off test: off
...@@ -45,29 +46,20 @@ for: ...@@ -45,29 +46,20 @@ for:
- SERVER_PRO2_SUPPORT: true - SERVER_PRO2_SUPPORT: true
before_build: before_build:
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.5.zip ; exit 0"
- 7z x irrlicht-1.8.5.zip
- move irrlicht-1.8.5 irrlicht
- xcopy /E premake\* . - xcopy /E premake\* .
- xcopy /E resource\* . - xcopy /E resource\* .
- cd irrlicht
- patch -p1 < irrlicht.patch
- cd ..
- premake5 vs2022 - premake5 vs2022
after_build: after_build:
- ps: move bin\release\AI.Server.exe . - ps: move bin\release\x64\AI.Server.exe .
artifacts: artifacts:
- path: AI.Server.exe - path: AI.Server.exe
name: YGOPro server for YGOPro2 AI name: YGOPro server for YGOPro2 AI
cache: cache:
- premake-5.0.0-beta3-windows.zip - premake-5.0.0-beta6-windows.zip
- libevent-2.0.22-stable.tar.gz - libevent-2.1.12-stable.tar.gz
- irrlicht-1.8.5.zip
- lua-5.4.7.tar.gz - lua-5.4.7.tar.gz
- sqlite-amalgamation-3470000.zip - sqlite-amalgamation-3490100.zip
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