-
Notifications
You must be signed in to change notification settings - Fork 18
153 lines (125 loc) · 4.75 KB
/
windows_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Build Test Package Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
WINDIR: C:\Windows
CMAKE_PATH: C:\Program Files\CMake\bin
jobs:
build-test-package:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: config env variables
run: |
echo "CYGWIN_ROOT=${{github.workspace}}\cygwin64" >> $env:GITHUB_ENV
echo "OSGEO4W_ROOT=${{github.workspace}}\OSGEO4W" >> $env:GITHUB_ENV
echo "GDAL_ROOT=${{github.workspace}}\OSGEO4W" >> $env:GITHUB_ENV
echo "MDAL_ROOT=${{github.workspace}}\MDAL_Install" >> $env:GITHUB_ENV
echo "GMSH_BUILT=${{github.workspace}}\GMSH_Built" >> $env:GITHUB_ENV
echo "QGIS_SRC=${{github.workspace}}\QGIS" >> $env:GITHUB_ENV
echo "QGIS_BUILDING=${{github.workspace}}\QGIS_building" >> $env:GITHUB_ENV
echo "QGIS_BUILT=${{github.workspace}}\QGIS_install" >> $env:GITHUB_ENV
echo "REOS_SOURCE=${{github.workspace}}" >> $env:GITHUB_ENV
echo "REOS_BUILDING=${{github.workspace}}\REOS_build" >> $env:GITHUB_ENV
echo "REOS_INSTALL=${{github.workspace}}\REOS_Install" >> $env:GITHUB_ENV
echo "NSI_DESTINATION=${{github.workspace}}" >> $env:GITHUB_ENV
echo "LEKAN_EXPERIMENTAL_VERSION=$(git rev-parse --short HEAD)" >> $env:GITHUB_ENV
- name: Cache CYGWIN
id: cache-cygwin
uses: actions/cache@v3
with:
path: ${{env.CYGWIN_ROOT}}
key: ${{ runner.os }}-cygwin
- name: load CYGWIN
if: steps.cache-cygwin.outputs.cache-hit != 'true'
run: ./windows/load_cygwin.ps1
- name: Cache OSGEO
id: cache-osgeo
uses: actions/cache@v3
with:
path: ${{env.OSGEO4W_ROOT}}
key: ${{ runner.os }}-osgeo4w
- name: load OSGEO dependencies
if: steps.cache-osgeo.outputs.cache-hit != 'true'
run: ./windows/load_osgeo.ps1
- name: clone QGIS
uses: actions/checkout@v3
with:
repository: vcloarec/QGIS
path: QGIS
ref: forLekanMaster
- name: check QGIS hash
id: getQgisHash
run: |
cd QGIS
$QGIS_HASH=git rev-parse HEAD
echo "qgis_hash=$QGIS_HASH" >> $env:GITHUB_ENV
- name: clone MDAL
uses: actions/checkout@v3
with:
repository: lutraconsulting/MDAL
path: MDAL
- name: check MDAL hash
id: getMdalHash
run: |
cd MDAL
$MDAL_HASH=git rev-parse HEAD
echo "mdal_hash=$MDAL_HASH" >> $env:GITHUB_ENV
- name: Cache QGIS
id: cache-qgis
uses: actions/cache@v3
with:
path: ${{env.QGIS_BUILT}}
key: ${{ runner.os }}-qgis-${{env.qgis_hash}}
- name: build QGIS
if: steps.cache-qgis.outputs.cache-hit != 'true'
run: ./windows/qgis_env_before_powershell.bat "./windows/build_QGIS.ps1"
- name: Cache MDAL
id: cache-mdal
uses: actions/cache@v3
with:
path: ${{env.MDAL_ROOT}}
key: ${{ runner.os }}-mdal-${{env.mdal_hash}}
- name: build MDAL
if: steps.cache-mdal.outputs.cache-hit != 'true'
run: ./windows/qgis_env_before_powershell.bat "./windows/build_MDAL.ps1"
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
with:
cache: false
- name: Cache GMSH
id: cache-gmsh
uses: actions/cache@v3
with:
path: ${{env.GMSH_BUILT}}
key: ${{ runner.os }}-gmsh
- name: build GMSH
if: steps.cache-gmsh.outputs.cache-hit != 'true'
run: ./windows/load_build_gmsh.ps1
- name: config FORTRAN path
run: echo "FORTRAN_COMPILER_PATH=${{env.INTEL_HPCKIT_INSTALL_PATH}}\compiler\${{env.INTEL_COMPILER_VERSION}}" >> $env:GITHUB_ENV
- name: install hecras
run: |
Invoke-WebRequest -Uri "https://github.com/HydrologicEngineeringCenter/hec-downloads/releases/download/1.0.26/HEC-RAS_631_Setup.exe" -OutFile "hec_inst.exe"
Start-Process hec_inst.exe -ArgumentList "/S /v/qn" -Wait
ls
- name: build and test REOS
run: ./windows/build_tests_REOS.bat
- name: Create installer
uses: joncloud/[email protected]
with:
script-file: ${{github.workspace}}/package/ms-windows/nsi/lekan_exp.nsi
arguments: "/V4"
- name: Check installer
run: |
ls
ls ${{env.NSI_DESTINATION}}
- name: Archive installer
uses: actions/upload-artifact@v3
with:
name: Lekan Windows Installer
path: ${{env.NSI_DESTINATION}}\Lekan-${{env.LEKAN_EXPERIMENTAL_VERSION}}-install-win64.exe