[Travis] Updated the script to now use pacman, caching optimization

- The Makefile now doesn't rely on wii_rules anymore.
This commit is contained in:
Maschell 2018-05-26 12:54:30 +02:00
parent dacc8044c6
commit 8a32e357f5
2 changed files with 37 additions and 22 deletions

View File

@ -1,38 +1,42 @@
language: c
sudo: false
language: cpp
os:
- linux
os: linux
sudo: false
dist: trusty
env:
global:
- DEVKITPRO=$HOME/devkitPro
- DEVKITPPC=${DEVKITPRO}/devkitPPC
- DEVKITPRO=/opt/devkitpro
- DEVKITPPC=/opt/devkitpro/devkitPPC
- PORTLIBREPOS=$HOME/portlibrepos
cache:
directories:
- ${DEVKITPRO}
- "$HOME/.local"
- "$PORTLIBREPOS"
- "$DEVKITPRO"
addons:
apt:
packages:
- p7zip-full
before_install:
before_install:
- mkdir -p "${PORTLIBREPOS}"
- mkdir -p "${DEVKITPRO}"
- wget https://downloads.devkitpro.org/devkitPPC_r29-1-x86_64-linux.tar.bz2 -O devkitPPC-linux.tar.bz2
- wget https://github.com/Maschell/dynamic_libs/archive/lib.tar.gz -O dynamic_libs.tar.gz
- wget https://github.com/Maschell/libutils/archive/master.tar.gz -O libutils.tar.gz
- 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 sudo dpkg -i /tmp/devkitpro-pacman.deb; fi
- yes | sudo dkp-pacman -Syu devkitPPC
install:
- tar -xjf devkitPPC-linux.tar.bz2 -C ${DEVKITPRO}/
- tar -xzvf dynamic_libs.tar.gz
- tar -xzvf libutils.tar.gz
- 7z x -y ./libs/portlibs.zip -o${DEVKITPRO}
- 7z x -y ./dynamic_libs-lib/libs/portlibs.zip -o${DEVKITPRO}
- (cd dynamic_libs-lib && make && make install)
- (cd libutils-master && make && make install)
- cd $PORTLIBREPOS
- ((git clone https://github.com/Maschell/dynamic_libs.git -b lib && (7z x -y ./dynamic_libs/libs/portlibs.zip -o${DEVKITPRO})) || (cd dynamic_libs && git pull))
- (git clone https://github.com/Maschell/libutils.git || (cd libutils && git pull))
- (cd dynamic_libs && ((make -j8 | grep -c "built ... ") && make install && echo "installed" ) || (echo "no need for make install" && make))
- (cd libutils && ((make -j8 | grep -c "built ... ") && make install && echo "installed" ) || (echo "no need for make install" && make))
before_script:
- cd $TRAVIS_BUILD_DIR/
script:
- make
- make && make install

View File

@ -7,7 +7,18 @@ ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC)
endif
include $(DEVKITPPC)/wii_rules
export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
export PORTLIBS := $(DEVKITPRO)/portlibs/ppc
PREFIX := powerpc-eabi-
export AS := $(PREFIX)as
export CC := $(PREFIX)gcc
export CXX := $(PREFIX)g++
export AR := $(PREFIX)ar
export OBJCOPY := $(PREFIX)objcopy
include $(DEVKITPPC)/base_rules
#---------------------------------------------------------------------------------
# BUILD is the directory where object files & intermediate files will be placed