added CI/CD files
Some checks failed
Rust/max116xx-10bit/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2021-12-12 23:17:30 +01:00
parent f396c793ea
commit 14835c38d9
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 63 additions and 0 deletions

11
automation/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
# Run the following commands from root directory to build and run locally
# docker build -f automation/Dockerfile -t <NAME> .
# docker run -it <NAME>
FROM rust:latest
RUN apt-get update
RUN apt-get --yes upgrade
# tzdata is a dependency, won't install otherwise
ARG DEBIAN_FRONTEND=noninteractive
RUN rustup target add thumbv6m-none-eabi armv7-unknown-linux-gnueabihf && \
rustup component add rustfmt clippy

52
automation/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,52 @@
pipeline {
agent any
stages {
stage('Clippy') {
agent {
dockerfile {
dir 'automation'
reuseNode true
}
}
steps {
sh 'cargo clippy'
}
}
stage('Rustfmt') {
agent {
dockerfile {
dir 'automation'
reuseNode true
}
}
steps {
sh 'cargo fmt'
}
}
stage('Check') {
agent {
dockerfile {
dir 'automation'
reuseNode true
}
}
steps {
sh 'cargo check --target thumbv6m-none-eabi'
sh 'cargo check --target armv7-unknown-linux-gnueabihf'
}
}
stage('Check Examples') {
agent {
dockerfile {
dir 'automation'
reuseNode true
}
}
steps {
sh 'cargo check --target thumbv6m-none-eabi --examples'
sh 'cargo check --target armv7-unknown-linux-gnueabihf'
}
}
}
}