Split GCC compilation and checkout into two travis targets.

This commit is contained in:
Michael Schaffner 2019-01-08 13:09:44 +01:00
parent be3c614f71
commit 6286c867e8
No known key found for this signature in database
GPG key ID: 7AA09AE049819C2C
2 changed files with 16 additions and 5 deletions

View file

@ -4,6 +4,7 @@ sudo: false
cache:
apt: true
directories:
/home/travis/tmp/riscv-gnu-toolchain
$RISCV
$VERILATOR_ROOT
@ -56,16 +57,21 @@ before_install:
- git submodule update --init --recursive
stages:
- checkout
- compile1
- compile2
- test
jobs:
include:
- stage: checkout
name: checkout gcc
script:
- ci/build-riscv-gcc.sh 0
- stage: compile1
name: build gcc
script:
- ci/build-riscv-gcc.sh
- ci/build-riscv-gcc.sh 1
- stage: compile2
name: build tools
script:

View file

@ -1,4 +1,6 @@
#!/bin/bash
# call with first argument = 0 to checkout only
set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
VERSION="691e4e826251c7ec59f883cab18440c87baf45e7"
@ -8,6 +10,7 @@ if [ -z ${NUM_JOBS} ]; then
NUM_JOBS=1
fi
if ! [ -e $RISCV/bin ]; then
[ -d $ROOT/tmp/riscv-gnu-toolchain ] || git clone https://github.com/riscv/riscv-gnu-toolchain.git
cd riscv-gnu-toolchain
@ -16,8 +19,10 @@ if ! [ -e $RISCV/bin ]; then
mkdir -p $RISCV
echo "Compiling RISC-V Toolchain"
./configure --prefix=$RISCV > /dev/null
make -j${NUM_JOBS} > /dev/null
echo "Compilation Finished"
if [[ $1 -ne "0" || -z ${1} ]]; then
echo "Compiling RISC-V Toolchain"
./configure --prefix=$RISCV > /dev/null
make -j${NUM_JOBS} > /dev/null
echo "Compilation Finished"
fi
fi