aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-07-09 22:56:31 +0200
committercbdev <cb@cbcdn.com>2020-07-09 22:56:31 +0200
commit1fd6f2bf7cd243ad3e2c126ebce723d57000c7b4 (patch)
treedb7517ecdcb32c7808340df0012d2610c0008d17
parent4e5cc42d2eb245bfd2ac616ca6898e4855ec5363 (diff)
downloadmidimonster-1fd6f2bf7cd243ad3e2c126ebce723d57000c7b4.tar.gz
midimonster-1fd6f2bf7cd243ad3e2c126ebce723d57000c7b4.tar.bz2
midimonster-1fd6f2bf7cd243ad3e2c126ebce723d57000c7b4.zip
Restructure CI
-rwxr-xr-x[-rw-r--r--].ci.sh (renamed from .travis-ci.sh)37
-rw-r--r--.travis.yml17
-rw-r--r--backends/openpixelcontrol.md4
3 files changed, 32 insertions, 26 deletions
diff --git a/.travis-ci.sh b/.ci.sh
index c72070e..087bf11 100644..100755
--- a/.travis-ci.sh
+++ b/.ci.sh
@@ -1,5 +1,20 @@
#!/bin/bash
+# Check for Travis and use the provided fold method if detected
+if declare -f travis_fold > /dev/null; then
+ ci_fold(){
+ travis_fold "$1" "$2"
+ }
+else
+ ci_fold(){
+ printf -- "-- %s stage %s --\n" "$1" "$2"
+ }
+fi
+
+if [ -z "$OS" ]; then
+ OS="linux"
+fi
+
if [ "$TASK" = "spellcheck" ]; then
result=0
# Create list of files to be spellchecked
@@ -61,20 +76,20 @@ elif [ "$TASK" = "codesmell" ]; then
exit "$result"
elif [ "$TASK" = "sanitize" ]; then
# Run sanitized compile
- travis_fold start "make_sanitize"
+ ci_fold start "make_sanitize"
if ! make sanitize; then
exit "$?"
fi
- travis_fold end "make_sanitize"
+ ci_fold end "make_sanitize"
elif [ "$TASK" = "windows" ]; then
- travis_fold start "make_windows"
+ ci_fold start "make_windows"
if ! make windows; then
exit "$?"
fi
make -C backends lua.dll
- travis_fold end "make_windows"
+ ci_fold end "make_windows"
if [ "$(git describe)" == "$(git describe --abbrev=0)" ] || [ -n "$DEPLOY" ]; then
- travis_fold start "deploy_windows"
+ ci_fold start "deploy_windows"
mkdir ./deployment
mkdir ./deployment/backends
mkdir ./deployment/docs
@@ -89,17 +104,17 @@ elif [ "$TASK" = "windows" ]; then
cd ./deployment
zip -r "./midimonster-$(git describe)-windows.zip" "./"
find . ! -iname '*.zip' -delete
- travis_fold end "deploy_windows"
+ ci_fold end "deploy_windows"
fi
else
# Otherwise compile as normal
- travis_fold start "make"
+ ci_fold start "make"
if ! make full; then
exit "$?"
fi
- travis_fold end "make"
+ ci_fold end "make"
if [ "$(git describe)" == "$(git describe --abbrev=0)" ] || [ -n "$DEPLOY" ]; then
- travis_fold start "deploy_unix"
+ ci_fold start "deploy_unix"
mkdir ./deployment
mkdir ./deployment/backends
mkdir ./deployment/docs
@@ -109,8 +124,8 @@ else
cp ./backends/*.md ./deployment/docs/
cp -r ./configs ./deployment/
cd ./deployment
- tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" ./
+ tar czf "midimonster-$(git describe)-$OS.tgz" "./"
find . ! -iname '*.tgz' -delete
- travis_fold end "deploy_unix"
+ ci_fold end "deploy_unix"
fi
fi
diff --git a/.travis.yml b/.travis.yml
index 4e14339..5f60e59 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,17 +5,15 @@ dist: bionic
before_script:
- export -f travis_fold
+ - export OS="$TRAVIS_OS_NAME"
script:
- - "bash .travis-ci.sh"
+ - "bash .ci.sh"
addons:
apt:
- packages: &base_build
- - ccache
packages: &core_build
# This is all the bits we need to enable all options
- - *base_build
- libasound2-dev
- libevdev-dev
- libola-dev
@@ -125,11 +123,6 @@ env:
cache:
apt: true
- directories:
- - $HOME/.ccache # ccache cache
-
-before_cache:
- - ccache -s # see how many hits ccache got
before_install:
# Travis clones with --branch, which omits tags. Since we use them for the version string at build time, fetch them
@@ -138,21 +131,19 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# 'brew install' sometimes returns non-zero for some arcane reason. Executing 'true' resets the exit code and allows Travis to continue building...
# Travis seems to have Python 2.7 installed by default, which for some reason prevents pkg-config from reading python3.pc
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache ola lua openssl jack python3; brew link --overwrite python; true; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ola lua openssl jack python3; brew link --overwrite python; true; fi
# OpenSSL is not a proper install due to some Apple bull, so provide additional locations via the environment...
# Additionally, newer versions of this "recipe" seem to use the name 'openssl@1.1' instead of plain 'openssl' and there seems to be
# no way to programmatically get the link and include paths. Genius! Hardcoding the new version for the time being...
- export CFLAGS="$CFLAGS -I/usr/local/opt/openssl@1.1/include"
- export LDFLAGS="$LDFLAGS -L/usr/local/opt/openssl@1.1/lib"
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/ccache/libexec:$PATH; fi # Use ccache on Mac too
- - if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "sanitize" \) -a "$CC" = "gcc" ]; then export CC="ccache gcc-8"; export CXX="ccache g++-8"; fi
#Use the latest clang if we're compiling with clang
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" = "clang" ]; then export CC="clang-6.0"; export CXX="clang-6.0"; fi
#Report the compiler versions
- $CC --version
#OS X uses something other than $CXX variable
- if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "sanitize" \) ]; then $CXX --version; fi
-# Download libraries to link with on Windows
+# Download libraries to link with for Windows
- if [ "$TASK" == "windows" ]; then wget "https://downloads.sourceforge.net/project/luabinaries/5.3.5/Windows%20Libraries/Dynamic/lua-5.3.5_Win64_dllw6_lib.zip" -O lua53.zip; unzip lua53.zip lua53.dll; fi
notifications:
diff --git a/backends/openpixelcontrol.md b/backends/openpixelcontrol.md
index d09d412..af5e811 100644
--- a/backends/openpixelcontrol.md
+++ b/backends/openpixelcontrol.md
@@ -35,12 +35,12 @@ Channels can be specified by their sequential index (one-based).
Example mapping (data from Strip 2 LED 66's green component is mapped to the blue component of LED 2 on strip 1):
```
-strip1.channel6 < strip2.channel200
+op1.strip1.channel6 < op1.strip2.channel200
```
Additionally, channels may be referred to by their color component and LED index:
```
-strip1.blue2 < strip2.green66
+op1.strip1.blue2 < op2.strip2.green66
```
#### Known bugs / problems