diff --git a/.teamcity/IMODCollector/Project.kt b/.teamcity/IMODCollector/Project.kt index af7cd0bf..fade8ce6 100644 --- a/.teamcity/IMODCollector/Project.kt +++ b/.teamcity/IMODCollector/Project.kt @@ -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) }) diff --git a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64Release.kt b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64Release.kt index 2412123a..d7db27b4 100644 --- a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64Release.kt +++ b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64Release.kt @@ -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" diff --git a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64ReleaseLnx64.kt b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64ReleaseLnx64.kt new file mode 100644 index 00000000..fb347564 --- /dev/null +++ b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64ReleaseLnx64.kt @@ -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") + } +}) diff --git a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64development.kt b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64development.kt index 521176fe..d14e197d 100644 --- a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64development.kt +++ b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64development.kt @@ -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 { @@ -108,7 +108,7 @@ object IMODCollector_X64development : BuildType({ } artifacts(AbsoluteId("Ribasim_Windows_BuildRibasim")) { buildRule = lastSuccessful() - artifactRules = "ribasim_windows.zip!** => ribasim" + artifactRules = "ribasim_windows.zip!** => ." } } diff --git a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64developmentLnx64.kt b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64developmentLnx64.kt index 44b98e05..a0572b5b 100644 --- a/.teamcity/IMODCollector/buildTypes/IMODCollector_X64developmentLnx64.kt +++ b/.teamcity/IMODCollector/buildTypes/IMODCollector_X64developmentLnx64.kt @@ -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!** => ." } } diff --git a/.teamcity/_Self/buildTypes/TestbenchCouplerWin64_2.kt b/.teamcity/_Self/buildTypes/TestbenchCouplerWin64_2.kt index 82b8257b..9268d3e4 100644 --- a/.teamcity/_Self/buildTypes/TestbenchCouplerWin64_2.kt +++ b/.teamcity/_Self/buildTypes/TestbenchCouplerWin64_2.kt @@ -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")