-
Notifications
You must be signed in to change notification settings - Fork 4
144 lines (141 loc) · 5.14 KB
/
build_models.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
# This workflow builds model web assets from model sources
# TODO: Parameterize model source tag ${{env.SRC_TAG}}
name: Build Models Backend
env:
# Model source tag: models are built using this source
SRC_TAG: 'PORTAL_RELEASE_20210718'
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_models:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# TODO: Pass this in from a file
# Vic - Bendigo
- src_name: "GEOMODELS_SRC-Victoria"
model_name: "Bendigo"
# Vic - Otway
- src_name: "GEOMODELS_SRC-Victoria"
model_name: "Otway"
# WA - Windimurra
- src_name: "GEOMODELS_SRC-WesternAust"
model_name: "Windimurra"
# WA - Sandstone
- src_name: "GEOMODELS_SRC-WesternAust"
model_name: "Sandstone"
# SA - Burra Mine
- src_name: "GEOMODELS_SRC-SouthAust"
model_name: "BurraMine"
# SA - Central Flinders
- src_name: "GEOMODELS_SRC-SouthAust"
model_name: "CentralFlinders"
# SA - North Flinders
- src_name: "GEOMODELS_SRC-SouthAust"
model_name: "NorthFlinders"
# SA - North Gawler
- src_name: "GEOMODELS_SRC-SouthAust"
model_name: "NorthGawler"
# SA - Curnamona Sedimentary Basins
- src_name: "GEOMODELS_SRC-SouthAust"
model_name: "CurnamonaSed"
# SA - Western Gawler
- src_name: "GEOMODELS_SRC-SouthAust"
model_name: "WesternGawler"
# Tas - Rosebery Lyell
- src_name: "GEOMODELS_SRC-Tasmania"
model_name: "RoseberyLyell"
# QLD - Quamby
- src_name: "GEOMODELS_SRC-Queensland"
model_name: "Quamby"
# QLD - MtDore
- src_name: "GEOMODELS_SRC-Queensland"
model_name: "MtDore"
# NSW - "Western Tamworth Belt"
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "Tamworth"
# NSW - "Cobar geological and fault model package"
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "Cobar"
# NSW - "Curnamona Province and Delamerian Orogen 3D fault model"
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "Curnamona"
# NSW - "Eastern Lachlan Orogen 3D fault model"
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "EastLachlan"
# NSW - "Western Lachlan Orogen and southern Thomson Orogen 3D fault model"
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "WestLachlan"
# NSW - Southern New England Deep Crustal
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "SthNewEngland"
# NSW - "New England Orogen 3D fault model"
- src_name: "GEOMODELS_SRC-NewSouthWales"
model_name: "NewEngland"
## NT - McArthur Basin
- src_name: "GEOMODELS_SRC-NorthernTerritory"
model_name: "McArthurBasin"
# GA - North Qld
- src_name: "GEOMODELS_SRC-GA"
model_name: "NorthQueensland"
# GA - Yilgarn
- src_name: "GEOMODELS_SRC-GA"
model_name: "Yilgarn"
# GA - Tasmania
- src_name: "GEOMODELS_SRC-GA"
model_name: "Tas"
# CSIRO - RockLea Dome
- src_name: "GEOMODELS_SRC-CSIRO"
model_name: "RockleaDome"
# GA/NCI Stuart Shelf MT model
- src_name: "GEOMODELS_SRC-NCI"
model_name: "StuartShelf"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install COLLADA2GLTF
run: |
mkdir COLLADA2GLTF
pushd COLLADA2GLTF
wget https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.5/COLLADA2GLTF-v2.1.5-linux.zip
unzip COLLADA2GLTF-v2.1.5-linux.zip
popd
- name: Install model sources
run: |
mkdir MODEL_SRC
pushd MODEL_SRC
wget https://github.com/AuScope/geomodel-2-3dweb/releases/download/${{env.SRC_TAG}}/${{matrix.src_name}}.tar.gz
tar xvfz ${{matrix.src_name}}.tar.gz
popd
- name: Install pdm
run: |
python -m pip install --upgrade pip
pip install pdm
- name: Install dependencies
run: |
pdm install
- name: Build
run: |
export COLLADA2GLTF_BIN=`pwd`/COLLADA2GLTF
echo "COLLADA2GLTF_BIN=$COLLADA2GLTF_BIN"
export GEOMODELS_HOME=`pwd`/MODEL_SRC
echo "GEOMODELS_HOME=$GEOMODELS_HOME"
eval $(pdm venv activate)
cd web_build/
./batch_proc.py --model_name=${{matrix.model_name}}
tar cvfz geomodels-${{matrix.model_name}}-web-assets.tar.gz ./geomodels
- name: Upload output
uses: actions/upload-artifact@v4
with:
name: geomodels-${{matrix.model_name}}-web-assets.tar.gz
path: web_build/geomodels-${{matrix.model_name}}-web-assets.tar.gz
if-no-files-found: error