Skip to content

Commit

Permalink
Prepare Release 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasherzke committed Mar 27, 2019
1 parent 4e1eaa5 commit c1b678b
Show file tree
Hide file tree
Showing 209 changed files with 4,504 additions and 2,358 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of the HörTech Open Master Hearing Aid (openMHA)
# Copyright © 2013 2014 2015 2016 2017 2018 HörTech gGmbH
# Copyright © 2013 2014 2015 2016 2017 2018 2019 HörTech gGmbH
#
# openMHA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -43,6 +43,10 @@ x86_64-MinGW-gcc-7
x86_64-MinGW-gcc-8
armv7l-linux-gcc-4.9
x86_64-Darwin-clang

# Build artefacts
git_commit_hash.txt

# coverage analysis artifacts
coverage.info
coverage
Expand All @@ -57,8 +61,8 @@ coverage
mha/tools/mfiles/classpath.txt

# python cache
mha/examples/09-localizer-steering-beamformer/visualisation_web/__pycache__
mha/examples/09-localizer-steering-beamformer/Output/*
examples/09-localizer-steering-beamformer/visualisation_web/__pycache__
examples/09-localizer-steering-beamformer/Output/*

# from patching
*.rej
Expand Down
4 changes: 2 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ First, add the package source with the openMHA installation packages to your sys
In Ubuntu 18.04:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7D6CDF547DA4ABD
sudo apt-add-repository 'deb http://apt.openmha.org/ubuntu bionic universe'
sudo apt-add-repository 'deb http://apt.hoertech.de bionic universe'

In Ubuntu 16.04:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7D6CDF547DA4ABD
sudo apt-add-repository 'deb http://apt.openmha.org/ubuntu xenial universe'
sudo apt-add-repository 'deb http://apt.hoertech.de xenial universe'
sudo apt-get update

Install openMHA:
Expand Down
102 changes: 61 additions & 41 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def openmha_build_steps(stage_name) {
def system, arch, devenv
(system,arch,devenv) = stage_name.split(/ *&& */) // regexp for missing/extra spaces

// Compilation on ARM is the slowest, assign 2 CPU cores to each ARM build job
def cpus = (arch == "armv7") ? 2 : 1
// Compilation on ARM is the slowest, assign 5 CPU cores to each ARM build job
def cpus = (arch == "armv7") ? 5 : 1

