Commit 514ce3ad authored by nanahira's avatar nanahira

server ci

parent 39dc7730
stages: stages:
- prepare - prepare
- build - build
- sign - combine
- pack - pack
- deploy - deploy
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
#USE_IRRKLANG: "1"
mat_lua: mat_common:
stage: prepare stage: prepare
tags: tags:
- linux - linux
script: script:
- apt update; apt -y install wget tar # lua
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.6.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.4.4.tar.gz | tar zfx -
- mv lua-5.3.6 lua - mv lua-5.4.4 lua
- cp premake/lua/premake5.lua lua/; # sqlite3
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3390300.tar.gz | tar zfx -
- mv sqlite-autoconf-3390300 sqlite3
# freetype
#- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx -
#- mv freetype-2.11.1 freetype
# premake
- cp -rf premake/* .;
artifacts: artifacts:
paths: paths:
- lua - lua
#- freetype
- sqlite3
mat_submodules:
stage: prepare
tags:
- linux
script:
- rm -rf ocgcore script
- mkdir ocgcore script
- git submodule update --init
artifacts:
paths:
- ocgcore
- script
mat_linux: mat_linux:
stage: prepare stage: prepare
...@@ -28,12 +49,14 @@ mat_linux: ...@@ -28,12 +49,14 @@ mat_linux:
- linux - linux
script: script:
- apt update; apt -y install git wget tar - apt update; apt -y install git wget tar
#- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht irrlicht_linux #- 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 - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta2-linux.tar.gz | tar zfx -
- env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts: artifacts:
paths: paths:
- premake5 - premake5
#- irrlicht_linux #- irrlicht
- libevent-stable
mat_windows: mat_windows:
stage: prepare stage: prepare
...@@ -42,38 +65,38 @@ mat_windows: ...@@ -42,38 +65,38 @@ 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-beta1-windows.zip - wget https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta2-windows.zip
- 7z x -y premake-5.0.0-beta1-windows.zip - 7z x -y premake-5.0.0-beta2-windows.zip
# event # event
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx - - 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 - mv libevent-2.0.22-stable event
# sqlite3 # irrlicht
- wget https://cdn01.moecube.com/ygopro-build-materials/sqlite-amalgamation-3310100.zip #- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
- 7z x -y sqlite-amalgamation-3310100.zip
- mv sqlite-amalgamation-3310100 sqlite3
artifacts: artifacts:
paths: paths:
- premake5.exe - premake5.exe
- event - event
- sqlite3
exec_windows: ._exec_build:
stage: build stage: build
tags:
- vs
dependencies:
- mat_lua
- mat_windows
#variables: #variables:
# irrklang_pro: '1' # NO_LUA_SAFE: '1' # on client no lua safe
cache: cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths: paths:
- bin/ - bin/
- obj/ - obj/
exec_windows:
extends: ._exec_build
tags:
- vs
dependencies:
- mat_common
- mat_windows
- mat_submodules
script: script:
- git submodule update --init
- bash -c 'cp -rf premake/* .' - bash -c 'cp -rf premake/* .'
#- cmd /C "patch -p0 < irrlicht\irrlicht.patch"
- '.\premake5.exe vs2019' - '.\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' - 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 . - copy bin\release\ygopro.exe .
...@@ -82,25 +105,40 @@ exec_windows: ...@@ -82,25 +105,40 @@ exec_windows:
- ygopro.exe - ygopro.exe
exec_linux: exec_linux:
stage: build extends: ._exec_build
tags: tags:
- linux - linux
dependencies: dependencies:
#- mat_irrklang - mat_common
- mat_lua
- mat_linux - mat_linux
cache: - mat_submodules
script:
- apt update; apt -y install git build-essential
- ./premake5 gmake --build-sqlite
- cd build
- make config=release -j$(nproc)
- cd ..
- mv bin/release/ygopro ./ygopro
- strip ygopro
artifacts:
paths: paths:
- bin/ - ygopro
- obj/
exec_debian:
extends: ._exec_build
tags:
- linux
dependencies:
- mat_common
- mat_linux
- mat_submodules
script: script:
- apt update; apt -y install git build-essential libevent-dev libsqlite3-dev - apt update; apt -y install git build-essential liblua5.3-dev libsqlite3-dev libevent-dev
- git submodule update --init - ./premake5 gmake --lua-deb
- ./premake5 gmake
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
- mv bin/release/ygopro . - mv bin/release/ygopro ./ygopro
- strip ygopro - strip ygopro
artifacts: artifacts:
paths: paths:
...@@ -115,17 +153,3 @@ exec_linux: ...@@ -115,17 +153,3 @@ exec_linux:
# 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
tags:
- linux
image: python
script:
- pip install -U -i https://mirrors.aliyun.com/pypi/simple/ awscli
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp ygopro.exe s3://mycard/mcpro-server/ygopro.exe
only:
- server
Subproject commit bf017d9003e1923d6e9b59091e590c9c51e8738e Subproject commit dd8d3e3aa7f760e833125593ae9e467f3eff0d0b
Subproject commit f13fb5190cf10bfecec0d37d2bf769a84d042fb1 Subproject commit e51cb51f10af0dab625f9fcb23eca2dd220d9fd2
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