Skip to content

Commit

Permalink
Support compiling dependencies from source (#7)
Browse files Browse the repository at this point in the history
* Add script hooks

Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored May 13, 2020
1 parent 6d5561d commit 0bbce7f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@ jobs:
script-after-make-test: after_make_test.sh
```

### Dependencies

Be sure to put all apt-installable dependencies into `apt-dependencies`.

If you need to install dependencies from source, add a Vcstool yaml file to
`.github/ci-bionic/dependencies.yaml`. Dependencies will be built using
`colcon`. Be sure to add the apt dependencies of dependencies build from source
to `apt-dependencies`.

### Codecov

Create a secret on the repository with Codecov's token, called `CODECOV_TOKEN`.

### Custom scripts

The `script-`s are optional hooks that you can run at specific times of the build.
15 changes: 13 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ apt -y install \
curl \
g++-8 \
git \
cppcheck
cppcheck \
python3-pip \
$APT_DEPENDENCIES

pip3 install -U pip vcstool colcon-common-extensions

update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-8 800 \
Expand All @@ -36,7 +40,14 @@ cd ..

sh tools/code_check.sh

apt -y install $APT_DEPENDENCIES
if [ -f ".github/ci-bionic/dependencies.yaml" ] ; then
mkdir -p deps/src
cd deps
vcs import src < ../.github/ci-bionic/dependencies.yaml
colcon build --symlink-install --merge-install --cmake-args -DBUILD_TESTING=false
. install/setup.sh
cd ..
fi

mkdir build
cd build
Expand Down

0 comments on commit 0bbce7f

Please sign in to comment.