// checkout openMHA from version control system, the exact same revision that
// triggered this job on each build slave
Expand All @@ -38,14 +38,11 @@ def openmha_build_steps(stage_name) {
// Avoid that artifacts from previous builds influence this build
sh "git reset --hard && git clean -ffdx"

// Save time by using precompiled external libs if possible.
// Install pre-compiled external libraries for the common branches
if ("$BRANCH_NAME" == "development" || "$BRANCH_NAME" == "master") {
copyArtifacts(projectName:
"openMHA/external_libs/external_libs_$BRANCH_NAME",
selector:
lastSuccessful())
sh "tar xvzf external_libs.tgz"
}
copyArtifacts(projectName: "openMHA/external_libs/external_libs_development",
selector: lastSuccessful())
sh "tar xvzf external_libs.tgz"

// if we notice any differences between the sources of the precompiled
// dependencies and the current sources, we cannot help but need to recompile
Expand All @@ -57,9 +54,11 @@ def openmha_build_steps(stage_name) {
// On linux, we also create debian packages
def linux = (system != "windows" && system != "mac")
def windows = (system == "windows")
def mac = (system == "mac")
def debs = linux ? " deb" : ""
def pkgs = mac ? " pkg" : ""
def exes = windows ? " exe" : ""
sh ("make -j $cpus install unit-tests" + debs + exes)
sh ("make -j $cpus install unit-tests" + debs + exes + pkgs)

// The system tests perform timing measurements which may fail when
// system load is high. Retry in that case, up to 2 times.
Expand All @@ -72,7 +71,12 @@ def openmha_build_steps(stage_name) {

if (windows) {
// Store windows installer packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/exe/'
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/exe/*.exe'
}

if (mac) {
// Store mac installer packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/pkg/*.pkg'
}
}

Expand Down Expand Up @@ -125,34 +129,51 @@ pipeline {
}
}
}
stage("publish") {
agent {label "aptly"}
// do not publish packages for any branches except these
when { anyOf { branch 'master'; branch 'development' } }
steps {
checkout([$class: 'GitSCM', branches: [[name: "$BRANCH_NAME"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout']], submoduleCfg: [], userRemoteConfigs: [[url: "$GIT_URL-aptly"]]])

// receive all deb packages from openmha build
unstash "x86_64_bionic"
unstash "x86_64_xenial"
unstash "x86_64_trusty"
unstash "armv7_bionic"
unstash "armv7_xenial"
// We can also build for 32 bits. Deactivated to save
// CPU cycles on Jenkins server.
// unstash "i686_bionic"
// unstash "i686_xenial"
// unstash "i686_trusty"

// Copies the new debs to the stash of existing debs,
// creates an apt repository, uploads.
sh "make"

// Publish windows installer on the web and as a Jenkins artifact
unstash "x86_64_windows"
archiveArtifacts 'mha/tools/packaging/exe/*.exe'
sh "echo 'Options +Indexes' >.htaccess"
sh "(echo mkdir openMHA/apt-repositories/$BRANCH_NAME/windows; echo put mha/tools/packaging/exe/*.exe openMHA/apt-repositories/$BRANCH_NAME/windows/; echo put .htaccess openMHA/apt-repositories/$BRANCH_NAME/windows/) | sftp p35492077-mha@home89585951.1and1-data.host"
stage("artifacts") {
parallel {
stage("debian packages for apt") {
agent {label "aptly"}
// do not publish packages for any branches except these
when { anyOf { branch 'master'; branch 'development' } }
steps {
// receive all deb packages from openmha build
unstash "x86_64_bionic"
unstash "x86_64_xenial"
unstash "x86_64_trusty"
unstash "armv7_bionic"
unstash "armv7_xenial"
// We can also build for 32 bits. Deactivated to save
// CPU cycles on Jenkins server.
// unstash "i686_bionic"
// unstash "i686_xenial"
// unstash "i686_trusty"

// Copies the new debs to the stash of existing debs,
sh "make storage"
build job: "/hoertech-aptly/$BRANCH_NAME",
quietPeriod: 300,
wait: false
}
}
stage("jenkins artifacts") {
steps {
// Publish mac installer as a Jenkins artifact
unstash "x86_64_mac"
archiveArtifacts 'mha/tools/packaging/pkg/*pkg'

// Publish windows installer as a Jenkins artifact
unstash "x86_64_windows"
archiveArtifacts 'mha/tools/packaging/exe/*.exe'

// Publish debian packages as Jenkins artifacts
unstash "x86_64_bionic"
unstash "x86_64_xenial"
unstash "x86_64_trusty"
unstash "armv7_bionic"
unstash "armv7_xenial"
archiveArtifacts 'mha/tools/packaging/deb/hoertech/*/*.deb'
}
}
}
}
}
Expand All @@ -163,8 +184,7 @@ pipeline {
// https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#-mail-%20mail
post {
failure {
// mail to: 't.herzke@hoertech.de,p.maanen@hoertech.de,g.grimm@hoertech.de',
mail to: 't.herzke@hoertech.de',
mail to: 't.herzke@hoertech.de,p.maanen@hoertech.de,g.grimm@hoertech.de',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
Expand Down
175 changes: 175 additions & 0 deletions Jenkinsfile.differential
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
// This file is part of the HörTech Open Master Hearing Aid (openMHA)
// Copyright © 2018 2019 HörTech gGmbH
//
// openMHA is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, version 3 of the License.
//
// openMHA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License, version 3 for more details.
//
// You should have received a copy of the GNU Affero General Public License,
// version 3 along with openMHA. If not, see <http://www.gnu.org/licenses/>.

// Encapsulation of the build steps to perform when compiling openMHA
// @param stage_name the stage name is "system && arch" where system is bionic,
// xenial, trusty, windows, or mac, and arch is x86_64, i686,
// or armv7. Both are separated by an && operator and spaces.
// This string is also used as a valid label expression for
// jenkins. The appropriate nodes have the respective labels.
// We might need to extend this in future to include the
// "mhadev" label, to differentiate build environments
// for the same system and architecture but with different
// library / tool dependencies.
def openmha_build_steps(stage_name) {
// Extract components from stage_name:
def system, arch, devenv
(system,arch,devenv) = stage_name.split(/ *&& */) // regexp for missing/extra spaces

// Compilation on ARM is the slowest, assign 5 CPU cores to each ARM build job
def cpus = (arch == "armv7") ? 5 : 1

// checkout and clean openMHA, branch development
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: "phabricator/diff/$DIFF_ID"]],
browser: [$class: 'Phabricator', repo: 'rOMD',
repoUrl: 'https://dev.openmha.org/'],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout']],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: '8219f3dc-c16a-44d4-a0a3-a336b036fc29',
url: "$GIT_SERVER_MHA/mha_phabricator_staging"]]]

