ci: Begin CI pipeline
This commit is contained in:
13
ci/Dockerfile
Normal file
13
ci/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM rust:1.59.0-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
cmake \
|
||||
git \
|
||||
libssl-dev \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
pkg-config \
|
||||
&& \
|
||||
apt-get clean && \
|
||||
rm -rf /var/cache/apt /var/lib/apt
|
||||
48
ci/Jenkinsfile
vendored
Normal file
48
ci/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ('Build') {
|
||||
parallel {
|
||||
stage('Build: x86_64') {
|
||||
agent {
|
||||
dockerfile {
|
||||
label 'x86_64'
|
||||
dir 'ci'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh '. ci/build.sh'
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts 'x86_64/mqttdpms'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build: aarch64') {
|
||||
agent {
|
||||
dockerfile {
|
||||
label 'aarch64'
|
||||
dir 'ci'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh '. ci/build.sh'
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts 'aarch64/mqttdpms'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
5
ci/build.sh
Normal file
5
ci/build.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
cargo build --release --locked
|
||||
mkdir -p "$(uname -m)"
|
||||
ln target/release/mqttdpms "$(uname -m)"/
|
||||
Reference in New Issue
Block a user