Merge pull request #912 from keyboardio/f/travis-reporting-cleanup

Rework our travis config.
pull/915/head
Gergely Nagy 4 years ago committed by GitHub
commit 25f0d2fc66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,4 @@
dist: bionic dist: focal
sudo: false
language: c language: c
os: os:
- linux - linux
@ -11,26 +10,35 @@ addons:
env: env:
global: global:
- LC_ALL: C - LC_ALL: C
git:
quiet: true
before_install:
- ccache --set-config=compiler_check=content -M 5G -F 0
install: install:
- git clone --depth 1 --recurse-submodules https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio - git clone --depth 1 --recurse-submodules https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
## We delete the Bundle's version of Kaleidoscope, and symlink ourselves in. ## We delete the Bundle's version of Kaleidoscope, and symlink ourselves in.
## This makes sure we're using the current version of the library. ## This makes sure we're using the current version of the library.
- rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope - rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope - ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
jobs:
include:
- env: TEST_TARGET=travis-smoke-examples
- env: TEST_TARGET=travis-simulator-tests
- env: TEST_TARGET=cpplint
- env: TEST_TARGET=find-filename-conflicts
- env: TEST_TARGET=shellcheck
- env: TEST_TARGET=travis-check-astyle
script: script:
- unset CC - unset CC
- make cpplint BOARD_HARDWARE_PATH=$(pwd)/../hardware - make $TEST_TARGET KALEIDOSCOPE_TEMP_PATH=$(pwd)/.kaleidoscope-build-cache BOARD_HARDWARE_PATH=$(pwd)/../hardware ARDUINO_PATH="$(pwd)/arduino-1.8.13"
- make travis-install-arduino BOARD_HARDWARE_PATH=$(pwd)/../hardware
- (cd ../hardware/keyboardio && make prepare-virtual)
- make -C tests all BOARD_HARDWARE_PATH=$(pwd)/../hardware ARDUINO_PATH="$(pwd)/arduino-1.8.13"
- rm -rf .kaleidoscope-build-cache
- make travis-test KALEIDOSCOPE_TEMP_PATH=$(pwd)/.kaleidoscope-build-cache BOARD_HARDWARE_PATH=$(pwd)/../hardware
notifications: notifications:
email: email:
on_success: change on_success: change
on_failure: change on_failure: change
cache: cache:
apt: true
ccache: true ccache: true
directories: directories:
- .download-cache
- .kaleidoscope-build-cache - .kaleidoscope-build-cache
- .ccache

@ -19,6 +19,12 @@ set -e
###### Build and output configuration ###### Build and output configuration
###### ######
absolute_filename() {
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
build_version () { build_version () {
GIT_VERSION="$(cd "$(find_sketch)"; if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi)" GIT_VERSION="$(cd "$(find_sketch)"; if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi)"
LIB_PROPERTIES_PATH="${LIB_PROPERTIES_PATH:-"../.."}" LIB_PROPERTIES_PATH="${LIB_PROPERTIES_PATH:-"../.."}"
@ -26,9 +32,9 @@ build_version () {
} }
build_paths() { build_paths() {
# We don't really want to use find # We need that echo because we\re piping to cksum
# shellcheck disable=SC2012 # shellcheck disable=SC2005
SKETCH_IDENTIFIER="$(ls -id "$(find_sketch)/${SKETCH}.ino" | cut -d ' ' -f 1)-${SKETCH}.ino" SKETCH_IDENTIFIER="$(echo "$(absolute_filename "$(find_sketch)/${SKETCH}.ino")" | cksum | cut -d ' ' -f 1)-${SKETCH}.ino"
KALEIDOSCOPE_TEMP_PATH="${KALEIDOSCOPE_TEMP_PATH:-${TMPDIR:-/tmp}/kaleidoscope-${USER}}" KALEIDOSCOPE_TEMP_PATH="${KALEIDOSCOPE_TEMP_PATH:-${TMPDIR:-/tmp}/kaleidoscope-${USER}}"
@ -345,7 +351,7 @@ compile () {
SKETCH_DIR="$(find_sketch)" SKETCH_DIR="$(find_sketch)"
echo "Building ${SKETCH_DIR}/${SKETCH} ${LIB_VERSION} into ${OUTPUT_PATH}" echo "Building ${SKETCH_DIR}/${SKETCH}"
# This is defined in the (optional) user config. # This is defined in the (optional) user config.
# shellcheck disable=SC2154 # shellcheck disable=SC2154

Loading…
Cancel
Save