// Save time by using precompiled external libs if possible.
// Install pre-compiled external libraries for the common branches
copyArtifacts(projectName: "openMHA/external_libs/external_libs_development",
selector: lastSuccessful())
sh "tar xvzf external_libs.tgz"

// if we notice any differences between the sources of the precompiled
// dependencies and the current sources, we cannot help but need to recompile
sh "git diff --exit-code || (git reset --hard && git clean -ffdx)"

// Autodetect libs/compiler
sh "./configure"

// On linux, we also create debian packages
def linux = (system != "windows" && system != "mac")
def windows = (system == "windows")
def mac = (system == "mac")
def debs = linux ? " deb" : ""
def pkgs = mac ? " pkg" : ""
def exes = windows ? " exe" : ""
sh ("make -j $cpus install unit-tests" + debs + exes + pkgs)

// The system tests perform timing measurements which may fail when
// system load is high. Retry in that case, up to 2 times.
retry(3){sh "make -C mha/mhatest"}

if (linux) {
// Store debian packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/deb/hoertech/'
}

if (windows) {
// Store windows installer packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/exe/*.exe'
}

if (mac) {
// Store mac installer packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/pkg/*.pkg'
}
}

pipeline {
agent {label "jenkinsmaster"}
parameters {
string(name: 'PHID', defaultValue: 'invalidDefault', description: '')
string(name: 'DIFF_ID', defaultValue: 'invalidDefault', description: '')
}
stages {
stage("build") {
parallel {
stage( "bionic && x86_64 && mhadev") {
agent {label "bionic && x86_64 && mhadev"}
steps {openmha_build_steps("bionic && x86_64 && mhadev")}
}
stage( "xenial && x86_64 && mhadev") {
agent {label "xenial && x86_64 && mhadev"}
steps {openmha_build_steps("xenial && x86_64 && mhadev")}
}
stage( "trusty && x86_64 && mhadev") {
agent {label "trusty && x86_64 && mhadev"}
steps {openmha_build_steps("trusty && x86_64 && mhadev")}
}
// We can also build for 32 bits. Deactivated to save
// CPU cycles on Jenkins server.
// stage( "bionic && i686") {
// agent {label "bionic && i686"}
// steps {openmha_build_steps("bionic && i686")}
// }
// stage( "xenial && i686") {
// agent {label "xenial && i686"}
// steps {openmha_build_steps("xenial && i686")}
// }
// stage( "trusty && i686") {
// agent {label "trusty && i686"}
// steps {openmha_build_steps("trusty && i686")}
// }
stage( "bionic && armv7 && mhadev") {
agent {label "bionic && armv7 && mhadev"}
steps {openmha_build_steps("bionic && armv7 && mhadev")}
}
stage( "xenial && armv7 && mhadev") {
agent {label "xenial && armv7 && mhadev"}
steps {openmha_build_steps("xenial && armv7 && mhadev")}
}
stage( "windows && x86_64 && mhadev") {
agent {label "windows && x86_64 && mhadev"}
steps {openmha_build_steps("windows && x86_64 && mhadev")}
}
stage( "mac && x86_64 && mhadev") {
agent {label "mac && x86_64 && mhadev"}
steps {openmha_build_steps("mac && x86_64 && mhadev")}
}
}
}
stage("artifacts") {
steps {
// Publish mac installer as a Jenkins artifact
unstash "x86_64_mac"
archiveArtifacts 'mha/tools/packaging/pkg/*.pkg'

// Publish windows installer as a Jenkins artifact
unstash "x86_64_windows"
archiveArtifacts 'mha/tools/packaging/exe/*.exe'

// Publish debian packages as Jenkins artifacts
unstash "x86_64_bionic"
unstash "x86_64_xenial"
unstash "x86_64_trusty"
unstash "armv7_bionic"
unstash "armv7_xenial"
archiveArtifacts 'mha/tools/packaging/deb/hoertech/*/*.deb'
}
}
}
post {
always {
script {
// workaround. See https://github.com/uber/phabricator-jenkins-plugin/pull/185
currentBuild.result = currentBuild.currentResult
}
step([$class: 'PhabricatorNotifier',
commentOnSuccess: true,
commentWithConsoleLinkOnFailure: true,
uberallsEnabled: false,
customComment: false,
processLint: false])
}
}
}

0 comments on commit c1b678b

Please sign in to comment.