Newer
Older
NewLang / Jenkinsfile
pipeline {
    agent any
    stages {
        stage('Build') {
            parallel {
                stage('Build Linux') {
                    agent {
                        docker {
                            image 'python:alpine'
                            label 'docker'
                            alwaysPull true
                        }
                    }
                    steps {
                        echo "Building for Linux"
                        sh "python ./build.py"
                        echo "Testing for Linux"
                        sh ". ./env.sh; dobuild && domut_ci && dotest_ci"
                        sh "mv NewLang.pyz NewLang.linux.pyz"
                        archiveArtifacts artifacts: 'NewLang.linux.pyz', fingerprint: true
                        cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false
                    }
                }
                stage('Build Windows') {
                    agent {
                        label 'windows'
                    }
                    steps {
                        echo "Building for Windows"
                        pwsh "python .\\build.py"
                        echo "Testing for Windows"
                        pwsh ".\\env.ps1; dobuild; domut_ci; dotest_ci"
                        pwsh "mv NewLang.pyz NewLang.windows.pyz"
                        archiveArtifacts artifacts: 'NewLang.windows.pyz', fingerprint: true
                        cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false
                    }
                }
            }
        }
    }
}