move to other schema location #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Monica Package on Windows | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
# main repository monica | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: "monica" | |
# dependent repository mas-infrastructure | |
- name: Checkout dependent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: zalf-rpm/mas-infrastructure | |
ref: master | |
path: "mas-infrastructure" | |
- name: Checkout dependent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: zalf-rpm/monica-parameters | |
ref: master | |
path: "monica-parameters" | |
- name: Checkout vcpkg | |
uses: actions/checkout@v4 | |
with: | |
repository: microsoft/vcpkg | |
ref: master | |
path: "vcpkg" | |
- name: Debug directory structure | |
run: | | |
echo ${{ github.workspace }} | |
pwd | |
ls | |
ls monica | |
ls mas-infrastructure | |
ls monica-parameters | |
ls vcpkg | |
- name: Set up MSVC compiler | |
uses: microsoft/setup-msbuild@v1.1 | |
with: | |
vs-version: '17.9' | |
msbuild-architecture: 'x64' | |
- name: Install vcpkg dependencies | |
run: | | |
pwd | |
.\vcpkg\bootstrap-vcpkg.bat | |
.\vcpkg\vcpkg install zeromq:x64-windows-static capnproto:x64-windows-static libsodium:x64-windows-static | |
- name: Create build folder | |
working-directory: ./monica | |
run: | | |
pwd | |
mkdir _cmake_win64 | |
- name: Configure CMake | |
working-directory: ./monica/_cmake_win64 | |
run: | | |
pwd | |
cmake -G "Visual Studio 17 2022" .. -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static | |
- name: Build Monica | |
working-directory: ./monica/_cmake_win64 | |
run: | | |
msbuild Monica.sln /p:Configuration=Release /p:Platform=x64 | |
- name: package Monica | |
run: | | |
mkdir monica_${{ github.ref_name }} | |
mkdir monica_${{ github.ref_name }}/bin | |
mkdir monica_${{ github.ref_name }}/documentation | |
mkdir monica_${{ github.ref_name }}/bin/soil | |
mkdir monica_${{ github.ref_name }}/monica-parameters | |
mkdir monica_${{ github.ref_name }}/bin/monica-ini-to-json | |
mkdir monica_${{ github.ref_name }}/projects | |
mkdir monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer | |
mkdir monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python | |
mkdir monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run | |
cp monica-parameters/soil/CapillaryRiseRates.sercapnp monica_${{ github.ref_name }}/bin/soil/ | |
cp monica-parameters/soil/SoilCharacteristicData.sercapnp monica_${{ github.ref_name }}/bin/soil/ | |
cp monica-parameters/soil/SoilCharacteristicModifier.sercapnp monica_${{ github.ref_name }}/bin/soil/ | |
cp monica/_cmake_win64/Release/monica-run.exe monica_${{ github.ref_name }}/bin/ | |
cp monica/_cmake_win64/Release/monica-zmq-proxy.exe monica_${{ github.ref_name }}/bin/ | |
cp monica/_cmake_win64/Release/monica-zmq-server.exe monica_${{ github.ref_name }}/bin/ | |
cp monica/_cmake_win64/Release/monica-capnp-server.exe monica_${{ github.ref_name }}/bin/ | |
cp monica/_cmake_win64/Release/monica-capnp-proxy.exe monica_${{ github.ref_name }}/bin/ | |
cp -r monica-parameters monica_${{ github.ref_name }}/monica-parameters/ | |
cp monica/LICENSE monica_${{ github.ref_name }}/bin/ | |
cp monica/documentation/de_benutzerhandbuch_MONICA_windows.pdf monica_${{ github.ref_name }}/documentation/ | |
cp monica/documentation/en_user_manual_MONICA_windows.pdf monica_${{ github.ref_name }}/documentation/ | |
cp mas-infrastructure/src/python/pkgs/model/monica_io3.py monica_${{ github.ref_name }}/bin/ | |
cp mas-infrastructure/src/python/pkgs/soil/soil_io3.py monica_${{ github.ref_name }}/bin/ | |
cp monica/src/python/monica-ini-to-json/monica-ini-to-json.py monica_${{ github.ref_name }}/bin/monica-ini-to-json/ | |
cp monica/src/python/monica-ini-to-json/conversion-template-sim.json monica_${{ github.ref_name }}/bin/monica-ini-to-json/ | |
cp monica/src/python/monica-ini-to-json/conversion-template-site.json monica_${{ github.ref_name }}/bin/monica-ini-to-json/ | |
cp monica/src/python/monica-ini-to-json/conversion-template-crop.json monica_${{ github.ref_name }}/bin/monica-ini-to-json/ | |
cp -r monica-parameters/crop-residues monica_${{ github.ref_name }}/monica-parameters/ | |
cp -r monica-parameters/crops monica_${{ github.ref_name }}/monica-parameters/ | |
cp -r monica-parameters/mineral-fertilisers monica_${{ github.ref_name }}/monica-parameters/ | |
cp -r monica-parameters/organic-fertilisers monica_${{ github.ref_name }}/monica-parameters/ | |
cp -r monica-parameters/general monica_${{ github.ref_name }}/monica-parameters/ | |
cp -r monica-parameters/soil monica_${{ github.ref_name }}/monica-parameters/ | |
cp monica/installer/Hohenfinow2/crop-min.json monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/ | |
cp monica/installer/Hohenfinow2/site-min.json monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/ | |
cp monica/installer/Hohenfinow2/sim-min.json monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/ | |
cp monica/installer/Hohenfinow2/climate-min.csv monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/ | |
cp monica/installer/Hohenfinow2/python/run-producer.py monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp monica/installer/Hohenfinow2/python/run-consumer.py monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp monica/installer/Hohenfinow2/python/start_monica_server.cmd monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp monica/installer/Hohenfinow2/python/start_consumer.cmd monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp monica/installer/Hohenfinow2/python/start_producer.cmd monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp monica/installer/Hohenfinow2/python/start_producer_consumer_pipeline.cmd monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp mas-infrastructure/src/python/pkgs/soil/soil_io3.py monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp mas-infrastructure/src/python/pkgs/model/monica_io3.py monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/python/ | |
cp monica/installer/Hohenfinow2/python/README_pipeline.md monica_${{ github.ref_name }}/projects/Hohenfinow2-producer-consumer/README.md | |
cp monica/installer/Hohenfinow2/crop.json monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run/ | |
cp monica/installer/Hohenfinow2/site.json monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run/ | |
cp monica/installer/Hohenfinow2/sim.json monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run/ | |
cp monica/installer/Hohenfinow2/climate.csv monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run/ | |
cp monica/installer/Hohenfinow2/python/run_monica.cmd monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run/ | |
cp monica/installer/Hohenfinow2/python/README_single.md monica_${{ github.ref_name }}/projects/Hohenfinow2-single-run/README.md | |
Compress-Archive -Path monica_${{ github.ref_name }}/* -Destination monica_win64_${{ github.ref_name }}.zip |