Commit 17edb59b authored by hex's avatar hex

Skip gitlab-ci execution

parent 216a90d5
Pipeline #37606 failed
@echo off
@REM @echo off
set UNITY_PATH="C:\Program Files\Unity\Editor\Unity.exe"
@REM set UNITY_PATH="C:\Program Files\Unity\Editor\Unity.exe"
mkdir output
mkdir dist
%UNITY_PATH% -batchmode -nographics -silent-crashes -projectPath %cd% -logFile dist/build.log -executeMethod BuildHelper.Build -quit
if %errorlevel% neq 0 exit /b %errorlevel%
cat dist/build.log
mv output dist/src
@REM mkdir output
@REM mkdir dist
@REM %UNITY_PATH% -batchmode -nographics -silent-crashes -projectPath %cd% -logFile dist/build.log -executeMethod BuildHelper.Build -quit
@REM if %errorlevel% neq 0 exit /b %errorlevel%
@REM cat dist/build.log
@REM mv output dist/src
stages:
- prepare1
- prepare2
- build
- patch
- pack
- deploy
# stages:
# - prepare1
# - prepare2
# - build
# - patch
# - pack
# - deploy
variables:
GIT_DEPTH: "1"
# variables:
# GIT_DEPTH: "1"
cache:
paths:
- Library/
- Temp/
# cache:
# paths:
# - Library/
# - Temp/
get_data:
stage: prepare1
tags:
- linux
dependencies: []
artifacts:
paths:
- ygopro2-data/cdb
- ygopro2-data/deck
- ygopro2-data/pack
# - ygopro2-data/picture
script:
- mkdir -p ygopro2-data/cdb ygopro2-data/pack # ygopro2-data/picture
- wget -O ygopro2-data/cdb/cards.cdb https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/cards.cdb
- wget -O ygopro2-data/cdb/lflist.conf https://cdn02.moecube.com:444/koishipro/contents/lflist.conf
- wget -O ygopro2-data/cdb/strings.conf https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/strings.conf
- git clone --depth=1 https://code.mycard.moe/mycard/ygopro-starter-pack
- mv ygopro-starter-pack/deck ygopro2-data/
- wget -O ygopro2-data/pack/pack.db https://cdn02.moecube.com:444/ygopro-card-list/pack.db
#- wget -O images.zip https://cdn02.moecube.com:444/images/ygopro-images-zh-CN.zip
# - 7z x -y -oygopro2-data/picture/card images.zip
# get_data:
# stage: prepare1
# tags:
# - linux
# dependencies: []
# artifacts:
# paths:
# - ygopro2-data/cdb
# - ygopro2-data/deck
# - ygopro2-data/pack
# # - ygopro2-data/picture
# script:
# - mkdir -p ygopro2-data/cdb ygopro2-data/pack # ygopro2-data/picture
# - wget -O ygopro2-data/cdb/cards.cdb https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/cards.cdb
# - wget -O ygopro2-data/cdb/lflist.conf https://cdn02.moecube.com:444/koishipro/contents/lflist.conf
# - wget -O ygopro2-data/cdb/strings.conf https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/strings.conf
# - git clone --depth=1 https://code.mycard.moe/mycard/ygopro-starter-pack
# - mv ygopro-starter-pack/deck ygopro2-data/
# - wget -O ygopro2-data/pack/pack.db https://cdn02.moecube.com:444/ygopro-card-list/pack.db
# #- wget -O images.zip https://cdn02.moecube.com:444/images/ygopro-images-zh-CN.zip
# # - 7z x -y -oygopro2-data/picture/card images.zip
make_data_archive:
stage: prepare2
tags:
- macos
dependencies:
- get_data
artifacts:
paths:
- Assets/StreamingAssets/ygopro2-data.zip
script:
- cd ygopro2-data
- mkdir replay
- zip -r ../Assets/StreamingAssets/ygopro2-data.zip *
- cd ..
# make_data_archive:
# stage: prepare2
# tags:
# - macos
# dependencies:
# - get_data
# artifacts:
# paths:
# - Assets/StreamingAssets/ygopro2-data.zip
# script:
# - cd ygopro2-data
# - mkdir replay
# - zip -r ../Assets/StreamingAssets/ygopro2-data.zip *
# - cd ..
unity:
stage: build
script: cmd /C .gitlab-ci.bat
dependencies:
- make_data_archive
artifacts:
paths:
- dist/
tags:
- unity
# unity:
# stage: build
# script: cmd /C .gitlab-ci.bat
# dependencies:
# - make_data_archive
# artifacts:
# paths:
# - dist/
# tags:
# - unity
patch-header:
stage: patch
dependencies:
- unity
script:
- apt update; apt -y install tar patch
- mv dist/src ./unity-src
- cd unity-src
- chmod +x *.sh
- sed -i 's/ENABLE_BITCODE = YES;/ENABLE_BITCODE = NO;/g' Unity-iPhone.xcodeproj/project.pbxproj
- sed -i -e '/>UIStatusBarStyle</i\ <key>UIFileSharingEnabled</key>\n <true />\n <key>LSSupportsOpeningDocumentsInPlace</key>\n <true />' -e '/>UIApplicationExitsOnSuspend</,+1d' ./Info.plist
- patch -p1 < ../misc/patches/iPhone_Sensors.mm.patch
- echo '#define UNITY_USES_LOCATION 0' >> ./Classes/Preprocessor.h
- sed -i 's/^#define UNITY_USES_REMOTE_NOTIFICATIONS 1/#define UNITY_USES_REMOTE_NOTIFICATIONS 0/g' ./Classes/Preprocessor.h
- rm -rf Libraries
- cd ..
artifacts:
paths:
- unity-src/
tags:
- linux
# patch-header:
# stage: patch
# dependencies:
# - unity
# script:
# - apt update; apt -y install tar patch
# - mv dist/src ./unity-src
# - cd unity-src
# - chmod +x *.sh
# - sed -i 's/ENABLE_BITCODE = YES;/ENABLE_BITCODE = NO;/g' Unity-iPhone.xcodeproj/project.pbxproj
# - sed -i -e '/>UIStatusBarStyle</i\ <key>UIFileSharingEnabled</key>\n <true />\n <key>LSSupportsOpeningDocumentsInPlace</key>\n <true />' -e '/>UIApplicationExitsOnSuspend</,+1d' ./Info.plist
# - patch -p1 < ../misc/patches/iPhone_Sensors.mm.patch
# - echo '#define UNITY_USES_LOCATION 0' >> ./Classes/Preprocessor.h
# - sed -i 's/^#define UNITY_USES_REMOTE_NOTIFICATIONS 1/#define UNITY_USES_REMOTE_NOTIFICATIONS 0/g' ./Classes/Preprocessor.h
# - rm -rf Libraries
# - cd ..
# artifacts:
# paths:
# - unity-src/
# tags:
# - linux
patch-lib:
stage: patch
dependencies:
- unity
script:
- mkdir unity-src
- cd unity-src
- mv ../dist/src/Libraries .
- env MISC_PATH="../misc" ../patches.sh
- cd ..
artifacts:
paths:
- unity-src/
tags:
- macos
# patch-lib:
# stage: patch
# dependencies:
# - unity
# script:
# - mkdir unity-src
# - cd unity-src
# - mv ../dist/src/Libraries .
# - env MISC_PATH="../misc" ../patches.sh
# - cd ..
# artifacts:
# paths:
# - unity-src/
# tags:
# - macos
pack:
stage: pack
dependencies:
- patch-header
- patch-lib
script:
- mkdir dist
- cd unity-src
- tar zcvf ../dist/KoishiPro2-src.tar.gz *
- cd ..
artifacts:
paths:
- dist/
tags:
- linux
# pack:
# stage: pack
# dependencies:
# - patch-header
# - patch-lib
# script:
# - mkdir dist
# - cd unity-src
# - tar zcvf ../dist/KoishiPro2-src.tar.gz *
# - cd ..
# artifacts:
# paths:
# - dist/
# tags:
# - linux
upload_to_minio_latest:
stage: deploy
dependencies:
- pack
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/koishipro2/latest
only:
- Android
#- tags
# upload_to_minio_latest:
# stage: deploy
# dependencies:
# - pack
# tags:
# - linux
# script:
# - aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/koishipro2/latest
# only:
# - Android
# #- tags
upload_to_minio_tag:
stage: deploy
dependencies:
- pack
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/koishipro2/$CI_COMMIT_TAG
only:
- tags
# upload_to_minio_tag:
# stage: deploy
# dependencies:
# - pack
# tags:
# - linux
# script:
# - aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/koishipro2/$CI_COMMIT_TAG
# only:
# - tags
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