Container-as-toolchain for UAVCAN C and C++ projects
10K+
The uavcan/c_cpp docker image provides a consistent build and test environment
for development, continuous-integration, and test automation of C and C++ based projects.
These instructions are for maintainers with permissions to push to the uavcan organization on Docker Hub.
docker build .
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 736647481ad3 About a minute ago 1GB
docker tag 736647481ad3 uavcan/c_cpp:ubuntu-20.04
docker login --username=yourhubusername
docker push uavcan/c_cpp:ubuntu-20.04
Use this pattern for tags:
uavcan/[toolchain]:[build environment]
To login to an interactive session do:
docker run --rm -it -v ${PWD}:/repo uavcan/c_cpp:ubuntu-20.04
Wrap yer build:
build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory cmake --build build/
Upload the results:
sonar-scanner \
-Dsonar.organization=uavcan \
-Dsonar.projectKey=UAVCAN_myproject \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.cfamily.build-wrapper-output=bw-output \
-Dsonar.login=TOKEN
You can use this in your .travis.yml like this:
services:
- docker
before_install:
- docker pull uavcan/c_cpp:ubuntu-20.04
script:
- docker run --rm -v $TRAVIS_BUILD_DIR:/repo uavcan/c_cpp:ubuntu-20.04 /bin/sh -c mybuild_command
Example pipeline.yml:
- label: ":github: my containerized build"
command: "my_build_command"
plugins:
- docker#v3.5.0:
workdir: /repo
image: "uavcan/c_cpp:ubuntu-20.04"
propagate-environment: true
mount-ssh-agent: true
Content type
Image
Digest
Size
914.9 MB
Last updated
over 5 years ago
docker pull uavcan/c_cpp:ubuntu-20.04