diff --git a/.github/actions/before-script/action.yml b/.github/actions/before-script/action.yml index 5d8ff1a..8ecfb55 100644 --- a/.github/actions/before-script/action.yml +++ b/.github/actions/before-script/action.yml @@ -23,23 +23,20 @@ runs: poetry install cd "$GITHUB_WORKSPACE" - git clone https://gitlab.sintef.no/harald.svendsen/timeseries.git - cd "$GITHUB_WORKSPACE/timeseries" + cd "$GITHUB_WORKSPACE/submodules/wind_power_timeseries" poetry install cd "$GITHUB_WORKSPACE" - git clone https://github.com/iDesignRES/Tecnalia.git - cd "$GITHUB_WORKSPACE/Tecnalia/examples/pv_power_plants" + cd "$GITHUB_WORKSPACE/submodules/Tecnalia/examples/pv_power_plants" poetry install - cd "$GITHUB_WORKSPACE/Tecnalia/examples/building_energy_process" + cd "$GITHUB_WORKSPACE/submodules/Tecnalia/examples/building_energy_process" poetry install cd "$GITHUB_WORKSPACE" - git clone https://github.com/iDesignRES/CHP_modelling.git - cd "$GITHUB_WORKSPACE/CHP_modelling" + cd "$GITHUB_WORKSPACE/submodules/CHP_modelling" mkdir build cd build cmake .. make cd "$GITHUB_WORKSPACE" - shell: bash \ No newline at end of file + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18597ca..fea9768 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,8 @@ jobs: arch: x64 steps: - uses: actions/checkout@v4 + with: + submodules: true # Fetch the submodules - uses: ./.github/actions/before-script - uses: julia-actions/setup-julia@v2 with: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 212f916..d5c701f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + submodules: true # Fetch the submodules - uses: ./.github/actions/before-script - uses: julia-actions/setup-julia@latest with: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c721335 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "submodules/Tecnalia"] + path = submodules/Tecnalia + url = https://github.com/iDesignRES/Tecnalia.git +[submodule "submodules/wind_power_timeseries"] + path = submodules/wind_power_timeseries + url = https://gitlab.sintef.no/harald.svendsen/wind_power_timeseries.git +[submodule "submodules/CHP_modelling"] + path = submodules/CHP_modelling + url = https://github.com/iDesignRES/CHP_modelling.git diff --git a/submodules/CHP_modelling b/submodules/CHP_modelling new file mode 160000 index 0000000..6b0f0f9 --- /dev/null +++ b/submodules/CHP_modelling @@ -0,0 +1 @@ +Subproject commit 6b0f0f98bb9cf366f29c0fb8146f1f4babe28965 diff --git a/submodules/Tecnalia b/submodules/Tecnalia new file mode 160000 index 0000000..3319330 --- /dev/null +++ b/submodules/Tecnalia @@ -0,0 +1 @@ +Subproject commit 33193307f8ae55e6d0429428e464954ee6f80f0d diff --git a/submodules/wind_power_timeseries b/submodules/wind_power_timeseries new file mode 160000 index 0000000..6511abb --- /dev/null +++ b/submodules/wind_power_timeseries @@ -0,0 +1 @@ +Subproject commit 6511abb340cec4e0630e9f8b3e2bbd6d4096d841 diff --git a/test/test_CSPandPV.jl b/test/test_CSPandPV.jl index d803817..1cc5a6f 100644 --- a/test/test_CSPandPV.jl +++ b/test/test_CSPandPV.jl @@ -19,11 +19,8 @@ using Dates T = TwoLevel(sp_duration, operational_periods; op_per_strat = 8760.0) # Load paths to default Buildings process and authentication files - project_path = joinpath(@__DIR__, "..", "Tecnalia") - if !isdir(project_path) - project_path = joinpath(@__DIR__, "..", "..", "Tecnalia") - end - project_path = joinpath(project_path, "examples", "pv_power_plants") + project_path = + joinpath(@__DIR__, "..", "submodules", "Tecnalia", "examples", "pv_power_plants") path_to_auth_file_csp_pv = joinpath(project_path, "auth.json") auth_pay_load_csp_pv = JSON.parsefile(path_to_auth_file_csp_pv) diff --git a/test/test_bioCHP.jl b/test/test_bioCHP.jl index 78eb483..b394980 100644 --- a/test/test_bioCHP.jl +++ b/test/test_bioCHP.jl @@ -40,11 +40,15 @@ using EnergyModelsHeat BioBirchStem => 0.3, BioSpruceTB => 0.4, ) - libpath = joinpath(@__DIR__, "..", "CHP_modelling") - if !isdir(libpath) - libpath = joinpath(@__DIR__, "..", "..", "CHP_modelling") - end - libpath = joinpath(libpath, "build", "lib", "libbioCHP_wrapper.so") + libpath = joinpath( + @__DIR__, + "..", + "submodules", + "CHP_modelling", + "build", + "lib", + "libbioCHP_wrapper.so", + ) bio_chp = BioCHP( "Bio CHP plant", diff --git a/test/test_buildings.jl b/test/test_buildings.jl index 094458f..7500d9a 100644 --- a/test/test_buildings.jl +++ b/test/test_buildings.jl @@ -28,11 +28,14 @@ using Dates T = TwoLevel(sp_duration, operational_periods; op_per_strat = 8760.0) # Load paths to default Buildings process and authentication files - project_path = joinpath(@__DIR__, "..", "Tecnalia") - if !isdir(project_path) - project_path = joinpath(@__DIR__, "..", "..", "Tecnalia") - end - project_path = joinpath(project_path, "examples", "building_energy_process") + project_path = joinpath( + @__DIR__, + "..", + "submodules", + "Tecnalia", + "examples", + "building_energy_process", + ) path_to_auth_file_buildings = joinpath(project_path, "auth.json") auth_pay_load_buildings = JSON.parsefile(path_to_auth_file_buildings)