library 'status-jenkins-lib@v1.6.7' pipeline { agent { label 'macos && aarch64 && go-1.18 && nix-2.11' } parameters { string( name: 'BRANCH', defaultValue: 'develop', description: 'Name of branch to build.' ) booleanParam( name: 'RELEASE', defaultValue: false, description: 'Enable to create build for release.', ) } options { timestamps() disableConcurrentBuilds() /* manage how many builds we keep */ buildDiscarder(logRotator( numToKeepStr: '5', daysToKeepStr: '30', )) } environment { TARGET = 'ios' TMPDIR = "${WORKSPACE_TMP}" GOPATH = "${WORKSPACE_TMP}/go" PATH = "${PATH}:${GOPATH}/bin" REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go" ARTIFACT = utils.pkgFilename(name: "status-go", type: "ios", ext: "zip", version: null) /* fix for gomobile complaining about missing packages */ CGO_ENABLED = "1" } stages { stage('Prep') { steps { /* Go needs to find status-go in GOPATH. */ sh "mkdir -p \$(dirname ${REPO_SRC})" sh "ln -s ${WORKSPACE} ${REPO_SRC}" } } stage('Compile') { steps { script { nix.shell('make statusgo-ios', pure: false) } } } stage('Archive') { steps { dir('build/bin') { sh 'zip -r status-go-ios.zip Statusgo.xcframework' sh "mv status-go-ios.zip ${WORKSPACE}/${ARTIFACT}" } archiveArtifacts(ARTIFACT) } } stage('Upload') { steps { script { env.PKG_URL = s3.uploadArtifact(ARTIFACT) } } } } // stages post { success { script { github.notifyPR(true) } } failure { script { github.notifyPR(false) } } cleanup { sh 'make clean' } } // post } // pipeline