Jenkins: macOS ARM64 CI job (#3128)

This commit is contained in:
Ștefan Talpalaru 2022-02-04 14:43:40 +01:00 committed by GitHub
parent 6f10e651ff
commit 70579f2fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 86 additions and 72 deletions

26
Jenkinsfile vendored
View File

@ -9,7 +9,9 @@ if (env.BRANCH_NAME != "stable" && env.BRANCH_NAME != "testing" && env.BRANCH_NA
milestone(buildNumber)
}
def runStages() {
def runStages(nodeDir) {
sh "mkdir -p ${nodeDir}"
dir(nodeDir) {
try {
stage("Clone") {
/* source code checkout */
@ -19,8 +21,8 @@ def runStages() {
}
cache(maxCacheSize: 250, caches: [
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/vendor/nimbus-build-system/vendor/Nim/bin"],
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/jsonTestsCache"]
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/${nodeDir}/vendor/nimbus-build-system/vendor/Nim/bin"],
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/${nodeDir}/jsonTestsCache"]
]) {
stage("Build") {
sh """#!/bin/bash
@ -89,6 +91,7 @@ def runStages() {
// clean the workspace
cleanWs(disableDeferredWipeout: true, deleteDirs: true)
}
} // dir(...)
}
parallel(
@ -97,18 +100,29 @@ parallel(
timeout(time: 4, unit: 'HOURS') {
node("linux") {
withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) {
runStages()
runStages("linux")
}
}
}
}
},
"macOS": {
"macOS (AMD64)": {
throttle(['nimbus-eth2']) {
timeout(time: 4, unit: 'HOURS') {
node("macos && x86_64") {
withEnv(["NPROC=${sh(returnStdout: true, script: 'sysctl -n hw.logicalcpu').trim()}"]) {
runStages()
runStages("macos_amd64")
}
}
}
}
},
"macOS (ARM64)": {
throttle(['nimbus-eth2']) {
timeout(time: 4, unit: 'HOURS') {
node("macos && arm64") {
withEnv(["NPROC=${sh(returnStdout: true, script: 'sysctl -n hw.logicalcpu').trim()}"]) {
runStages("macos_arm64")
}
}
}