Skip to content

Commit

Permalink
CI: tox stage runs on macs
Browse files Browse the repository at this point in the history
  • Loading branch information
henryborchers committed Oct 11, 2023
1 parent e7f7759 commit 00cf71f
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
def getMacToxTestsParallel(args = [:]){
def nodeLabel = args['label']
args.remove('label')
def jobs = [:]
node(label){
try{
sh(
script: '''python3 -m venv venv --upgrade-deps
venv/bin/pip install tox
'''
)
def envs = sh(
label: "Getting Tox Environments",
returnStdout: true,
script: "tox -l"
).trim().split('\n')

} finally {
sh 'rm -rf venv'
}
}
return jobs
}
pipeline {
agent none
options {
Expand Down Expand Up @@ -212,7 +235,11 @@ pipeline {
} else {
echo 'No nodes with the following labels: windows && docker && x86'
}
parallel(linuxJobs + windowsJobs)
def macJobs = [:]
if(nodesByLabel('mac && python3 && x86').size() > 0){
macJobs = getMacToxTestsParallel(label: 'mac && python3 && x86')
}
parallel(linuxJobs + windowsJobs + macJobs)
}
}
// post{
Expand Down

0 comments on commit 00cf71f

Please sign in to comment.