Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team city config linux #343

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .teamcity/IMODCollector/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ object Project : Project({
name = "iMOD_Collector"
description = "Collect iMOD6 coupled components + coupler into a single package"
buildType(IMODCollector_X64Release)
buildType(IMODCollector_X64ReleaseLnx64)
buildType(IMODCollector_X64development)
buildType(IMODCollector_X64developmentLnx64)
})
18 changes: 0 additions & 18 deletions .teamcity/IMODCollector/buildTypes/IMODCollector_X64Release.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,6 @@ object IMODCollector_X64Release : BuildType({
}

steps {
script {
name = "Create imod_collector conda environment"
id = "Create_imod_collector_conda_environment"
enabled = false
scriptContent = """
if exist "%conda_env_path%" rd /q /s "%conda_env_path%"
conda env create --file coupler/environment-minimal.yml -p "%conda_env_path%"
""".trimIndent()
}
script {
name = "Install iMOD Coupler"
enabled = false
workingDir = "coupler"
scriptContent = """
call conda activate %conda_env_path%
call pip install -e .
""".trimIndent()
}
script {
name = "Create executable with pyinstaller"
workingDir = "coupler"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package IMODCollector.buildTypes

import _Self.vcsRoots.ImodCoupler
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.buildFeatures.PullRequests
import jetbrains.buildServer.configs.kotlin.buildFeatures.commitStatusPublisher
import jetbrains.buildServer.configs.kotlin.buildFeatures.pullRequests
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import jetbrains.buildServer.configs.kotlin.triggers.finishBuildTrigger

object IMODCollector_X64ReleaseLnx64 : BuildType({
name = "x64_Release_lnx64"
description = "Collect all Release_x64 kernels in the iMOD6 suite"

artifactRules = """
coupler/dist/ => imod_collector.zip!/
modflow6/ => imod_collector.zip!/modflow6/
metaswap/ => imod_collector.zip!/metaswap/
ribasim/ => imod_collector.zip!/ribasim/
""".trimIndent()

params {
param("conda_env_path", "%system.teamcity.build.checkoutDir%/imod_collector_env")
}

vcs {
root(_Self.vcsRoots.ImodCoupler, "+:. => ./coupler")

cleanCheckout = true
}

steps {
script {
name = "Create executable with pyinstaller"
workingDir = "./coupler"
scriptContent = """
#!/bin/bash
source /usr/share/Modules/init/profile.sh
module load pixi
rm -rf dist
pixi run -e dev install-minimal
pixi run -e dev pyinstaller --onefile imod_coupler/__main__.py --name imodc
""".trimIndent()
}
script {
name = "Get version from imod coupler"
id = "RUNNER_1232"
scriptContent = "./coupler/dist/imodc --version"
}
script {
name = "Download Release MODFLOW 6.5.0"
scriptContent = """
curl -L -o mf6.5.0_linux.zip https://github.com/MODFLOW-USGS/modflow6/releases/download/6.5.0/mf6.5.0_linux.zip
unzip -j "mf6.5.0_linux.zip" -d modflow6 mf6.5.0_linux/bin/libmf6.so
""".trimIndent()
}
script {
name = "Download Release Ribasim v2024.11.0"
scriptContent = """
curl -L -o ribasim_linux.zip https://github.com/Deltares/Ribasim/releases/download/v2024.11.0/ribasim_linux.zip
unzip "ribasim_linux.zip"
""".trimIndent()
}
}

dependencies {
artifacts(AbsoluteId("MSWMOD_MetaSWAP_MetaSWAPDevelopLnx64")) {
cleanDestination = true
buildRule = tag("release_2410")
artifactRules = "libmsw.so => metaswap/"
}
}

requirements {
equals("env.OS", "Linux", "RQ_341")
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ object IMODCollector_X64development : BuildType({
description = "Collect all Release_x64 kernels in the iMOD6 suite"

artifactRules = """
coupler/dist/ => imod_collector.zip!/imod_coupler/
coupler/dist/ => imod_collector.zip!/
modflow6/ => imod_collector.zip!/modflow6/
metaswap/ => imod_collector.zip!/metaswap/
ribasim/ribasim/ => imod_collector.zip!/ribasim/
ribasim/ => imod_collector.zip!/ribasim/
""".trimIndent()

params {
Expand Down Expand Up @@ -108,7 +108,7 @@ object IMODCollector_X64development : BuildType({
}
artifacts(AbsoluteId("Ribasim_Windows_BuildRibasim")) {
buildRule = lastSuccessful()
artifactRules = "ribasim_windows.zip!** => ribasim"
artifactRules = "ribasim_windows.zip!** => ."
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ object IMODCollector_X64developmentLnx64 : BuildType({
artifacts(AbsoluteId("Ribasim_Linux_BuildRibasim")) {
id = "ARTIFACT_DEPENDENCY_285"
buildRule = lastSuccessful()
artifactRules = "libribasim.zip!** => ribasim"
artifactRules = "ribasim_linux.zip!** => ."
}
}

Expand Down
2 changes: 1 addition & 1 deletion .teamcity/_Self/buildTypes/TestbenchCouplerWin64_2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object TestbenchCouplerWin64_2 : BuildType({
param("env.METASWAP_DLL_DEP_DIR_REGRESSION", "%system.teamcity.build.checkoutDir%/imod_collector_regression/metaswap")
param("env.METASWAP_DLL_DEVEL", "%system.teamcity.build.checkoutDir%/imod_collector_devel/metaswap/MetaSWAP.dll")
param("env.METASWAP_DLL_DEP_DIR_DEVEL", "%system.teamcity.build.checkoutDir%/imod_collector_devel/metaswap")
param("env.IMOD_COUPLER_EXEC_DEVEL", "%system.teamcity.build.checkoutDir%/imod_collector_devel/imod_coupler/imodc.exe")
param("env.IMOD_COUPLER_EXEC_DEVEL", "%system.teamcity.build.checkoutDir%/imod_collector_devel/imodc.exe")
param("env.RIBASIM_DLL_DEP_DIR_REGRESSION", "%system.teamcity.build.checkoutDir%/imod_collector_regression/ribasim/bin")
param("env.METASWAP_LOOKUP_TABLE", "%system.teamcity.build.checkoutDir%/lookup_table")
param("env.RIBASIM_DLL_REGRESSION", "%system.teamcity.build.checkoutDir%/imod_collector_regression/ribasim/bin/libribasim.dll")
Expand Down
Loading