From 3d24998af3b15c9e2236bbf50fb4688b4c9d07af Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Sat, 18 Jan 2025 10:28:55 +0100 Subject: [PATCH 1/3] Reorder image tags --- .jenkins/docker-dev-debug-debian-12.Jenkinsfile | 3 ++- .jenkins/docker-dev-release-debian-12.Jenkinsfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.jenkins/docker-dev-debug-debian-12.Jenkinsfile b/.jenkins/docker-dev-debug-debian-12.Jenkinsfile index 535bd482..66ce3d1e 100644 --- a/.jenkins/docker-dev-debug-debian-12.Jenkinsfile +++ b/.jenkins/docker-dev-debug-debian-12.Jenkinsfile @@ -48,11 +48,12 @@ node { docker.withRegistry('https://ghcr.io', 'marco-ci') { stage('Publish') { dockerImage.push() - dockerImage.push("latest") if (tag != "") { dockerImage.push(tag) } + + dockerImage.push("latest") } } diff --git a/.jenkins/docker-dev-release-debian-12.Jenkinsfile b/.jenkins/docker-dev-release-debian-12.Jenkinsfile index c9435624..5ebf523d 100644 --- a/.jenkins/docker-dev-release-debian-12.Jenkinsfile +++ b/.jenkins/docker-dev-release-debian-12.Jenkinsfile @@ -48,11 +48,12 @@ node { docker.withRegistry('https://ghcr.io', 'marco-ci') { stage('Publish') { dockerImage.push() - dockerImage.push("latest") if (tag != "") { dockerImage.push(tag) } + + dockerImage.push("latest") } } From af951d1c2b048cc00174ad3e341d23ae181c9687 Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Sat, 18 Jan 2025 10:30:30 +0100 Subject: [PATCH 2/3] Delete GitHub checks to Jenkins --- .jenkins/dev-debian-12.Jenkinsfile | 37 +++++++------------ .jenkins/dev-fedora-40.Jenkinsfile | 37 +++++++------------ .jenkins/dev-ubuntu-22.04.Jenkinsfile | 37 +++++++------------ .../docker-dev-debug-debian-12.Jenkinsfile | 7 ---- .../docker-dev-release-debian-12.Jenkinsfile | 7 ---- .jenkins/package-debian-12.Jenkinsfile | 35 +++++++----------- 6 files changed, 55 insertions(+), 105 deletions(-) diff --git a/.jenkins/dev-debian-12.Jenkinsfile b/.jenkins/dev-debian-12.Jenkinsfile index 3b3cb203..0ed748b6 100644 --- a/.jenkins/dev-debian-12.Jenkinsfile +++ b/.jenkins/dev-debian-12.Jenkinsfile @@ -1,8 +1,5 @@ String configName = "debian-12" String dockerfile = "debian-12.Dockerfile" -String checkName = "ci-" + configName - -publishChecks(name: checkName, status: 'QUEUED', summary: 'Queued') node { agent { @@ -36,8 +33,6 @@ node { " -f " + runtimeSrcPath + "/.jenkins/" + dockerfile + " " + runtimeSrcPath + "/.jenkins"; - publishChecks(name: checkName, status: 'IN_PROGRESS', summary: 'In progress') - def dockerImage stage("Docker image") { @@ -45,28 +40,24 @@ node { } dockerImage.inside() { - withChecks(name: checkName) { - stage("OS information") { - sh "cat /etc/os-release" - } + stage("OS information") { + sh "cat /etc/os-release" + } - stage('Configure') { - cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' - } + stage('Configure') { + cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' + } - stage('Build') { - cmake arguments: "--build " + runtimeBuildPath, installation: 'InSearchPath', label: 'Build' - } + stage('Build') { + cmake arguments: "--build " + runtimeBuildPath, installation: 'InSearchPath', label: 'Build' + } - stage('Unit test') { - cmake arguments: "--build " + runtimeBuildPath + " --target test", installation: 'InSearchPath', label: 'Unit tests' - } + stage('Unit test') { + cmake arguments: "--build " + runtimeBuildPath + " --target test", installation: 'InSearchPath', label: 'Unit tests' + } - stage('Install') { - cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' - } + stage('Install') { + cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' } } - - publishChecks(name: checkName, conclusion: 'SUCCESS', summary: 'Completed') } diff --git a/.jenkins/dev-fedora-40.Jenkinsfile b/.jenkins/dev-fedora-40.Jenkinsfile index 5d7d7a36..729197b0 100644 --- a/.jenkins/dev-fedora-40.Jenkinsfile +++ b/.jenkins/dev-fedora-40.Jenkinsfile @@ -1,8 +1,5 @@ String configName = "fedora-40" String dockerfile = "fedora-40.Dockerfile" -String checkName = "ci-" + configName - -publishChecks(name: checkName, status: 'QUEUED', summary: 'Queued') node { agent { @@ -36,8 +33,6 @@ node { " -f " + runtimeSrcPath + "/.jenkins/" + dockerfile + " " + runtimeSrcPath + "/.jenkins"; - publishChecks(name: checkName, status: 'IN_PROGRESS', summary: 'In progress') - def dockerImage stage("Docker image") { @@ -45,28 +40,24 @@ node { } dockerImage.inside() { - withChecks(name: checkName) { - stage("OS information") { - sh "cat /etc/os-release" - } + stage("OS information") { + sh "cat /etc/os-release" + } - stage('Configure') { - cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' - } + stage('Configure') { + cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' + } - stage('Build') { - cmake arguments: "--build " + runtimeBuildPath, installation: 'InSearchPath', label: 'Build' - } + stage('Build') { + cmake arguments: "--build " + runtimeBuildPath, installation: 'InSearchPath', label: 'Build' + } - stage('Unit test') { - cmake arguments: "--build " + runtimeBuildPath + " --target test", installation: 'InSearchPath', label: 'Unit tests' - } + stage('Unit test') { + cmake arguments: "--build " + runtimeBuildPath + " --target test", installation: 'InSearchPath', label: 'Unit tests' + } - stage('Install') { - cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' - } + stage('Install') { + cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' } } - - publishChecks(name: checkName, conclusion: 'SUCCESS', summary: 'Completed') } diff --git a/.jenkins/dev-ubuntu-22.04.Jenkinsfile b/.jenkins/dev-ubuntu-22.04.Jenkinsfile index ea783a99..8dc3325c 100644 --- a/.jenkins/dev-ubuntu-22.04.Jenkinsfile +++ b/.jenkins/dev-ubuntu-22.04.Jenkinsfile @@ -1,8 +1,5 @@ String configName = "ubuntu-22.04" String dockerfile = "ubuntu-22.04.Dockerfile" -String checkName = "ci-" + configName - -publishChecks(name: checkName, status: 'QUEUED', summary: 'Queued') node { agent { @@ -36,8 +33,6 @@ node { " -f " + runtimeSrcPath + "/.jenkins/" + dockerfile + " " + runtimeSrcPath + "/.jenkins"; - publishChecks(name: checkName, status: 'IN_PROGRESS', summary: 'In progress') - def dockerImage stage("Docker image") { @@ -45,28 +40,24 @@ node { } dockerImage.inside() { - withChecks(name: checkName) { - stage("OS information") { - sh "cat /etc/os-release" - } + stage("OS information") { + sh "cat /etc/os-release" + } - stage('Configure') { - cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' - } + stage('Configure') { + cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' + } - stage('Build') { - cmake arguments: "--build " + runtimeBuildPath, installation: 'InSearchPath', label: 'Build' - } + stage('Build') { + cmake arguments: "--build " + runtimeBuildPath, installation: 'InSearchPath', label: 'Build' + } - stage('Unit test') { - cmake arguments: "--build " + runtimeBuildPath + " --target test", installation: 'InSearchPath', label: 'Unit tests' - } + stage('Unit test') { + cmake arguments: "--build " + runtimeBuildPath + " --target test", installation: 'InSearchPath', label: 'Unit tests' + } - stage('Install') { - cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' - } + stage('Install') { + cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' } } - - publishChecks(name: checkName, conclusion: 'SUCCESS', summary: 'Completed') } diff --git a/.jenkins/docker-dev-debug-debian-12.Jenkinsfile b/.jenkins/docker-dev-debug-debian-12.Jenkinsfile index 66ce3d1e..f1368737 100644 --- a/.jenkins/docker-dev-debug-debian-12.Jenkinsfile +++ b/.jenkins/docker-dev-debug-debian-12.Jenkinsfile @@ -1,8 +1,5 @@ String configName = "debian-12" String dockerfile = "debian-12.Dockerfile" -String checkName = "docker-dev-debug-image" - -publishChecks(name: checkName, status: 'QUEUED', summary: 'Queued') node { agent { @@ -37,8 +34,6 @@ node { " -f " + runtimeSrcPath + "/.jenkins/" + dockerfile + " " + runtimeSrcPath + "/.jenkins"; - publishChecks(name: checkName, status: 'IN_PROGRESS', summary: 'In progress') - def dockerImage stage('Build') { @@ -56,6 +51,4 @@ node { dockerImage.push("latest") } } - - publishChecks(name: checkName, conclusion: 'SUCCESS', summary: 'Completed') } diff --git a/.jenkins/docker-dev-release-debian-12.Jenkinsfile b/.jenkins/docker-dev-release-debian-12.Jenkinsfile index 5ebf523d..9186264e 100644 --- a/.jenkins/docker-dev-release-debian-12.Jenkinsfile +++ b/.jenkins/docker-dev-release-debian-12.Jenkinsfile @@ -1,8 +1,5 @@ String configName = "debian-12" String dockerfile = "debian-12.Dockerfile" -String checkName = "docker-dev-release-image" - -publishChecks(name: checkName, status: 'QUEUED', summary: 'Queued') node { agent { @@ -37,8 +34,6 @@ node { " -f " + runtimeSrcPath + "/.jenkins/" + dockerfile + " " + runtimeSrcPath + "/.jenkins"; - publishChecks(name: checkName, status: 'IN_PROGRESS', summary: 'In progress') - def dockerImage stage('Build') { @@ -56,6 +51,4 @@ node { dockerImage.push("latest") } } - - publishChecks(name: checkName, conclusion: 'SUCCESS', summary: 'Completed') } diff --git a/.jenkins/package-debian-12.Jenkinsfile b/.jenkins/package-debian-12.Jenkinsfile index 0495a0f0..ab05c4c8 100644 --- a/.jenkins/package-debian-12.Jenkinsfile +++ b/.jenkins/package-debian-12.Jenkinsfile @@ -1,8 +1,5 @@ String configName = "debian-12" String dockerfile = "debian-12.Dockerfile" -String checkName = "package-debian-12" - -publishChecks(name: checkName, status: 'QUEUED', summary: 'Queued') node { agent { @@ -35,8 +32,6 @@ node { " -f " + runtimeSrcPath + "/.jenkins/" + dockerfile + " " + runtimeSrcPath + "/.jenkins"; - publishChecks(name: checkName, status: 'IN_PROGRESS', summary: 'In progress') - def dockerImage stage('Docker image') { @@ -44,27 +39,23 @@ node { } dockerImage.inside() { - withChecks(name: checkName) { - stage("OS information") { - sh "cat /etc/os-release" - } + stage("OS information") { + sh "cat /etc/os-release" + } - stage('Configure') { - cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' - } + stage('Configure') { + cmake arguments: "-S " + runtimeSrcPath + " -B " + runtimeBuildPath + " -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER_TYPE=MOLD -DCMAKE_INSTALL_PREFIX=" + runtimeInstallPath, installation: 'InSearchPath', label: 'Configure' + } - stage('Install') { - cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' - } + stage('Install') { + cmake arguments: "--build " + runtimeBuildPath + " --target install", installation: 'InSearchPath', label: 'Install' + } - stage('Package') { - sh "chmod +x " + runtimeSrcPath + "/.jenkins/package/" + configName + "/build.sh" - sh runtimeSrcPath + "/.jenkins/package/" + configName + "/build.sh " + runtimeSrcPath + " " + runtimeInstallPath + stage('Package') { + sh "chmod +x " + runtimeSrcPath + "/.jenkins/package/" + configName + "/build.sh" + sh runtimeSrcPath + "/.jenkins/package/" + configName + "/build.sh " + runtimeSrcPath + " " + runtimeInstallPath - sshPublisher(publishers: [sshPublisherDesc(configName: 'marco-package', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: configName + "/amd64", remoteDirectorySDF: false, sourceFiles: '*.deb')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) - } + sshPublisher(publishers: [sshPublisherDesc(configName: 'marco-package', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: configName + "/amd64", remoteDirectorySDF: false, sourceFiles: '*.deb')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) } } - - publishChecks(name: checkName, conclusion: 'SUCCESS', summary: 'Completed') } From f839a1171559a3bd84f14c0c7c9a0db91b8cba5f Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Sat, 18 Jan 2025 11:35:50 +0100 Subject: [PATCH 3/3] Move Docker image arguments --- .jenkins/debian-12.Dockerfile | 10 +++++----- .jenkins/fedora-40.Dockerfile | 10 +++++----- .jenkins/ubuntu-22.04.Dockerfile | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.jenkins/debian-12.Dockerfile b/.jenkins/debian-12.Dockerfile index 18b933ce..d9459a4d 100644 --- a/.jenkins/debian-12.Dockerfile +++ b/.jenkins/debian-12.Dockerfile @@ -2,11 +2,6 @@ FROM debian:12 LABEL org.opencontainers.image.source="https://github.com/marco-compiler/marco-runtime" -ARG LLVM_PARALLEL_COMPILE_JOBS=4 -ARG LLVM_PARALLEL_LINK_JOBS=1 -ARG LLVM_BUILD_TYPE=Release -ARG LLVM_ENABLE_ASSERTIONS=OFF - # Install compilation dependencies. RUN apt update -y && \ apt install -y build-essential gfortran ninja-build lld mold cmake ccache \ @@ -17,6 +12,11 @@ COPY ./setup_venv.sh /tmp/ RUN chmod +x /tmp/setup_venv.sh && /tmp/setup_venv.sh # Install LLVM. +ARG LLVM_PARALLEL_COMPILE_JOBS=4 +ARG LLVM_PARALLEL_LINK_JOBS=1 +ARG LLVM_BUILD_TYPE=Release +ARG LLVM_ENABLE_ASSERTIONS=OFF + COPY ./version_llvm.txt /tmp/ COPY ./install_llvm.sh /tmp/ diff --git a/.jenkins/fedora-40.Dockerfile b/.jenkins/fedora-40.Dockerfile index 21317319..d0a18cb2 100644 --- a/.jenkins/fedora-40.Dockerfile +++ b/.jenkins/fedora-40.Dockerfile @@ -2,11 +2,6 @@ FROM fedora:40 LABEL org.opencontainers.image.source="https://github.com/marco-compiler/marco-runtime" -ARG LLVM_PARALLEL_COMPILE_JOBS=4 -ARG LLVM_PARALLEL_LINK_JOBS=1 -ARG LLVM_BUILD_TYPE=Release -ARG LLVM_ENABLE_ASSERTIONS=OFF - # Install compilation dependencies. RUN dnf update -y && \ dnf install -y gcc gcc-c++ gfortran perl ninja-build mold cmake ccache \ @@ -17,6 +12,11 @@ COPY ./setup_venv.sh /tmp/ RUN chmod +x /tmp/setup_venv.sh && /tmp/setup_venv.sh # Install LLVM. +ARG LLVM_PARALLEL_COMPILE_JOBS=4 +ARG LLVM_PARALLEL_LINK_JOBS=1 +ARG LLVM_BUILD_TYPE=Release +ARG LLVM_ENABLE_ASSERTIONS=OFF + COPY ./version_llvm.txt /tmp/ COPY ./install_llvm.sh /tmp/ diff --git a/.jenkins/ubuntu-22.04.Dockerfile b/.jenkins/ubuntu-22.04.Dockerfile index 2d758770..e18fd5c1 100644 --- a/.jenkins/ubuntu-22.04.Dockerfile +++ b/.jenkins/ubuntu-22.04.Dockerfile @@ -2,11 +2,6 @@ FROM ubuntu:22.04 LABEL org.opencontainers.image.source="https://github.com/marco-compiler/marco-runtime" -ARG LLVM_PARALLEL_COMPILE_JOBS=4 -ARG LLVM_PARALLEL_LINK_JOBS=1 -ARG LLVM_BUILD_TYPE=Release -ARG LLVM_ENABLE_ASSERTIONS=OFF - # Install compilation dependencies. RUN apt update -y && \ apt install -y build-essential gfortran ninja-build lld mold cmake ccache \ @@ -17,6 +12,11 @@ COPY ./setup_venv.sh /tmp/ RUN chmod +x /tmp/setup_venv.sh && /tmp/setup_venv.sh # Install LLVM. +ARG LLVM_PARALLEL_COMPILE_JOBS=4 +ARG LLVM_PARALLEL_LINK_JOBS=1 +ARG LLVM_BUILD_TYPE=Release +ARG LLVM_ENABLE_ASSERTIONS=OFF + COPY ./version_llvm.txt /tmp/ COPY ./install_llvm.sh /tmp/