Skip to content

Commit e97b2b2

Browse files
committed
Merge branch 'devel'
2 parents 0a82818 + 4a6eb90 commit e97b2b2

File tree

4 files changed

+52
-28
lines changed

4 files changed

+52
-28
lines changed

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ env:
1616
- BUILD_DIR=build
1717
- RELEASE_DIR=release
1818
jobs:
19-
- BUILD_TYPE='Release' BOARD='afc-bpm' -VERSION='3.0' -RTM=''
20-
- BUILD_TYPE='Release' BOARD='afc-bpm' -VERSION='3.1' -RTM=''
21-
- BUILD_TYPE='Release' BOARD='afc-timing' -VERSION='' -RTM='rtm-8sfp'
19+
- BUILD_ARTIFACT='binary' BUILD_TYPE='Release' BOARD='afc-bpm' VERSION='3.0' RTM=''
20+
- BUILD_ARTIFACT='binary' BUILD_TYPE='Release' BOARD='afc-bpm' VERSION='3.1' RTM=''
21+
- BUILD_ARTIFACT='binary' BUILD_TYPE='Release' BOARD='afc-timing' VERSION='' RTM='rtm-8sfp'
2222

2323
jobs:
2424
include:
25-
- env: DEPLOY='all'
25+
- env: BUILD_ARTIFACT='all_binaries' DEPLOY='all_binaries'
26+
- env: BUILD_ARTIFACT='docs' DEPLOY='docs'
2627

2728
# Install dependencies
2829
addons:
@@ -37,14 +38,15 @@ addons:
3738
- doxygen-gui
3839
- graphviz
3940

40-
# Build and check this project
41+
# Build and check this project
4142
script:
4243
- ./ci_build.sh
4344

44-
# Generate and deploy documentation
45+
# Generate documentation
4546
after_success:
4647
- ./ci_gen_doxy.sh
4748

49+
# Prepare for deploy
4850
before_deploy:
4951
- . ./ci_deploy.sh
5052

@@ -57,7 +59,7 @@ deploy:
5759
on:
5860
all_branches: true
5961
tags: true
60-
condition: $DEPLOY = "all"
62+
condition: $DEPLOY = "all_binaries"
6163

6264
- provider: pages
6365
skip_cleanup: true
@@ -66,3 +68,4 @@ deploy:
6668
keep_history: false
6769
on:
6870
all_branches: true
71+
condition: $DEPLOY = "docs"

ci_build.sh

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ BUILDS[debug-afc-timing-${GIT_DESCRIBE}]="\
4848

4949
TOP=$(pwd)
5050

51-
case "${DEPLOY}" in
52-
all)
53-
# Generate builds for all list items
51+
case "${BUILD_ARTIFACT}" in
52+
# Generate builds for all list items. Both "all_binaries"
53+
# and "docs" needs to build everyting and pass all tests.
54+
all_binaries|docs)
5455
for build in "${!BUILDS[@]}"; do
5556
echo "Generating build for:" ${build} && \
5657
mkdir -p ${BUILD_DIR}-${build} && \
@@ -66,25 +67,28 @@ case "${DEPLOY}" in
6667
cd ${TOP}
6768
done
6869

69-
# Copy the generated files to the release folder
70-
mkdir -p ${RELEASE_DIR}
71-
for build in "${!BUILDS[@]}"; do
72-
case "${build}" in
73-
debug*)
74-
cp ${BUILD_DIR}-${build}/out/openMMC.axf ${RELEASE_DIR}/openMMC-${build}.axf
75-
;;
76-
77-
*)
78-
cp ${BUILD_DIR}-${build}/out/openMMC.bin ${RELEASE_DIR}/openMMC-${build}.bin
79-
cp ${BUILD_DIR}-${build}/out/openMMC_full.bin ${RELEASE_DIR}/openMMC-full-${build}.bin
80-
;;
81-
esac
82-
done
70+
# Extra step for "all_binaries" is to copy
71+
# the artifacts to a release folder
72+
if [ "${BUILD_ARTIFACT}" = "all_binaries" ]; then
73+
# Copy the generated files to the release folder
74+
mkdir -p ${RELEASE_DIR}
75+
for build in "${!BUILDS[@]}"; do
76+
case "${build}" in
77+
debug*)
78+
cp ${BUILD_DIR}-${build}/out/openMMC.axf ${RELEASE_DIR}/openMMC-${build}.axf
79+
;;
8380

81+
*)
82+
cp ${BUILD_DIR}-${build}/out/openMMC.bin ${RELEASE_DIR}/openMMC-${build}.bin
83+
cp ${BUILD_DIR}-${build}/out/openMMC_full.bin ${RELEASE_DIR}/openMMC-full-${build}.bin
84+
;;
85+
esac
86+
done
87+
fi
8488
;;
8589

8690
# Regular build
87-
*)
91+
binary)
8892
mkdir -p ${BUILD_DIR} && \
8993
cd ${BUILD_DIR} && \
9094
cmake ../ \
@@ -95,4 +99,9 @@ case "${DEPLOY}" in
9599
make
96100
;;
97101

102+
*)
103+
echo "BUILD_ARTIFACT invalid: "${BUILD_ARTIFACT}
104+
exit 0
105+
;;
106+
98107
esac

ci_deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -x
55

66
TOP=$(pwd)
77

8-
if [ "${DEPLOY}" = "all" ]; then
8+
if [ "${DEPLOY}" = "all_binaries" ]; then
99
mkdir dist
1010
export OPENMMC_DEPLOYMENT=dist/*
1111

ci_gen_doxy.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ set -x
55
set -e
66
set -o
77

8-
cd $TRAVIS_BUILD_DIR/docs && \
9-
doxygen Doxyfile.dox && \
8+
if [ "${BUILD_ARTIFACT}" = "docs" ]; then
9+
# remove build directories, as we can't
10+
# use a file pattern in Doxyfile.dox file
11+
# like */build*/* as travis seems to be
12+
# expanding "*". This should be safe, as
13+
# we only run this when BUILD_ARTIFACT is set
14+
# to "docs" and not with "all_binaries", which
15+
# is the release BUILD_ARTIFACT
16+
rm -r $TRAVIS_BUILD_DIR/${BUILD_DIR}*
17+
18+
# Now generate the documentation
19+
cd $TRAVIS_BUILD_DIR/docs
20+
doxygen Doxyfile.dox
1021
echo "" > html/.nojekyll
22+
fi

0 commit comments

Comments
 (0)