Commit c4f2c105 authored by nanahira's avatar nanahira

use pure m1 for build

parent 2b060d5b
Pipeline #15229 failed with stages
in 2 minutes and 18 seconds
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
set -x set -x
set -o errexit set -o errexit
TARGET_PLATFORM=$(arch)
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib export EVENT_LIB_DIR=$PWD/libevent-stable/lib
...@@ -10,11 +11,7 @@ export IRRLICHT_LIB_DIR=$PWD/irrlicht ...@@ -10,11 +11,7 @@ export IRRLICHT_LIB_DIR=$PWD/irrlicht
git submodule update --init git submodule update --init
if [[ $TARGET_PLATFORM == "x86" ]]; then ./premake5 gmake --cc=clang --build-freetype --build-sqlite --no-use-irrklang
./premake5 gmake --cc=clang --build-freetype --build-sqlite --build-ikpmp3
else
./premake5 gmake --cc=clang --build-freetype --build-sqlite --no-use-irrklang
fi
cd build cd build
make config=release -j4 make config=release -j4
...@@ -23,8 +20,8 @@ cd .. ...@@ -23,8 +20,8 @@ cd ..
mkdir ygopro-platforms mkdir ygopro-platforms
mv bin/release/YGOPro.app $TARGET_YGOPRO_BINARY_PATH mv bin/release/YGOPro.app $TARGET_YGOPRO_BINARY_PATH
if [[ $TARGET_PLATFORM == "x86" ]]; then #if [[ $TARGET_PLATFORM == "x86" ]]; then
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH # install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib $TARGET_YGOPRO_BINARY_PATH
fi #fi
strip $TARGET_YGOPRO_BINARY_PATH strip $TARGET_YGOPRO_BINARY_PATH
...@@ -9,6 +9,12 @@ stages: ...@@ -9,6 +9,12 @@ stages:
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
.only_release:
only:
- master
- another
- tags
mat_common: mat_common:
stage: prepare stage: prepare
tags: tags:
...@@ -61,28 +67,6 @@ mat_linux: ...@@ -61,28 +67,6 @@ mat_linux:
- irrlicht - irrlicht
- libevent-stable - 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: #mat_macos_irrklang_patched:
# stage: build # stage: build
# tags: # tags:
...@@ -101,7 +85,7 @@ mat_macos: ...@@ -101,7 +85,7 @@ mat_macos:
script: script:
- apt update; apt -y install wget tar - 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 - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-macosx.tar.gz | tar zfx -
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libirrklang-patched-dylib.tar.gz | tar zfx - # - wget -O - https://cdn01.moecube.com/ygopro-build-materials/libirrklang-patched-dylib.tar.gz | tar zfx -
- mkdir irrlicht - mkdir irrlicht
- cd irrlicht - cd irrlicht
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/irrlicht-mycard-mac.tar.gz | tar zfx -
...@@ -113,6 +97,7 @@ mat_macos: ...@@ -113,6 +97,7 @@ mat_macos:
- irrlicht - irrlicht
mat_windows: mat_windows:
extends: .only_release
stage: prepare stage: prepare
tags: tags:
- linux - linux
...@@ -133,6 +118,7 @@ mat_windows: ...@@ -133,6 +118,7 @@ mat_windows:
- irrlicht - irrlicht
exec_windows: exec_windows:
extends: .only_release
stage: build stage: build
tags: tags:
- vs - vs
...@@ -187,18 +173,11 @@ exec_linux: ...@@ -187,18 +173,11 @@ exec_linux:
- ygopro - ygopro
- lib - lib
exec_macos_platform_x86: .exec_macos_platform:
stage: build stage: build
tags:
- macos
dependencies: dependencies:
#- mat_irrklang
- mat_macos - mat_macos
- mat_common - mat_common
- mat_macos_platform_x86
variables:
TARGET_PLATFORM: x86
NO_USE_IRRKLANG: '1'
cache: cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths: paths:
...@@ -208,28 +187,16 @@ exec_macos_platform_x86: ...@@ -208,28 +187,16 @@ exec_macos_platform_x86:
artifacts: artifacts:
paths: paths:
- ygopro-platforms - ygopro-platforms
exec_macos_platform_x86:
extends: .exec_macos_platform
tags:
- macos
exec_macos_platform_m1: exec_macos_platform_m1:
stage: build extends: .exec_macos_platform
tags: tags:
- macos - macos
dependencies:
- mat_macos
- mat_common
- mat_macos_platform_m1
variables:
TARGET_PLATFORM: m1
MAC_ARM: '1'
NO_USE_IRRKLANG: '1'
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- bin/
- obj/
script: ./.ci/exec-macos-platform.sh
artifacts:
paths:
- ygopro-platforms
exec_macos: exec_macos:
stage: combine stage: combine
...@@ -241,7 +208,7 @@ exec_macos: ...@@ -241,7 +208,7 @@ exec_macos:
#- mat_macos_irrklang_patched #- mat_macos_irrklang_patched
script: script:
- mkdir -p ygopro.app/Contents/MacOS ygopro.app/Contents/Frameworks; - 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; - lipo -create -output ygopro.app/Contents/MacOS/ygopro $(ls -1 ygopro-platforms/ygopro-platform-*);
# do some special things for irrklang # do some special things for irrklang
# - mv ./libirrklang-patched.dylib ygopro.app/Contents/Frameworks/libirrklang.dylib # - 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 #- install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib ygopro.app/Contents/MacOS/ygopro
......
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