Merge pull request 'add jenkins CI files' (#55) from add-jenkins-ci into main
Some checks failed
Rust/sat-rs/pipeline/head There was a failure building this commit
Some checks failed
Rust/sat-rs/pipeline/head There was a failure building this commit
Reviewed-on: #55
This commit is contained in:
commit
8d5d67eed8
15
automation/Dockerfile
Normal file
15
automation/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
# set CROSS_CONTAINER_IN_CONTAINER to inform `cross` that it is executed from within a container
|
||||||
|
ENV CROSS_CONTAINER_IN_CONTAINER=true
|
||||||
|
|
||||||
|
RUN rustup install nightly && \
|
||||||
|
rustup target add thumbv7em-none-eabihf armv7-unknown-linux-gnueabihf && \
|
||||||
|
rustup component add rustfmt clippy
|
52
automation/Jenkinsfile
vendored
Normal file
52
automation/Jenkinsfile
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
pipeline {
|
||||||
|
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'automation'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Clippy') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo clippy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Docs') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo +nightly doc --all-features'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Rustfmt') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo fmt --all --check'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo test --all-features'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Check with all features') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo check --all-features'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Check with no features') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo check --no-default-features'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Check Cross Embedded Bare Metal') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo check --target thumbv7em-none-eabihf --no-default-features'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Check Cross Embedded Linux') {
|
||||||
|
steps {
|
||||||
|
sh 'cargo check --target armv7-unknown-linux-gnueabihf'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user