From b981b10db7f6a9a7c041a9b5cb528be5afd7616e Mon Sep 17 00:00:00 2001 From: purerosefallen <78877@qq.com> Date: Sat, 30 Mar 2019 11:14:35 +0800 Subject: [PATCH] travis --- .travis.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3bb4a344e..e9c700e52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: - osx sudo: required dist: xenial -osx_image: xcode8 +osx_image: xcode9.4 addons: ssh_known_hosts: - github.com @@ -16,11 +16,23 @@ addons: - libgl1-mesa-dev - libglu-dev - p7zip-full + homebrew: + packages: + - freetype + - libevent + - sqlite + - dylibbundler + - p7zip env: - USE_IRRKLANG=1 before_install: - git submodule update --init --recursive -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install freetype libevent sqlite dylibbundler p7zip; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + sudo rm -rf /usr/local/include/unistring; + sudo rm -rf /usr/local/include/lzma; + sudo rm -f /usr/local/include/CGAL/stddef.h; 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 curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-macosx.tar.gz | tar zfx -; @@ -30,8 +42,6 @@ before_install: curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-linux.tar.gz | tar zfx -; 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 - - git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/irrklang - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then @@ -49,7 +59,7 @@ script: - cd .. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv bin/release/ygopro ./; strip ygopro; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 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; @@ -59,10 +69,10 @@ script: defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro"; if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then echo $CERTIFICATE | base64 --decode --output cert.p12; - security create-keychain -p "" build.keychain; security unlock-keychain -p "" build.keychain; - security import cert.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign; - codesign --deep --keychain build.keychain --sign "$(security find-identity -v -p - codesigning build.keychain | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app; + security create-keychain -p "" build.keychain; security default-keychain -s build.keychain; security unlock-keychain -p "" build.keychain; + security import cert.p12 -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign; + security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain; + codesign --deep --sign "$(security find-identity -v -p codesigning build.keychain | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app; fi fi before_deploy: