Skip to content

Commit

Permalink
Archiving packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Nov 21, 2022
1 parent 57ad9f2 commit a0082fb
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def recordCygwinVersions(buildDirectory){
archiveArtifacts artifacts: "${buildDirectory}/cygwinVersions.txt"
}

def runBuild(platformName, configuration, headless = true, someAdditionalParameters = ""){
def runBuild(platformName, configuration, headless = true){
cleanWs()

def platform = headless ? platformName : "${platformName}-stockReplacement"
def buildDirectory = headless ? "build" :"build-stockReplacement"
def additionalParameters = someAdditionalParameters
def additionalParameters = ""

additionalParameters += headless ? "" : "-DALWAYS_INTERACTIVE=1 "
additionalParameters += isRelease() ? "-DBUILD_IS_RELEASE=ON " : "-DBUILD_IS_RELEASE=OFF "
Expand All @@ -131,16 +131,19 @@ def runBuild(platformName, configuration, headless = true, someAdditionalParamet
recordCygwinVersions(buildDirectory)
runInCygwin "cd ${buildDirectory} && cmake -DFLAVOUR=${configuration} ${additionalParameters} -DPHARO_DEPENDENCIES_PREFER_DOWNLOAD_BINARIES=TRUE ../repository -DICEBERG_DEFAULT_REMOTE=httpsUrl"
runInCygwin "cd ${buildDirectory} && VERBOSE=1 make install package"
runInCygwin "mkdir -p artifacts-${platformName} && cp -a ${buildDirectory}/build/packages/ artifacts-${platformName}"
}else{
cmakeBuild generator: "Unix Makefiles", cmakeArgs: "-DFLAVOUR=${configuration} ${additionalParameters} -DPHARO_DEPENDENCIES_PREFER_DOWNLOAD_BINARIES=TRUE -DICEBERG_DEFAULT_REMOTE=httpsUrl", sourceDir: "repository", buildDir: "${buildDirectory}", installation: "InSearchPath"
dir("${buildDirectory}"){
shell "VERBOSE=1 make install package"
shell "mkdir -p artifacts-${platformName} && cp -a ${buildDirectory}/build/packages/ artifacts-${platformName}"
}
}

stash excludes: '_CPack_Packages', includes: "${buildDirectory}/build/packages/*", name: "packages-${platform}-${configuration}"
stash includes: "repository/scripts/*", name: "scripts"
archiveArtifacts artifacts: "${buildDirectory}/build/packages/*", excludes: '_CPack_Packages'
stash excludes: '_CPack_Packages', includes: "${buildDirectory}/build/packages/*", name: "packages-${platform}-${configuration}"
archiveArtifacts artifacts: "${buildDirectory}/build/packages/*", excludes: '_CPack_Packages'
archiveArtifacts artifacts: "artifacts-${platformName}/*", excludes: '_CPack_Packages'

}
}

Expand Down Expand Up @@ -190,12 +193,11 @@ def runUnitTests(platform){
dir("build/vmmaker"){
shell "wget https://files.pharo.org/vm/pharo-spur64/Darwin-x86_64/third-party/libllvm-full.zip"
shell "unzip libllvm-full.zip -d ./vm/Contents/MacOS/Plugins"
shell "wget https://files.pharo.org/vm/pharo-spur64/Darwin-x86_64/third-party/libunicorn.2.zip"
shell "unzip libunicorn.2.zip -d ./vm/Contents/MacOS/Plugins"
shell "wget https://files.pharo.org/vm/pharo-spur64/Darwin-x86_64/third-party/libunicorn.zip"
shell "unzip libunicorn.zip -d ./vm/Contents/MacOS/Plugins"

timeout(20){
shell "PHARO_CI_TESTING_ENVIRONMENT=true ./vm/Contents/MacOS/Pharo --headless --logLevel=4 ./image/VMMaker.image test --junit-xml-output 'VMMakerTests'"
shell "PHARO_CI_TESTING_ENVIRONMENT=true ./vm/Contents/MacOS/Pharo --headless --logLevel=4 ./image/VMMaker.image test --junit-xml-output 'Slang-Tests'"
}
// Stop if tests fail
// Archive xml reports either case
Expand All @@ -220,31 +222,24 @@ def runTests(platform, configuration, packages, withWorker, additionalParameters
def hasWorker = withWorker ? "--worker" : ""

stage(stageName){
unstash name: "scripts"
unstash name: "packages-${platform}-${configuration}"
unstash name: "packages-${platform}-${configuration}"
shell "mkdir runTests"
dir("runTests"){
try{
shell "wget -O - get.pharo.org/64/100 | bash "
shell "echo 100 > pharo.version"
shell "wget -O - get.pharo.org/64/90 | bash "
shell "echo 90 > pharo.version"

if(isWindows()){
runInCygwin "cd runTests && unzip ../build/build/packages/PharoVM-*-${platform}-bin.zip -d ."
// Disable testAfterSequence that creates incorrect bytecode sequences
runInCygwin "PHARO_CI_TESTING_ENVIRONMENT=true cd runTests && ./PharoConsole.exe --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} ../repository/scripts/patchPharoPreTests.st"
runInCygwin "PHARO_CI_TESTING_ENVIRONMENT=true cd runTests && ./PharoConsole.exe --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} test --junit-xml-output --stage-name=${stageName} '${packages}'"
runInCygwin "PHARO_CI_TESTING_ENVIRONMENT=true cd runTests && ./PharoConsole.exe --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} test --junit-xml-output --stage-name=${stageName} '${packages}'"
} else {
shell "unzip ../build/build/packages/PharoVM-*-${platform}-bin.zip -d ."

if(platform == 'Darwin-x86_64' || platform == 'Darwin-arm64'){
// Disable testAfterSequence that creates incorrect bytecode sequences
shell "PHARO_CI_TESTING_ENVIRONMENT=true ./Pharo.app/Contents/MacOS/Pharo --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} ../repository/scripts/patchPharoPreTests.st"
shell "PHARO_CI_TESTING_ENVIRONMENT=true ./Pharo.app/Contents/MacOS/Pharo --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} test --junit-xml-output --stage-name=${stageName} '${packages}'"
}

if(platform == 'Linux-x86_64' || platform == 'Linux-aarch64' || platform == 'Linux-armv7l'){
// Disable testAfterSequence that creates incorrect bytecode sequences
shell "PHARO_CI_TESTING_ENVIRONMENT=true ./pharo --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} ../repository/scripts/patchPharoPreTests.st"
shell "PHARO_CI_TESTING_ENVIRONMENT=true ./pharo --logLevel=4 ${hasWorker} Pharo.image ${additionalParameters} test --junit-xml-output --stage-name=${stageName} '${packages}'"
}
}
Expand Down Expand Up @@ -455,9 +450,6 @@ try{
timeout(30){
runBuild(platform, "StackVM")
}
timeout(30){
runBuild("${platform}-ComposedFormat", "CoInterpreter", true, "-DIMAGE_FORMAT=ComposedFormat")
}
timeout(30){
// Only build the Stock replacement version in the main branch
if(isMainBranch()){
Expand All @@ -466,7 +458,7 @@ try{
}
}
}

tests[platform] = {
node(platform){
timeout(45){
Expand Down

0 comments on commit a0082fb

Please sign in to comment.