Skip to content

master @ 7.1.2

master @ 7.1.2 #544

name: CompileWindows
on:
# pull_request:
workflow_dispatch:
inputs:
fstuple:
type: string
default: '{ "base":"6.6.17", "repo":"FirestormViewer/phoenix-firestorm", "branch": "Firestorm_6.6.17" }'
options: |
{ "base":"6.6.17", "repo":"FirestormViewer/phoenix-firestorm", "branch": "Firestorm_6.6.17" }
{ "base":"7.1.2", "repo":"FirestormViewer/phoenix-firestorm-alpha", "branch": "master" }
{ "base":"7.1.2", "repo":"Sgeo/phoenix-firestorm-alpha", "branch": "VR_Sgeo_2024" }
{ "base":"7.1.4", "repo":"FirestormViewer/phoenix-firestorm", "branch": "7.1.4_Mar14_preview" }
run-name: ${{ fromJSON(inputs.fstuple).branch }} @ ${{ fromJSON(inputs.fstuple).base }}
# shell: bash
#bash --noprofile --norc -e -o pipefail ./SHELL.sh {0}
# shell: c:/PROGRA~1/Git/usr/bin/bash.exe --noprofile --norc -e -o pipefail ./SHELL.sh {0}
# shell: c:\Program Files\Git\usr\bin\bash.exe --noprofile --norc -e -o pipefail {0}
# shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -e -o pipefail {0}
defaults:
run:
shell: c:/PROGRA~1/Git/usr/bin/bash.exe --noprofile --norc -e -o pipefail {0}
env:
BASH_ENV: ${{ github.workspace }}/SHELL.env
# SHELL: c:/PROGRA~1/Git/usr/bin/bash.exe --noprofile --norc -e -o pipefail {0}
jobs:
windows_build:
runs-on: windows-2022
steps:
# no-ops that pre-populate upload-artifact, restore-only and save-only in /d/a/_actions/actions
- uses: actions/upload-artifact@v4
with:
name: my-artifact
path: /invalid/path
if-no-files-found: ignore
- uses: actions/cache/restore@v4
# - uses: actions/cache@v4
with:
lookup-only: true
key: /dev/null
path: /dev/null
- name: Output Inputs
run: |
echo '${{ github.event.inputs.fstuple }}'
echo '${{ fromJSON(github.event.inputs.fstuple) }}'
echo '${{ inputs.fstuple }}' | jq -r 'to_entries[]|[.key,.value]|join("=")' | tee -a $GITHUB_ENV
- name: Clone
run: |
mkdir -pv bin cache repo build
git clone --quiet --filter=tree:0 --single-branch --branch ${GITHUB_REF_NAME} https://github.com/${GITHUB_REPOSITORY} fsvr
- name: Generate SHELL.env
run: |
fsvr_dir=$PWD/fsvr fsvr/gha-generate-shell-env.sh | tee -a SHELL.env
fsvr/util/_utils.sh ht-ln fsvr/actions-node-script ./fsvr-action
# - name: SHELL.env test 0
# run: echo fsvr_dir=$fsvr_dir "${BASH_SOURCE[@]}"
#
# - name: SHELL.sh env test
# run: |
# env bash -c 'echo PWD=$PWD'
# env bash -c 'echo PATH=$PATH'
# declare -f tee | head -1
- name: Initial Bootstrapping
run: |
declare -f tee | head -1
(
set -x
( echo stdout ; echo stderr >&2 ) | tee /dev/stderr >/dev/null
[[ "$((( echo stdout ; echo stderr >&2 ) | tee /dev/stderr) 2>&1)" =~ stderr.*stdout.*stdout ]] || exit 83
)
exit 0
- name: ./fsvr-action test
uses: ./fsvr-action
with:
# shell: c:/PROGRA~1/Git/usr/bin/bash.exe --noprofile --norc -e -o pipefail {0}
environment: |
*=process.env
run: |
declare -f tee | head -1 || echo " no tee?"
a=c
test "$(echo 'a=$a' | envsubst)" == 'a=' || exit 97
export a=c
test "$(echo 'a=$a' | envsubst)" == 'a=c' || exit 99
test "$(echo 'a=$a' | env envsubst)" == 'a=c' || exit 100
test "$(echo 'a=$a' | env a=b envsubst)" == 'a=b' || exit 101
set -x
declare -f tee | head -1
# - name: ./fsvr-action 2test
# uses: ./fsvr-action
# with:
# environment: |
# ${{ github.event.inputs.fstuple }}
# *=process.env
# run: |
# declare -f tee | head -1 || echo " no tee?"
# export a=b
# echo 'a=$a' | env a=b envsubst
- name: GHA Bootstrapping
uses: ./fsvr-action
with:
environment: '*=process.env'
run: |
set -aEuo pipefail
echo "[gha-bootstrap] GITHUB_ACTIONS=$GITHUB_ACTIONS" >&2
function xxtest_bin() {
declare -f ninja | head -1 || return 195
test -f bin/parallel-home/will-cite || return 196
parallel --version | head -1 || return 197
ninja --version || return 198
[[ `hostname` =~ windows[-]?2022 ]] || return 199
}
fsvr_repo=${GITHUB_REPOSITORY}
fsvr_branch=${GITHUB_REF_NAME}
fsvr_base=$base
# fsvr_dir=${fsvr_dir:-$pwd/repo/fsvr}
source $fsvr_dir/gha-bootstrap.sh
restore_gha_caches || exit `_err $? "!restore_gha_caches"`
ensure_gha_bin && xxtest_bin || exit `_err $? "!ensure_gha_bin"`
initialize_firestorm_checkout || exit `_err $? "!firestorm_checkout"`
save_gha_caches || exit `_err $? "!save_gha_caches"`;
get_bootstrap_vars | tee gha-bootstrap.env || exit 127
exit 0
- name: PATH/ENV preflight tests
run: |
jq --version
test `hostname` == "windows-2022" || exit 2022
test -v nunja_dir || exit 122
test -d "$nunja_dir" || exit 123
echo 'test $a' | env a=b envsubst || exit 124
- name: Generate Build Vars
run: |
set -euo pipefail
echo fsvr_dir=$fsvr_dir
export root_dir=repo/$branch
$fsvr_dir/util/_utils.sh ht-ln $root_dir/indra indra
$fsvr_dir/util/generate_build_vars.sh Firestorm-VR-GHA `cat $fsvr_dir/$base/viewer_version.txt` build/ \
| tee build/build_vars.env #| tee $GITHUB_ENV
- name: Detect MSVC
run: $fsvr_dir/util/generate_msvc_env.bat > build/msvc.env
- name: 010_ensure_build_directories
run: fsvr_step 010
- name: 020_perform_replacements
run: fsvr_step 020
- name: 038_provision_openvr
uses: ./fsvr-action
with:
environment: '*=process.env'
run: |
set -Euo pipefail
tarball=$fsvr_cache_dir/openvr-v1.6.10.8eaf723.tar.bz2
export INPUT_key=$base-cache-openvr-d INPUT_path=cache/openvr-**
/c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/restore-only/index.js \
| grep -i 'cache restored' && { echo 'yup' ; ls -l $fsvr_cache_dir ; } || {
echo 'nope'
fsvr_step 038_provision_openvr || exit 38
/c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/save-only/index.js
}
- name: 039_provision_p373r
run: fsvr_step 039
- name: 040_generate_package_infos
run: fsvr_step 040
- name: 050_generate_packages_info_text
run: fsvr_step 050
#
# - name: 060_download_packages
# run: fsvr_step 060
#
# - name: 070_verify_downloads
# run: fsvr_step 070
#
- name: 080_untar_packages
uses: ./fsvr-action
with:
environment: '*=process.env'
run: |
set -Euo pipefail
export INPUT_key=$base-build-packages-c INPUT_path=build/packages
/c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/restore-only/index.js \
| grep -i 'cache restored' && echo 'yup' || {
echo 'nope'
fsvr_step 060_download_packages || exit 60
fsvr_step 070_verify_downloads || exit 70
fsvr_step 080_untar_packages || exit 80
/c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/save-only/index.js
}
#
# - name: 070_verify_downloads
# run: fsvr_step 070
# - name: 080_untar_packages
# run: fsvr_step 080
- name: 085_prepare_msys_msvc
run: fsvr_step 085
- name: 090_ninja_preflight
run: fsvr_step 090
- name: 0a0_ninja_build SLPlugin.exe
run: fsvr_step 0a0 SLPlugin.exe
- name: 0a0_ninja_build firestorm-bin.exe
run: fsvr_step 0a0 firestorm-bin.exe
- name: 0a0_ninja_build llpackage
run: fsvr_step 0a0 llpackage
- name: 0b0_bundle
run: fsvr_step 0b0
- name: 0c0_upload_artifacts
uses: ./fsvr-action
with:
environment: '*=process.env'
run: fsvr_step 0c0
- name: log env on error
if: failure()
uses: ./fsvr-action
with:
environment: '*=process.env'
run: |
declare -xp > declare.txt
env > env.txt
./fsvr/util/_utils.sh upload_artifact debug "$(cat <<EOF
declare.txt
env.txt
gha-bootstrap.env
SHELL.env
build/build_vars.env
build/msvc.env
build/msvc.nunja.env
EOF
)"
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
#
#
# - name: Setup tmate session
# if: failure()
# uses: mxschmitt/action-tmate@v3
# env:
# PATH: /c/msys64/usr/bin:${{ env.PATH}}
# with:
# limit-access-to-actor: true