Add deployment to github via travis

This commit is contained in:
Maschell 2018-06-26 12:25:02 +02:00
parent 14cf2d6268
commit 501dcd9556

View File

@ -1,51 +1,63 @@
language: cpp language: cpp
os: linux os: linux
sudo: false sudo: false
dist: trusty dist: trusty
env: env:
global: global:
- DEVKITPRO=/opt/devkitpro - DEVKITPRO=/opt/devkitpro
- WUT_ROOT=/opt/devkitpro/wut - WUT_ROOT=/opt/devkitpro/wut
- DEVKITPPC=/opt/devkitpro/devkitPPC - DEVKITPPC=/opt/devkitpro/devkitPPC
- PORTLIBREPOS=$HOME/portlibrepos - PORTLIBREPOS=$HOME/portlibrepos
cache: cache:
directories: directories:
- "$HOME/.local" - "$HOME/.local"
- "$DEVKITPRO" - "$DEVKITPRO"
addons: addons:
apt: apt:
packages: packages:
- p7zip-full - p7zip-full
before_install: before_install:
- mkdir -p "${PORTLIBREPOS}" - mkdir -p "${PORTLIBREPOS}"
- mkdir -p "${DEVKITPRO}" - mkdir -p "${DEVKITPRO}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -O /tmp/devkitpro-pacman.deb; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo dpkg -i /tmp/devkitpro-pacman.deb; fi -O /tmp/devkitpro-pacman.deb; fi
- yes | sudo dkp-pacman -Syu devkitPPC --needed - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo dpkg -i /tmp/devkitpro-pacman.deb;
- yes | sudo dkp-pacman -Syu general-tools --needed fi
- wget $(curl -s https://api.github.com/repos/decaf-emu/wut/releases/latest | grep 'browser_' | grep 'linux' | cut -d\" -f4) - yes | sudo dkp-pacman -Syu devkitPPC --needed
- yes | sudo dkp-pacman -Syu general-tools --needed
- wget $(curl -s https://api.github.com/repos/decaf-emu/wut/releases/latest | grep
'browser_' | grep 'linux' | cut -d\" -f4)
install: install:
- 7z x -y $(ls | grep "linux") -o${WUT_ROOT} - 7z x -y $(ls | grep "linux") -o${WUT_ROOT}
- cd $PORTLIBREPOS - cd $PORTLIBREPOS
- git clone https://github.com/Maschell/WiiUPluginSystem.git - git clone https://github.com/Maschell/WiiUPluginSystem.git
- git clone https://github.com/Maschell/libutils.git -b wut - git clone https://github.com/Maschell/libutils.git -b wut
- cd WiiUPluginSystem - cd WiiUPluginSystem
- make && make install - make && make install
- cd $PORTLIBREPOS - cd $PORTLIBREPOS
- cd libutils - cd libutils
- mkdir build && cd build - mkdir build && cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$WUT_ROOT ../ - cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$WUT_ROOT
- make install ../
- cd $PORTLIBREPOS - make install
- cd $PORTLIBREPOS
before_script: before_script:
- cd $TRAVIS_BUILD_DIR/ - cd $TRAVIS_BUILD_DIR/
script: script:
- make -j8 - make -j8
before_deploy:
- cd $TRAVIS_BUILD_DIR/
- mkdir -p "wiiu/plugins"
- commit="$(git rev-parse --short=7 HEAD)"
- find plugins -type f -name "*.mod" | xargs -i cp {} wiiu/plugins
- zip -r wups_playground_plugins_$commit.zip wiiu
- git config --local user.name "Maschell"
- git config --local user.email "Maschell@gmx.de"
- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
deploy:
provider: releases
api_key:
secure: c1OMwjNnnbAGInzcfAGFVaBU7HfK4MFvEj6zsihCYBP26a+1+yg5+mBrgI9U5bJvydfPUd2PW5fjwpQM26o3MKWdr8UKjx8/175khug5d94O8IgT8C2LgabImXPMI9FbP5Qgmm2M/LS9XnH2+lj7PdR0O5tEkmj2Xn7beotWD8uyVqconfEMvXhpOrqCW3rd9hPnomJ2HWMhvO/+41OlF+fCnxfXH8xfB9HYyQ63eQb0el1yUFupsdj0IzAqtse4zkPSsLgTnJ2TGhdynXoOU2hmRYigDVrOy5kD8Dl+tnPpUnvkNGRKXwo/q2KR3vev5Yp2EbldDLWCR/IScWitPnN2dkn/O8gLPQ+P+aqANrkakoEsWiHvKZgG+eZ6zXCn61cemOiwhjkMl6lf96XSQ9LHyrRP6XrEHJIuALAtoWfQrdKN7P/4V8hGr3tSxgy+hHcs/AXq71lIS11PaCLszfgOP8yq8HQI4+1hD2UrJ1+c3Q7N51K0IRNbm6URbZ/vUcx5ABECcK6F2tVCY7QCb5bzcfiTUr6x1SDjRoHrZhLQBwIUj4uR8R1sfbZ8q2vd1V84F+rLUwT7IOy3KWZAjePrrk0nVTs/BMneRr/eZZR0nlG0c1nADU7m6Whcym+ptMGpJslJCbH42X6Q3w5W1yB/wYpPSsPkeOUItQE6Gtk=
file: wups_playground_plugins_$commit.zip
on:
repo: Maschell/WUPSPluginPlayground