Commit b981b10d authored by nanahira's avatar nanahira

travis

parent 4473d61a
...@@ -4,7 +4,7 @@ os: ...@@ -4,7 +4,7 @@ os:
- osx - osx
sudo: required sudo: required
dist: xenial dist: xenial
osx_image: xcode8 osx_image: xcode9.4
addons: addons:
ssh_known_hosts: ssh_known_hosts:
- github.com - github.com
...@@ -16,11 +16,23 @@ addons: ...@@ -16,11 +16,23 @@ addons:
- libgl1-mesa-dev - libgl1-mesa-dev
- libglu-dev - libglu-dev
- p7zip-full - p7zip-full
homebrew:
packages:
- freetype
- libevent
- sqlite
- dylibbundler
- p7zip
env: env:
- USE_IRRKLANG=1 - USE_IRRKLANG=1
before_install: before_install:
- git submodule update --init --recursive - 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 - 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 -; 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: ...@@ -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 -; 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 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 - git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/irrklang
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
...@@ -49,7 +59,7 @@ script: ...@@ -49,7 +59,7 @@ script:
- cd .. - cd ..
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv bin/release/ygopro ./; strip ygopro; - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv bin/release/ygopro ./; strip ygopro;
fi fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir -p ygopro.app/Contents/MacOS; mkdir -p ygopro.app/Contents/MacOS;
mv bin/release/ygopro 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; dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd;
...@@ -59,10 +69,10 @@ script: ...@@ -59,10 +69,10 @@ script:
defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro"; defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro";
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
echo $CERTIFICATE | base64 --decode --output cert.p12; echo $CERTIFICATE | base64 --decode --output cert.p12;
security create-keychain -p "" build.keychain; security unlock-keychain -p "" build.keychain; security create-keychain -p "" build.keychain; security default-keychain -s build.keychain; security unlock-keychain -p "" build.keychain;
security import cert.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign; security import cert.p12 -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign;
codesign --deep --keychain build.keychain --sign "$(security find-identity -v -p security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain;
codesigning build.keychain | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app; codesign --deep --sign "$(security find-identity -v -p codesigning build.keychain | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app;
fi fi
fi fi
before_deploy: before_deploy:
......
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