Skip to content

Update README.md details #21

Update README.md details

Update README.md details #21

Workflow file for this run

# 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