Skip to content

Commit

Permalink
Prepare Release 4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasherzke committed Jun 27, 2019
1 parent c1b678b commit df1a3d5
Show file tree
Hide file tree
Showing 549 changed files with 7,719 additions and 905 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Expand Up @@ -17,6 +17,9 @@
bin
lib

# Auto-generated pdf documents
openMHA_*.pdf

# Editor backup and lock files
*~
.#*
Expand All @@ -41,7 +44,6 @@ i686-MinGW-gcc-6
i686-MinGW-gcc-7
x86_64-MinGW-gcc-7
x86_64-MinGW-gcc-8
armv7l-linux-gcc-4.9
x86_64-Darwin-clang

# Build artefacts
Expand Down Expand Up @@ -80,6 +82,9 @@ mha/tools/packaging/deb
#Windows packaging artifacts
*.exe

#Node-red auto-backup files
*.flow.backup

# Local Variables:
# coding: utf-8-unix
# End:
50 changes: 26 additions & 24 deletions INSTALLATION.md
Expand Up @@ -5,7 +5,7 @@ Linux (__I.__), Windows (__II.__), and macOS (__III.__) operating systems.

## I. Installation from binary packages on Ubuntu.

First, add the package source with the openMHA installation packages to your system:
First, add the openMHA package repository to your system:

In Ubuntu 18.04:

Expand All @@ -16,24 +16,19 @@ In Ubuntu 16.04:

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

Install openMHA:
Install openMHA and some openMHA usage examples:
```
sudo apt-get install openmha
sudo apt-get install openmha openmha-examples
```

After installation, openMHA documentation is found in
`/usr/share/doc/openmha`
and tools for GNU Octave/Matlab in `/usr/lib/openmha/mfiles`.

We provide some examples together with the openMHA.
When using Debian packages, you can find the examples in a separate package,
*openmha-examples*. After installing the openmha-examples package:
```
sudo apt-get install openmha-examples
```
the examples can be found in `/usr/share/openmha/examples`.
We provide some examples for openMHA, after installing the openmha-examples
package the examples can be found in `/usr/share/openmha/examples`.

