[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:55:57 +02:00
parent 975af132dc
commit f3cbf9332e
2 changed files with 35 additions and 21 deletions

View File

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

View File

@ -10,10 +10,19 @@ ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO") $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO")
endif endif
include $(DEVKITPPC)/wii_rules export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
export PORTLIBS := $(DEVKITPRO)/portlibs/ppc 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 # BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code # SOURCES is a list of directories containing source code