Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
humbletim committed Mar 24, 2024
1 parent 0cfac3d commit 0fdb149
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 39 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/CompileWindows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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
Expand Down
60 changes: 30 additions & 30 deletions gha-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 3 additions & 1 deletion gha-generate-shell-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "\$@" ; }
Expand Down
6 changes: 2 additions & 4 deletions util/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)}

Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 0fdb149

Please sign in to comment.