Skip to content

Commit

Permalink
Merge branch 'main' into allocation_beyond_max_flow
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Oct 18, 2023
2 parents 9d4dea5 + 85436af commit d64024b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 62 deletions.
39 changes: 8 additions & 31 deletions .teamcity/Ribasim_Ribasim/buildTypes/BuildRibasimCliWindows.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,19 @@
<param name="julia" value="%env.JULIA_1_9%" />
</parameters>
<build-runners>
<runner id="RUNNER_1990" name="Set up virtual environment" type="simpleRunner">
<runner id="RUNNER_2418" name="Set up pixi" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[if exist "%conda_env_path%" rd /q /s "%conda_env_path%"
call conda env create -f environment.yml --prefix "%conda_env_path%"]]></param>
<param name="script.content" value="pixi run install" />
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_1991" name="Install Python packages" type="simpleRunner">
<runner id="RUNNER_2420" name="Build binary" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call pip install --editable "python/ribasim"
call pip install --editable "python/ribasim_testmodels"]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_1992" name="Prepare model input" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call python utils/generate-testmodels.py]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_1984" name="Instantiate environment" type="simpleRunner">
<parameters>
<param name="script.content" value="%julia% --project --eval &quot;using Pkg; Pkg.instantiate()&quot;" />
<param name="teamcity.build.workingDir" value="build/create_binaries" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_551" name="Build executable" type="simpleRunner">
<parameters>
<param name="script.content" value="%julia% --project create_app.jl" />
<param name="teamcity.build.workingDir" value="build/create_binaries" />
<param name="script.content"><![CDATA[set Path=d:\ProgramData\julia/julia-1.9.0/bin/;%env.Path%
pixi run build-libribasim]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
Expand Down Expand Up @@ -113,3 +89,4 @@ call python utils/generate-testmodels.py]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,19 @@
<param name="julia" value="%env.JULIA_1_9%" />
</parameters>
<build-runners>
<runner id="RUNNER_1955" name="Set up virtual environment" type="simpleRunner">
<runner id="RUNNER_2415" name="Set up pixi" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[if exist "%conda_env_path%" rd /q /s "%conda_env_path%"
call conda env create -f environment.yml --prefix "%conda_env_path%"]]></param>
<param name="script.content" value="pixi run install" />
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_1956" name="Install Python packages" type="simpleRunner">
<runner id="RUNNER_2416" name="Build binary" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call pip install --editable "python/ribasim"
call pip install --editable "python/ribasim_testmodels"]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_1967" name="Prepare model input" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call python utils/generate-testmodels.py]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_1984" name="Instantiate environment" type="simpleRunner">
<parameters>
<param name="script.content" value="%julia% --project --eval &quot;using Pkg; Pkg.instantiate()&quot;" />
<param name="teamcity.build.workingDir" value="build/create_binaries" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_551" name="Build shared library" type="simpleRunner">
<parameters>
<param name="script.content" value="%julia% --project create_lib.jl" />
<param name="teamcity.build.workingDir" value="build/create_binaries" />
<param name="script.content"><![CDATA[set Path=d:\ProgramData\julia/julia-1.9.0/bin/;%env.Path%
pixi run build-libribasim]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
Expand Down Expand Up @@ -103,3 +79,4 @@ call python utils/generate-testmodels.py]]></param>
<cleanup />
</settings>
</build-type>

3 changes: 3 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ lint = { depends_on = [
"mypy-ribasim-api",
] }
# Build
instantiate-build-environment = "cd build/create_binaries && julia --project --eval \"using Pkg; Pkg.instantiate()\""
build-ribasim-cli = { cmd = "cd build/create_binaries && julia --project create_app.jl", depends_on = [
"generate-testmodels",
"instantiate-build-environment",
] }
build-libribasim = { cmd = "cd build/create_binaries && julia --project create_lib.jl", depends_on = [
"generate-testmodels",
"instantiate-build-environment",
] }
build = { depends_on = ["build-ribasim-cli", "build-libribasim"] }
# Test
Expand Down

0 comments on commit d64024b

Please sign in to comment.