NOTE: If you want to use the example files we recommend to make a copy in your
home directory as they are located in a system-wide read-only directory. Some of
Expand All @@ -48,30 +43,37 @@ For updating openMHA when a new release is available run
sudo apt-get install --only-upgrade openmha
```

## II. Windows installer
## II. macOS installer

An openMHA installer for 64 bit Windows can be downloaded from our
An openMHA installer for macOS can be downloaded from our
Github releases page, https://github.com/HoerTech-gGmbH/openMHA/releases.

On Windows, you may want to add the bin directory to the system PATH.
To use the Jack audio plugin, the [JackOSX distribution](http://www.jackaudio.org)
needs to be installed.

On some machines macOS refuses to open the installer because it is from an
unverified developer. Opening the installer while holding Ctrl makes macOS
offer an override option.

The installer installs openMHA example setups and some tools. We recommend to
copy the examples folder to a writable location inside your user directory.

You can find the examples folder in the `examples sub-directory` of
the installation directory (e.g. `C:\Program Files\openMHA`). The sub-directories
`mfiles` contains Matlab / Octave files for interacting with openMHA and
documentation is found in `doc`.
On macOS, you can find the examples folder in
`/usr/local/share/openmha/examples/`. m-files for interacting with the openMHA
from Matlab or Octave are installed in `/usr/local/lib/openmha/mfiles/`, and
documentation can be found in `/usr/local/doc/openmha/`.

## III. macOS installer
## III. Windows installer

An openMHA installer for macOS can be downloaded from our
An openMHA installer for 64 bit Windows can be downloaded from our
Github releases page, https://github.com/HoerTech-gGmbH/openMHA/releases.

On Windows, you may want to add the bin directory to the system PATH.

The installer installs openMHA example setups and some tools. We recommend to
copy the examples folder to a writable location inside your user directory.

On Mac OS, you can find the examples folder in
`/usr/local/share/openmha/examples/`. m-files for interacting with the openMHA
from Matlab or Octave are installed in `/usr/local/lib/openmha/mfiles/`, and
documentation can be found in `/usr/local/doc/openmha/`.
You can find the examples folder in the `examples sub-directory` of
the installation directory (e.g. `C:\Program Files\openMHA`). The sub-directories
`mfiles` contains Matlab / Octave files for interacting with openMHA and
documentation is found in `doc`.
173 changes: 86 additions & 87 deletions Jenkinsfile
Expand Up @@ -13,9 +13,21 @@
// 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/>.

// On the 2019 windows build server, we cannot use the sh step anymore.
// This workaround invokes the msys2 bash, sets the required environment
// variables, and executes the desired command.
def windows_bash(command) {
bat ('C:\\msys64\\usr\\bin\\bash -c "source /jenkins.environment && set -ex && ' + command + ' "')
// This will probably fail if command contains multiple lines, quotes, or
// similar. Currently all our shell commands are simple enough for this
// simple solution to work. Should this no longer be sufficient, then we
// could write the shell command to a temporary file and execute this file
// after sourcing the enviroment.
}

// 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,
// xenial, 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.
Expand All @@ -28,55 +40,79 @@ def openmha_build_steps(stage_name) {
def system, arch, devenv
(system,arch,devenv) = stage_name.split(/ *&& */) // regexp for missing/extra spaces

// platform booleans
def linux = (system != "windows" && system != "mac")
def windows = (system == "windows")
def mac = (system == "mac")
def docs = (devenv == "mhadoc")

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

// workaround to invoke unix shell on all systems
def bash = { command -> windows ? windows_bash(command) : sh(command) }

// checkout openMHA from version control system, the exact same revision that
// triggered this job on each build slave
checkout scm

// Avoid that artifacts from previous builds influence this build
sh "git reset --hard && git clean -ffdx"
bash "git reset --hard && git clean -ffdx"

// 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"
bash "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)"
bash "git diff --exit-code || (git reset --hard && git clean -ffdx)"

// Autodetect libs/compiler
sh "./configure"
bash "./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)
if (docs) {
bash ("make -j ${cpus + additional_cpus_for_docs} doc")

// Store generated PDF documents as Jenkins artifacts
stash name: "docs", includes: '*.pdf'
bash ("echo stashed docs on $system $arch at \$(date -R)")
archiveArtifacts 'pdf-*.zip'
}

// 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"}
// Build executables, plugins, execute tests
bash ("make -j $cpus test")

// Retrieve the documents, wait if they are not ready yet
def wait_time = 1
def attempt = 0
retry(45){
sleep(wait_time)
wait_time = 15
attempt = attempt + 1
bash ("echo unstash docs attempt $attempt on $system $arch at \$(date -R)")
unstash "docs"
}

if (linux) {
// Store debian packets for later retrieval by the repository manager
bash ("make -j $cpus deb")
// Store debian packages
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/deb/hoertech/'
archiveArtifacts 'mha/tools/packaging/deb/hoertech/*/*.deb'
}

if (windows) {
// Store windows installer packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'mha/tools/packaging/exe/*.exe'
bash ("make -j $cpus exe")
// Store windows installer
archiveArtifacts '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'
bash ("make -j $cpus pkg")
// Store mac installer
archiveArtifacts 'mha/tools/packaging/pkg/*.pkg'
}
}

Expand All @@ -85,32 +121,22 @@ pipeline {
stages {
stage("build") {
parallel {
stage( "bionic && x86_64 && mhadev") {
agent {label "bionic && x86_64 && mhadev"}
steps {openmha_build_steps("bionic && x86_64 && mhadev")}
stage( "bionic && x86_64 && mhadoc") {
agent {label "bionic && x86_64 && mhadoc"}
steps {openmha_build_steps("bionic && x86_64 && mhadoc")}
}
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")}
stage( "bionic && i686 && mhadev") {
agent {label "bionic && i686 && mhadev"}
steps {openmha_build_steps("bionic && i686 && mhadev")}
}
stage( "xenial && i686 && mhadev") {
agent {label "xenial && i686 && mhadev"}
steps {openmha_build_steps("xenial && i686 && 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")}
Expand All @@ -129,51 +155,24 @@ pipeline {
}
}
}
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'
}
}
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 "armv7_bionic"
unstash "armv7_xenial"
unstash "i686_bionic"
unstash "i686_xenial"

// Copies the new debs to the stash of existing debs,
sh "make storage"
build job: "/hoertech-aptly/$BRANCH_NAME",
quietPeriod: 300,
wait: false
}
}
}
Expand Down

0 comments on commit df1a3d5

Please sign in to comment.