From 0fdb14983fbce676f6d8df9e78470f8070385d80 Mon Sep 17 00:00:00 2001 From: tim Date: Sun, 24 Mar 2024 00:50:14 -0400 Subject: [PATCH] test --- .github/workflows/CompileWindows.yml | 21 ++++++++-- gha-bootstrap.sh | 60 ++++++++++++++-------------- gha-generate-shell-env.sh | 4 +- util/build.sh | 6 +-- 4 files changed, 52 insertions(+), 39 deletions(-) diff --git a/.github/workflows/CompileWindows.yml b/.github/workflows/CompileWindows.yml index 76b342addb..5fac7841c4 100644 --- a/.github/workflows/CompileWindows.yml +++ b/.github/workflows/CompileWindows.yml @@ -22,7 +22,7 @@ defaults: # 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 + BASH_ENV: ${{ github.workspace }}\SHELL.env jobs: windows_build: @@ -52,7 +52,7 @@ jobs: - name: Clone run: | - mkdir -pv bin cache repo build + mkdir -pv bin bin/pystuff 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 @@ -100,10 +100,12 @@ jobs: gha-cache-restore $base-bin-b bin 2> >(gha-action-stderr-filter) || ( set -Euo pipefail literally_exists bin/ninja.exe || get_ninja || exit `_err $? "failed to provision ninja $?"` - literally_exists bin/.colout || get_colout || exit `_err $? "failed to provision .colout $?"` + literally_exists bin/pystuff/Python39 || 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 gha-cache-save $base-bin-b bin 2> >(gha-action-stderr-filter) || exit 85 ) function xxtest_bin() { @@ -195,7 +197,18 @@ jobs: | tee build/build_vars.env #| tee $GITHUB_ENV - name: Detect MSVC - run: $fsvr_dir/util/generate_msvc_env.sh + uses: ./fsvr-action + with: + run: | + set -Euo pipefail + export INPUT_key=$base-cache-msvc-a INPUT_path='build/msvc.env build/msvc_path.env' + /c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/restore-only/index.js \ + | grep -i 'cache restored' && { echo 'yup' ; ls -l build/msvc.env build/msvc.nunja.env ; } || { + echo 'nope' + $fsvr_dir/util/generate_msvc_env.sh + ls -l build/msvc.env build/msvc.nunja.env + /c/Program\ Files/nodejs/node /d/a/_actions/actions/cache/v4/dist/save-only/index.js + } - name: 010_ensure_build_directories run: fsvr_step 010 diff --git a/gha-bootstrap.sh b/gha-bootstrap.sh index ef7108ad87..85cfa6bc67 100755 --- a/gha-bootstrap.sh +++ b/gha-bootstrap.sh @@ -45,40 +45,40 @@ function get_ninja() {( )} - -function get_colout_babel() {( - set -Euo pipefail - local archive=$( $fsvr_dir/util/_utils.sh wget-sha256 \ - ad76eab6905b626d7d4110d2032bc60c69bef225ec94c67d7229425ebe53f659 \ - https://github.com/python-babel/babel/archive/refs/tags/v2.14.0.tar.gz \ - . - ) || return `_err $? "failed to download babel $?"` - mkdir -pv bin/.colout/babel - tar -C bin/.colout --force-local --strip-components=1 \ - -xf $archive babel-2.14.0/{babel,scripts,cldr} || return `_err $? "failed to provision babel $?"` - python bin/.colout/scripts/download_import_cldr.py 2>/dev/null || return `_err $? "failed to localize babel $?"` - ls -l bin/.colout | grep babel -)} - -function get_colout_pygments() {( - set -Euo pipefail - local archive=$( $fsvr_dir/util/_utils.sh wget-sha256 \ - 163e0235b3739c24d7631bb7b0e5829f9ea081c10b26662354c3ba0e6e95f8ea \ - https://github.com/pygments/pygments/archive/refs/tags/2.17.2.tar.gz \ - . - ) || return `_err $? "failed to download pygments $?"` - mkdir -pv bin/.colout/pygments - tar -C bin/.colout --force-local --strip-components=1 \ - -xf $archive pygments-2.17.2/pygments || return `_err $? "failed to provision pygments $?"` - ls -l bin/.colout | grep pygments -)} +# +# function get_colout_babel() {( +# set -Euo pipefail +# local archive=$( $fsvr_dir/util/_utils.sh wget-sha256 \ +# ad76eab6905b626d7d4110d2032bc60c69bef225ec94c67d7229425ebe53f659 \ +# https://github.com/python-babel/babel/archive/refs/tags/v2.14.0.tar.gz \ +# . +# ) || return `_err $? "failed to download babel $?"` +# mkdir -pv bin/.colout/babel +# tar -C bin/.colout --force-local --strip-components=1 \ +# -xf $archive babel-2.14.0/{babel,scripts,cldr} || return `_err $? "failed to provision babel $?"` +# python bin/.colout/scripts/download_import_cldr.py 2>/dev/null || return `_err $? "failed to localize babel $?"` +# ls -l bin/.colout | grep babel +# )} +# +# function get_colout_pygments() {( +# set -Euo pipefail +# local archive=$( $fsvr_dir/util/_utils.sh wget-sha256 \ +# 163e0235b3739c24d7631bb7b0e5829f9ea081c10b26662354c3ba0e6e95f8ea \ +# https://github.com/pygments/pygments/archive/refs/tags/2.17.2.tar.gz \ +# . +# ) || return `_err $? "failed to download pygments $?"` +# mkdir -pv bin/.colout/pygments +# tar -C bin/.colout --force-local --strip-components=1 \ +# -xf $archive pygments-2.17.2/pygments || return `_err $? "failed to provision pygments $?"` +# ls -l bin/.colout | grep pygments +# )} function get_colout() {( set -Euo pipefail mkdir bin/.colout -pv - PYTHONUSERBASE="$(cygpath -wa bin/.colout)" python -m pip install --no-warn-script-location --user colout - perl -i.bak -pe 's@^.*[.]SIGPIPE.*$@#$&@g' bin/.colout/Python39/site-packages/colout/colout.py - diff bin/.colout/Python39/site-packages/colout/colout.py* + python -m pip install --no-warn-script-location --user colout + perl -i.bak -pe 's@^.*[.]SIGPIPE.*$@#$&@g' bin/pystuff/Python39/site-packages/colout/colout.py + diff bin/pystuff/Python39/site-packages/colout/colout.py* # ./fsvr/util/_utils.sh ht-ln bin/.colout/Python39/site-packages bin/.colout/site-packages echo hello world | colout "hello" "red" | colout "world" "blue" # local archive=$( $fsvr_dir/util/_utils.sh wget-sha256 \ diff --git a/gha-generate-shell-env.sh b/gha-generate-shell-env.sh index 04efa13b15..fc38910e7c 100755 --- a/gha-generate-shell-env.sh +++ b/gha-generate-shell-env.sh @@ -35,12 +35,14 @@ _xpath="\$_PATH" [[ -n "\$_PRESHELL_PATH" ]] && _xpath="\$_xpath:\$_PRESHELL_PATH" declare -x PATH="\$_xpath" declare -x LANG=en_US.UTF-8 +declare -x PYTHONUSERBASE="$(cygpath -wa bin/pystuff)" + function _err() { local rc=\$1 ; shift; echo "[_err rc=\$rc] \$@" >&2; return \$rc; } function ht-ln() { '$fsvr_dir/util/_utils.sh' ht-ln "\$@" ; } function hostname(){ echo 'windows-2022' ; } function tee() { TEE="`which tee`" "`which python3`" "$fsvr_dir/util/tee.py" "\$@" ; } -function colout() { PYTHONUSERBASE="$(cygpath -wa bin/.colout)" "`which python3`" "$PWD/bin/.colout/Python39/site-packages/colout/colout.py" "\$@" ; } +function colout() { "`which python3`" "$PWD/bin/pystuff/Python39/site-packages/colout/colout.py" "\$@" ; } function parallel() { PARALLEL_HOME="$PWD/bin/parallel-home" "$PWD/bin/parallel" "\$@" ; } function fsvr_step() { set -Euo pipefail; $PWD/fsvr/util/build.sh "\$@" ; } diff --git a/util/build.sh b/util/build.sh index 3cedde385c..c592f6a209 100755 --- a/util/build.sh +++ b/util/build.sh @@ -91,8 +91,6 @@ function 085_prepare_msys_msvc() {( $_dbgopts; # past manifest processing and workable firestorm_setup_tmp.nsi emerging # see: indra/newview/viewer_manifest.py: def nsi_file_commands test -d C:/PROGRA~2/NSIS && mv -v C:/PROGRA~2/NSIS C:/PROGRA~2/NSIS.old - # note: autobuild is not necessary here, but viewer_manifest still depends on python-llsd - python -c 'import llsd' 2>/dev/null || pip install llsd # needed for viewer_manifest.py invocation fi )} @@ -315,13 +313,13 @@ function 0c0_upload_artifacts() {( $_dbgopts; mkdir dist ht-ln $Installer dist/$InstallerExe - ( cd dist && upload-artifact ${InstallerExe/.exe/} $InstallerExe ) + ( cd dist && gha-upload-artifact ${InstallerExe/.exe/} $InstallerExe ) local Portable=`ls build/Firestorm*.7z |head -1` local PortableArchive=$branch-$(basename $Portable) ht-ln $Portable dist/$PortableArchive - ( cd dist && upload-artifact ${PortableArchive/.7z/} $PortableArchive ) + ( cd dist && gha-upload-artifact ${PortableArchive/.7z/} $PortableArchive ) )} function _steps() {