-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
508 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,69 @@ | ||
sudo: required | ||
dist: bionic | ||
os: linux | ||
|
||
notifications: | ||
email: false | ||
|
||
#Test only in travis branch for now | ||
branches: | ||
only: | ||
- master | ||
|
||
language: c | ||
|
||
before_script: | ||
- sudo apt-add-repository -y 'deb http://archive.ubuntu.com/ubuntu trusty main universe multiverse restricted' | ||
- sudo add-apt-repository -y ppa:george-edison55/cmake-3.x | ||
- sudo apt-get update -y -qq | ||
- sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi | ||
- sudo apt-get install -y cmake -qq | ||
# blocklist | ||
branches: | ||
except: | ||
- gh-pages | ||
|
||
env: | ||
matrix: | ||
- BOARD='afc-bpm' -VERSION='3.0' -RTM='' | ||
- BOARD='afc-bpm' -VERSION='3.1' -RTM='' | ||
- BOARD='afc-timing' -VERSION='' -RTM='rtm-8sfp' | ||
global: | ||
- BUILD_DIR=build | ||
- RELEASE_DIR=release | ||
jobs: | ||
- BUILD_TYPE='Release' BOARD='afc-bpm' -VERSION='3.0' -RTM='' | ||
- BUILD_TYPE='Release' BOARD='afc-bpm' -VERSION='3.1' -RTM='' | ||
- BUILD_TYPE='Release' BOARD='afc-timing' -VERSION='' -RTM='rtm-8sfp' | ||
|
||
jobs: | ||
include: | ||
- env: DEPLOY='all' | ||
|
||
# Install dependencies | ||
addons: | ||
apt: | ||
packages: | ||
- gcc-arm-none-eabi | ||
- libnewlib-arm-none-eabi | ||
- cmake | ||
- doxygen | ||
- doxygen-doc | ||
- doxygen-latex | ||
- doxygen-gui | ||
- graphviz | ||
|
||
# Build and check this project | ||
script: | ||
- mkdir build_$BOARD_$VERSION && cd build_$BOARD_$VERSION && cmake ../ -DBOARD=$BOARD -DVERSION=$VERSION -DBOARD_RTM=$RTM -DCMAKE_BUILD_TYPE=Release && make | ||
- ./ci_build.sh | ||
|
||
# Generate and deploy documentation | ||
after_success: | ||
- ./ci_gen_doxy.sh | ||
|
||
# Generate and deploy documentation | ||
after_success: "cd $TRAVIS_BUILD_DIR/docs && doxygen Doxyfile.dox" | ||
before_deploy: | ||
- . ./ci_deploy.sh | ||
|
||
deploy: | ||
provider: pages | ||
skip-cleanup: true | ||
local-dir: docs/html | ||
github-token: $GH_TOKEN # Set in the settings page of your repository, as a secure variable | ||
keep-history: false | ||
on: | ||
branch: master | ||
- provider: releases | ||
token: | ||
secure: "ammPjSoAPm1RFwXJq2O4JSBHrtOlf/2LNtdB462IpCRek4p9EY/jFEoMhRnYlXWrRdYC0EAk/GSAtCLC7u22G66pACezg1Q0xJdfFSMwo7MWcU2ukSeRoFugw09OuB6E/LZ6NcDVYxXVhht/qqV4Em1N3H/rc+0qkEHUPg1YxjB/YIayuY+LsBQsXXiBBc0NVhNv3L1Lx7uKzvwPnsDtIDSbd8cLmWs3XiHnjbcshhZynHiV3I3eQD0hvCKQ3pK2TItcY7BPPGZbQI6UhVEsjcqDQov2sdw1VhVFSwqlPnpGvLJgvvMBDbdfQfMVdYui0eaSLB52+ZC3HyrQxAJotz43OAZEWzrShts548M2xZDklUhFRu9KovDC8pYNJU+pwumpela9pW3YSBroRwxtfEyeplCaaR0iT0rL9CdQBVRKhmwbVwPsUCKQ1/fngbFRJbSksFf6GXCiykbjkwkPXRdrwdZpff0sUjKmapH1iFBQIQ5k92k7qfd+MFoTgCKovpMWVMpYcBLGK0rxJIZy5gjvuJLX5NwGs+rdDO/oFVVDxXWldcaqDetFYhVZVVKkewdaTDDQb1Pr7FeP8iI6t+JwtsmVjFbrjBs5siN/YhHRzu6Jm0taL7NnktYEXKumlLS0Nn9sQWhKlC86R2pJGKF9+iuweIN1JBaw0y4ScHM=" | ||
file_glob: true | ||
file: ${OPENMMC_DEPLOYMENT} | ||
skip_cleanup: true | ||
on: | ||
all_branches: true | ||
tags: true | ||
condition: $DEPLOY = "all" | ||
|
||
- provider: pages | ||
skip_cleanup: true | ||
local_dir: docs/html | ||
token: $GH_TOKEN # Set in the settings page of your repository, as a secure variable | ||
keep_history: false | ||
on: | ||
all_branches: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#!/usr/bin/env bash | ||
|
||
# help debug | ||
set -x | ||
set -e | ||
set -o | ||
|
||
LANG=C | ||
LC_ALL=C | ||
export LANG LC_ALL | ||
|
||
# Location of releases | ||
GIT_DESCRIBE=$(git describe --tags --abbrev=10) | ||
|
||
# Declare all combinations for deploy all | ||
# Note that the key is the name of the release object | ||
declare -A BUILDS | ||
BUILDS[openMMC-afc-bpm-3.0-${GIT_DESCRIBE}]="\ | ||
-DBOARD=afc-bpm \ | ||
-DVERSION=3.0 \ | ||
-DBOARD_RTM= \ | ||
-DCMAKE_BUILD_TYPE=Release" | ||
BUILDS[openMMC-afc-bpm-3.1-${GIT_DESCRIBE}]="\ | ||
-DBOARD=afc-bpm \ | ||
-DVERSION=3.1 \ | ||
-DBOARD_RTM= \ | ||
-DCMAKE_BUILD_TYPE=Release" | ||
BUILDS[openMMC-afc-timing-${GIT_DESCRIBE}]="\ | ||
-DBOARD=afc-timing \ | ||
-DVERSION= \ | ||
-DBOARD_RTM=rtm-8sfp \ | ||
-DCMAKE_BUILD_TYPE=Release" | ||
BUILDS[openMMC-debug-afc-bpm-3.0-${GIT_DESCRIBE}]="\ | ||
-DBOARD=afc-bpm \ | ||
-DVERSION=3.0 \ | ||
-DBOARD_RTM= \ | ||
-DCMAKE_BUILD_TYPE=RelWithDebInfo" | ||
BUILDS[openMMC-debug-afc-bpm-3.1-${GIT_DESCRIBE}]="\ | ||
-DBOARD=afc-bpm \ | ||
-DVERSION=3.1 \ | ||
-DBOARD_RTM= \ | ||
-DCMAKE_BUILD_TYPE=RelWithDebInfo" | ||
BUILDS[openMMC-debug-afc-timing-${GIT_DESCRIBE}]="\ | ||
-DBOARD=afc-timing \ | ||
-DVERSION= \ | ||
-DBOARD_RTM=rtm-8sfp \ | ||
-DCMAKE_BUILD_TYPE=RelWithDebInfo" | ||
|
||
TOP=$(pwd) | ||
|
||
case "${DEPLOY}" in | ||
all) | ||
# Generate builds for all list items | ||
for build in "${!BUILDS[@]}"; do | ||
echo "Generating build for " ${build} && \ | ||
mkdir -p ${BUILD_DIR}-${build} && \ | ||
cd ${BUILD_DIR}-${build} && \ | ||
cmake ../ ${BUILDS[${build}]} | ||
|
||
# For each build, generate the "full" | ||
# binary as well | ||
for target in all full_binary; do | ||
make ${target} | ||
done | ||
|
||
cd ${TOP} | ||
done | ||
|
||
# Copy the generated files to the release folder | ||
mkdir -p ${RELEASE_DIR} | ||
for build in "${!BUILDS[@]}"; do | ||
case "${build}" in | ||
openMMC-debug*) | ||
cp build-${build}/out/openMMC.axf ${RELEASE_DIR}/openMMC-${build}.axf | ||
;; | ||
|
||
*) | ||
cp build-${build}/out/openMMC.bin ${RELEASE_DIR}/openMMC-${build}.bin | ||
cp build-${build}/out/openMMC_full.bin ${RELEASE_DIR}/openMMC-full-${build}.bin | ||
;; | ||
esac | ||
done | ||
|
||
;; | ||
|
||
# Regular build | ||
*) | ||
mkdir -p ${BUILD_DIR} && \ | ||
cd ${BUILD_DIR} && \ | ||
cmake ../ \ | ||
-DBOARD=${BOARD} \ | ||
-DVERSION=${VERSION} \ | ||
-DBOARD_RTM=${RTM} \ | ||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} && \ | ||
make | ||
;; | ||
|
||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# help debug | ||
set -x | ||
|
||
TOP=$(pwd) | ||
|
||
if [ "${DEPLOY}" = "all" ]; then | ||
mkdir dist | ||
export OPENMMC_DEPLOYMENT=dist/* | ||
|
||
# Build put our deploy targets into the release | ||
# directory. | ||
cd ${RELEASE_DIR} | ||
cp * ${TOP}/dist | ||
cd - | ||
|
||
# Generate hash sums | ||
cd dist | ||
md5sum ${TOP}/${RELEASE_DIR}/{*.bin,*.axf} > MD5SUMS | ||
sha1sum ${TOP}/${RELEASE_DIR}/{*.bin,*.axf} > SHA1SUMS | ||
cd - | ||
fi | ||
|
||
set +x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# help debug | ||
set -x | ||
set -e | ||
set -o | ||
|
||
cd $TRAVIS_BUILD_DIR/docs && \ | ||
doxygen Doxyfile.dox && \ | ||
echo "" > html/.nojekyll |
Oops, something went wrong.