first steps in CI integration #66
18
automation/Dockerfile-q7s
Normal file
18
automation/Dockerfile-q7s
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM ubuntu:focal
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get --yes upgrade
|
||||||
|
RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl
|
||||||
|
|
||||||
|
# Q7S root filesystem, required for cross-compilation.
|
||||||
|
RUN mkdir -p /usr/rootfs; \
|
||||||
|
curl https://buggy.irs.uni-stuttgart.de/eive/tools/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
|
||||||
|
| tar -xz -C /usr/rootfs
|
||||||
|
|
||||||
|
# Cross compiler
|
||||||
|
RUN mkdir -p /usr/tools; \
|
||||||
|
curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.gz \
|
||||||
|
| tar -xz -C /usr/tools
|
||||||
|
|
||||||
|
ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
|
||||||
|
ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
|
49
automation/Jenkinsfile
vendored
Normal file
49
automation/Jenkinsfile
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Build Container') {
|
||||||
|
when {
|
||||||
|
changeset "automation/Dockerfile-q7s"
|
||||||
|
branch 'develop'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'docker build -t eive-fsw-build-q7s:gcc8 - < automation/Dockerfile-q7s'
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Clean') {
|
||||||
|
when {
|
||||||
|
anyof {
|
||||||
|
changelog 'cleanCI'
|
||||||
|
changeset '*.cmake'
|
||||||
|
changeset 'CMakeLists.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'rm -rf build-q7s-debug'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build Q7S') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'eive-fsw-build-q7s:gcc8'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir('build-q7s-debug') {
|
||||||
|
sh 'cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DFSFW_OSAL=linux ..'
|
||||||
|
sh 'cmake --build . -j'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy') {
|
||||||
|
when {
|
||||||
|
tag 'v*.*.*'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'echo Deploying'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,35 +0,0 @@
|
|||||||
FROM ubuntu:latest
|
|
||||||
# FROM alpine:latest
|
|
||||||
|
|
||||||
ENV TZ=Europe/Berlin
|
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y curl cmake g++
|
|
||||||
|
|
||||||
# Q7S root filesystem, required for cross-compilation. Use IPv6 for curl
|
|
||||||
RUN mkdir -p /usr/rootfs; \
|
|
||||||
curl -6 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/dnfMy9kGpgynN6J/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
|
|
||||||
| tar xvz -C /usr/rootfs
|
|
||||||
# Q7S C++ cross-compiler. Use IPv6 for curl
|
|
||||||
RUN mkdir -p /usr/tools; \
|
|
||||||
curl -6 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/RMsbHydJc6PSqcz/download/gcc-arm-linux-gnueabi.tar.gz \
|
|
||||||
| tar xvz -C /usr/tools
|
|
||||||
|
|
||||||
# RUN apk add cmake make g++
|
|
||||||
|
|
||||||
# Required for cmake build
|
|
||||||
ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
|
|
||||||
ENV PATH=$PATH:"/usr/tools/gcc-arm-linux-gnueabi/bin"
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN set -ex; \
|
|
||||||
rm -rf build-q7s; \
|
|
||||||
mkdir build-q7s; \
|
|
||||||
cd build-q7s; \
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux -DTGT_BSP="arm/q7s" ..;
|
|
||||||
|
|
||||||
ENTRYPOINT ["cmake", "--build", "build-q7s"]
|
|
||||||
CMD ["-j"]
|
|
||||||
# CMD ["bash"]
|
|
Loading…
Reference in New Issue
Block a user