tpv-gha-nunja | fs-7.1.6-avx2 @ 7.1.6_1st_preview #631
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: CompileWindows | |
on: | |
workflow_dispatch: | |
inputs: | |
fstuple: | |
type: string | |
required: true | |
run-name: ${{ github.ref_name }} | ${{ fromJSON(inputs.fstuple).base }} @ ${{ fromJSON(inputs.fstuple).ref }} | |
defaults: | |
run: | |
shell: c:/PROGRA~1/Git/usr/bin/bash.exe --noprofile --norc -e -o pipefail {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} | |
env: | |
BASH_ENV: ${{ github.workspace }}\SHELL.env | |
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 | |
. $GITHUB_ENV | |
test -v base || exit 44 | |
test -v repo || exit 45 | |
test -v ref || exit 46 | |
- name: Clone && Generate SHELL.env | |
run: | | |
set -Euo pipefail | |
mkdir -pv env.d bin bin/pystuff cache repo build | |
git clone --quiet --filter=tree:0 --single-branch --branch ${GITHUB_REF_NAME} https://github.com/${GITHUB_REPOSITORY} fsvr | |
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: 000 Setup tmate session | |
if: fromJSON(inputs.fstuple).pause == '000' | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
- name: Generate gha-bootstrap.env | |
run: | | |
source fsvr/gha-bootstrap.sh | |
get_bootstrap_vars | tee env.d/gha-bootstrap.env || exit 127 | |
- name: 001 Setup tmate session | |
if: fromJSON(inputs.fstuple).pause == '001' | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
- name: Populate local bin/ | |
uses: ./fsvr-action | |
with: | |
run: | | |
test -d "$fsvr_dir" || exit 63 | |
{ | |
source fsvr/bashland/gha.alias-exe.bash | |
BASH=$(cygpath -was $BASH) make-stub bin/BASH_FUNC_invoke.exe | |
fsvr/util/_utils.sh ht-ln bin/BASH_FUNC_invoke.exe bin/ht-ln.exe | |
ht-ln bin/BASH_FUNC_invoke.exe bin/hostname.exe | |
ht-ln bin/BASH_FUNC_invoke.exe bin/jq.exe | |
} | |
source $fsvr_dir/util/gha.cachette.bash | |
function xxtest_bin() { | |
test -f bin/parallel-home/will-cite || return 196 | |
parallel -- --version | head -1 || return 197 | |
ninja --version | head -1 || return 198 | |
[[ `hostname` =~ windows[-]?2022 ]] || return 199 | |
jq --version | head -1 || return 200 | |
which parallel.exe | |
which colout | |
which jq | |
} | |
gha-cache-restore $base-bin-b bin || ( | |
set -Euo pipefail | |
source fsvr/gha-bootstrap.sh | |
source $fsvr_dir/util/gha.literally-exists.bash | |
pysite="$(cygpath -m "$(python3 -msite --user-site)")" | |
literally-exists bin/ninja.exe || get_ninja || exit `_err $? "failed to provision ninja $?"` | |
literally-exists $pysite/colout || get_colout || exit `_err $? "failed to provision colout $?"` | |
literally-exists bin/parallel || get_parallel || exit `_err $? "failed to provision parallel $?"` | |
literally-exists bin/colout.exe || ht-ln bin/BASH_FUNC_invoke.exe bin/colout.exe | |
literally-exists bin/parallel.exe || ht-ln bin/BASH_FUNC_invoke.exe bin/parallel.exe | |
# note: autobuild is not necessary here, but viewer_manifest still depends on python-llsd | |
python -m pip install --no-warn-script-location --user llsd | |
xxtest_bin || exit `_err $? "!xxtest_bin"` | |
gha-cache-save $base-bin-b bin || exit 85 | |
) | |
- name: 002 Setup tmate session | |
if: fromJSON(inputs.fstuple).pause == '002' | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
- name: Expand Source Repositories | |
uses: ./fsvr-action | |
with: | |
run: | | |
source $fsvr_dir/util/gha.cachette.bash | |
source $fsvr_dir/util/gha.quiet-clone.bash | |
gha-cache-restore $cache_id-repo-viewer repo/viewer || ( | |
set -Euo pipefail | |
test -e repo/viewer/.git || quiet-clone ${hub:-github.com} $repo $ref repo/viewer | |
gha-cache-save $cache_id-repo-viewer repo/viewer || exit 107 | |
) | |
gha-cache-restore $cache_id-repo-p373r repo/p373r || ( | |
set -Euo pipefail | |
test -e repo/p373r/.git || quiet-clone github.com ${GITHUB_REPOSITORY} P373R_6.6.8 repo/p373r | |
gha-cache-save $cache_id-repo-p373r repo/p373r || exit 143 | |
) | |
repos="$(for id in repo/viewer repo/p373r ; do | |
echo "| ./$id | $(git -C $id describe --all --always) |" | |
done)" | |
tools="$(for id in jq ninja parallel bash ; do | |
echo "| $id | $($id --version | head -1 || true) |" | |
done)" | |
cat <<EOF >> $GITHUB_STEP_SUMMARY | |
| name | value | | |
| --------- | ----------- | | |
| viewer_id | $viewer_id | | |
| viewer_name | $viewer_name | | |
| base | $base | | |
| hub | $hub | | |
| repo | $repo | | |
| ref | $ref | | |
| build_id | $build_id | | |
| cache_id | $cache_id | | |
| hostname | `hostname` | | |
$repos | |
$tools | |
EOF | |
- name: 003 Setup tmate session | |
if: fromJSON(inputs.fstuple).pause == '003' | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
# - name: fsvr-action args test | |
# uses: ./fsvr-action | |
# with: | |
# environment: foo=bar | |
# args: An argument string ${{ inputs.fstuple }} | |
# run: | | |
# echo ok 1=$1 2=$2 args="$(echo "$@")" | |
- 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 | |
test $(echo 'test-$a' | eval "a=b envsubst") == test-b || exit 124 | |
- name: Generate Build Vars | |
run: | | |
set -euo pipefail | |
echo fsvr_dir=$fsvr_dir | |
export root_dir=repo/viewer | |
# some legacy viewer packaging logic blindly reaches from build* to ../indra | |
$fsvr_dir/util/_utils.sh ht-ln $root_dir/indra indra | |
$fsvr_dir/util/generate_build_vars.sh ${viewer_name}-VR-GHA `cat $fsvr_dir/$base/viewer_version.txt` build/ \ | |
| tee env.d/build_vars.env #| tee $GITHUB_ENV | |
- name: Detect MSVC | |
uses: ./fsvr-action | |
with: | |
run: | | |
set -Euo pipefail | |
declare -a msvcs=(build/msvc.env build/msvc.nunja.env build/msvc_path.env) | |
export INPUT_key=$base-cache-msvc-a INPUT_path="$(echo "${msvcs[@]}" | tr ' ' '\n')" | |
/c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/restore-only/index.js \ | |
| grep -i 'cache restored' && { echo 'yup' ; ls -l "${msvcs[@]}" ; } || { | |
echo 'nope' | |
$fsvr_dir/util/generate_msvc_env.sh | |
ls -l ${msvcs[@]} | |
/c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/save-only/index.js | |
} | |
- name: 010_ensure_build_directories && 020_perform_replacements | |
run: fsvr_step 010 && fsvr_step 020 | |
- name: 038_provision_openvr | |
uses: ./fsvr-action | |
with: | |
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 && 050_generate_packages_info_text | |
run: fsvr_step 040 && fsvr_step 050 | |
- name: 080_untar_packages | |
uses: ./fsvr-action | |
with: | |
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: 085_prepare_msys_msvc | |
run: fsvr_step 085 | |
- name: 090_ninja_preflight | |
run: fsvr_step 090 | |
- name: 004 Setup tmate session | |
if: fromJSON(inputs.fstuple).pause == '004' | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
- name: 0a0_ninja_build SLPlugin.exe | |
run: fsvr_step 0a0 SLPlugin.exe | |
- name: 0a0_ninja_build application-bin.exe | |
run: fsvr_step 0a0 ${viewer_id}-bin.exe | |
- name: 0a0_ninja_build llpackage | |
run: fsvr_step 0a0 llpackage | |
- name: 0a1 postbuild | |
run: fsvr_step 0a1 | |
- name: 0b0 installer | |
run: fsvr_step 0b0 | |
- name: 0b1 upload installer | |
uses: ./fsvr-action | |
with: | |
run: fsvr_step 0b1 | |
- name: 0b2 7z | |
run: fsvr_step 0b2 | |
- name: 0b3 upload 7z | |
uses: ./fsvr-action | |
with: | |
run: fsvr_step 0b3 | |
- name: 005 Setup tmate session | |
if: fromJSON(inputs.fstuple).pause == '005' | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
# - name: log env on error | |
# if: failure() | |
# uses: ./fsvr-action | |
# with: | |
# run: | | |
# ./fsvr/util/_utils.sh upload_artifact debug "$(cat <<EOF | |
# SHELL.env | |
# env.d/gha-bootstrap.env | |
# env.d/build_vars.env | |
# build/msvc.env | |
# build/msvc_path.env | |
# build/msvc.nunja.env | |
# EOF | |
# )" | |
# - name: 006 Setup tmate session | |
# if: fromJSON(inputs.fstuple).pause == '006' | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# limit-access-to-actor: true | |
- 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 |