Skip to content

Commit

Permalink
Merge pull request #1 from xmos/feature/jenkins
Browse files Browse the repository at this point in the history
update to run CI build
  • Loading branch information
keithm-xmos authored Dec 15, 2020
2 parents 3db8aff + c53c7d9 commit 3ff4129
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
23 changes: 7 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ getApproval()
pipeline {
agent {
dockerfile {
args "-v /home/jenkins/.keras:/root/.keras"
args ""
}
}

Expand All @@ -15,11 +15,6 @@ pipeline {
defaultValue: '15.0.1',
description: 'The tools version to build with (check /projects/tools/ReleasesTools/)'
)
booleanParam( // use to check results of rolling all conda deps forward
name: 'UPDATE_ALL',
defaultValue: false,
description: 'Update all conda packages before building'
)
}

options { // plenty of things could go here
Expand All @@ -46,10 +41,10 @@ pipeline {
recursiveSubmodules: true],
[$class: 'CleanCheckout']],
userRemoteConfigs: [[credentialsId: 'xmos-bot',
url: '[email protected]:xmos/ai_tools']]
url: '[email protected]:xmos/lib_nn']]
])
// create venv
sh "conda env create -q -p ai_tools_venv -f environment.yml"
sh "conda env create -q -p lib_nn_venv -f environment.yml"
// Install xmos tools version
sh "/XMOS/get_tools.py " + params.TOOLS_VERSION
}
Expand All @@ -58,19 +53,15 @@ pipeline {
// Roll all conda packages forward beyond their pinned versions
when { expression { return params.UPDATE_ALL } }
steps {
sh "conda update --all -y -q -p ai_tools_venv"
sh "conda update --all -y -q -p lib_nn_venv"
}
}
stage("Build/Test") {
// due to the Makefile, we've combined build and test stages
stage("Build") {
steps {
// below is how we can activate the tools
sh """pushd /XMOS/tools/${params.TOOLS_VERSION}/XMOS/xTIMEcomposer/${params.TOOLS_VERSION} && . SetEnv && popd &&
. activate ./ai_tools_venv &&
make ci"""
// Any call to pytest can be given the "--junitxml SOMETHING_junit.xml" option
// This step collects these files for display in Jenkins UI
junit "**/*_junit.xml"
. activate ./lib_nn_venv &&
cd test/unit_test && make all"""
}
}
}
Expand Down
16 changes: 16 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
channels:
- mvdbeek
- bioconda
- conda-forge
- anaconda
- defaults
dependencies:
- cmake=3.14.0
- make=4.2.1
- nbval=0.9.6
- ncurses=6.1
- python=3.6.8
- pytest=5.2.0
- pytest-forked=1.1.3
- pytest-xdist=1.30.0
- Sphinx==3.3.1

0 comments on commit 3ff4129

Please sign in to comment.