From 952ec3738b42172daac75518b1baf53d3fca6c15 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Nov 2021 10:31:01 +0100 Subject: [PATCH] EGit integration - Added automation files for CI/CD - Relicense as Apache 2.0 --- Cargo.toml | 4 ++-- LICENSE-MIT | 25 ------------------------- automation/Dockerfile | 11 +++++++++++ automation/Jenkinsfile | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 27 deletions(-) delete mode 100644 LICENSE-MIT create mode 100644 automation/Dockerfile create mode 100644 automation/Jenkinsfile diff --git a/Cargo.toml b/Cargo.toml index 70adaa5..ac146bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "va108xx" version = "0.1.3" -authors = ["Robin Mueller "] +authors = ["Robin Mueller "] edition = "2021" description = "PAC for the Vorago VA108xx family of microcontrollers" homepage = "https://github.com/robamu-org/va108xx-rs" repository = "https://github.com/robamu-org/va108xx-rs" -license = "MIT OR Apache-2.0" +license = "Apache-2.0" keywords = ["no-std", "arm", "cortex-m", "vorago", "va108xx"] categories = ["embedded", "no-std", "hardware-support"] diff --git a/LICENSE-MIT b/LICENSE-MIT deleted file mode 100644 index 47b2d5e..0000000 --- a/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2021 Robin Mueller - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/automation/Dockerfile b/automation/Dockerfile new file mode 100644 index 0000000..5fb8a3d --- /dev/null +++ b/automation/Dockerfile @@ -0,0 +1,11 @@ +# Run the following commands from root directory to build and run locally +# docker build -f automation/Dockerfile -t . +# docker run -it +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 && \ + rustup component add rustfmt clippy diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile new file mode 100644 index 0000000..56fd787 --- /dev/null +++ b/automation/Jenkinsfile @@ -0,0 +1,39 @@ +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('Build') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + sh 'cargo build' + } + } + } +} \ No newline at end of file