Commit 1b392326 authored by nanahira's avatar nanahira

test macos

parent 3fbf6a87
Pipeline #3599 failed with stages
in 4 minutes and 12 seconds
stages:
- prepare
- build
- sign
- pack
- deploy
......@@ -50,21 +51,21 @@ mat_linux:
- premake5
- irrlicht_linux
mat_mac:
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-alpha12-macosx.tar.gz | tar zfx -
- mkdir irrlicht_mac
- cd irrlicht_mac
- 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_mac
- irrlicht
mat_windows:
stage: prepare
......@@ -150,6 +151,50 @@ exec_linux:
- ygopro
- libIrrKlang.so
exec_macos:
stage: build
tags:
- macos
dependencies:
- mat_irrklang
- mat_macos
cache:
paths:
- bin/
- obj/
script:
- brew install freetype libevent sqlite dylibbundler
- ./premake5 gmake --cc=clang
- cd build
- make config=release -j4
- cd ..
- mkdir -p ygopro.app/Contents/MacOS;
- mv bin/release/ygopro ygopro.app/Contents/MacOS;
- dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd;
- 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:
- codesign --deep --sign "$(security find-identity -v -p codesigning $MACOS_KEYCHAIN_NAME | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app
artifacts:
paths:
- ygopro.app
only:
- tags
- gitlabci
assets:
stage: prepare
tags:
......@@ -337,13 +382,53 @@ pack_linux_en-US:
- tags
- gitlabci
pack_macos_zh-CN:
stage: pack
tags:
- linux
dependencies:
- assets
- assets_nonwindows
- exec_macos_sign
- assets_zh-CN
script: ./.ci/pack-macos.sh
variables:
TARGET_LOCALE: zh-CN
artifacts:
paths:
- dist
only:
- tags
- gitlabci
pack_macos_en-US:
stage: pack
tags:
- linux
dependencies:
- assets
- assets_nonwindows
- exec_macos_sign
- assets_en-US
script: ./.ci/pack-macos.sh
variables:
TARGET_LOCALE: en-US
artifacts:
paths:
- dist
only:
- tags
- gitlabci
upload_to_minio:
stage: deploy
dependencies:
- pack_windows_zh-CN
- pack_linux_zh-CN
- pack_macos_zh-CN
- pack_windows_en-US
- pack_linux_en-US
- pack_macos_en-US
tags:
- linux
image: python
......
......@@ -46,7 +46,7 @@ before_install:
cp premake/lua/premake4.lua lua/;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir irrlicht ; cd irrlicht ; curl --retry 5 --location https://github.com/moecube/irrlicht/releases/download/test/irrlicht-mycard-mac.tar.gz | tar zfx - ; cp libIrrlicht.a /usr/local/lib/ ; sudo cp -r include /usr/local/include/irrlicht ; cd .. ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir irrlicht ; cd irrlicht ; curl --retry 5 --location https://github.com/moecube/irrlicht/releases/download/test/irrlicht-mycard-mac.tar.gz | tar zfx - ; cd .. ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl --retry 5 --location https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl --retry 5 --location https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz | tar zfx - ; fi
......
......@@ -55,6 +55,8 @@ project "ygopro"
end
configuration "macosx"
links { "lua" }
includedirs { "../irrlicht/include" }
libdirs { "../irrlicht" }
if USE_IRRKLANG then
links { "irrklang" }
libdirs { "../irrklang/bin/macosx-gcc" }
......
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