SL-18837: Get buildscripts_support_functions from sling-buildscripts
and use these variants for GitHub builds.master
parent
853cf3928c
commit
d2294841b2
|
|
@ -41,7 +41,8 @@ jobs:
|
||||||
build_log_dir: ${{ github.workspace }}/.logs
|
build_log_dir: ${{ github.workspace }}/.logs
|
||||||
build_viewer: true
|
build_viewer: true
|
||||||
BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared
|
BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared
|
||||||
BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/.buildscripts/hg/bin/buildscripts_support_functions
|
# extracted and committed to viewer repo
|
||||||
|
BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/buildscripts_support_functions
|
||||||
git_hooks_checkout: ${{ github.workspace }}/.git-hooks
|
git_hooks_checkout: ${{ github.workspace }}/.git-hooks
|
||||||
GIT_REF: ${{ github.head_ref || github.ref }}
|
GIT_REF: ${{ github.head_ref || github.ref }}
|
||||||
LL_SKIP_REQUIRE_SYSROOT: 1
|
LL_SKIP_REQUIRE_SYSROOT: 1
|
||||||
|
|
@ -71,12 +72,6 @@ jobs:
|
||||||
ref: viewer
|
ref: viewer
|
||||||
path: .build-variables
|
path: .build-variables
|
||||||
|
|
||||||
- name: Checkout buildscripts
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: secondlife/sling-buildscripts
|
|
||||||
path: .buildscripts
|
|
||||||
|
|
||||||
- name: Checkout git-hooks
|
- name: Checkout git-hooks
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
# standalone functions from sling-buildscripts
|
||||||
|
|
||||||
|
set_build_number_to_revision()
|
||||||
|
{
|
||||||
|
record_event "buildNumber $revision"
|
||||||
|
}
|
||||||
|
|
||||||
|
record_event()
|
||||||
|
{
|
||||||
|
echo "=== $@"
|
||||||
|
}
|
||||||
|
|
||||||
|
begin_section()
|
||||||
|
{
|
||||||
|
record_event "START $*"
|
||||||
|
sections+=("$*")
|
||||||
|
}
|
||||||
|
|
||||||
|
end_section()
|
||||||
|
{
|
||||||
|
# accommodate dumb Mac bash 3, which doesn't understand array[-1]
|
||||||
|
local last=$(( ${#sections[@]} - 1 ))
|
||||||
|
record_event "END ${*:-${sections[$last]}}"
|
||||||
|
unset "sections[$last]"
|
||||||
|
}
|
||||||
|
|
||||||
|
record_success()
|
||||||
|
{
|
||||||
|
record_event "SUCCESS $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
record_failure()
|
||||||
|
{
|
||||||
|
record_event "FAILURE $*" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal()
|
||||||
|
{
|
||||||
|
record_failure "$@"
|
||||||
|
finalize false
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# redefined fail for backward compatibility
|
||||||
|
alias fail=fatal
|
||||||
|
|
||||||
|
pass()
|
||||||
|
{
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f set_build_number_to_revision
|
||||||
|
export -f record_event
|
||||||
|
export -f begin_section
|
||||||
|
export -f end_section
|
||||||
|
export -f record_success
|
||||||
|
export -f record_failure
|
||||||
|
export -f fatal
|
||||||
|
export -f pass
|
||||||
|
export sections
|
||||||
Loading…
Reference in New Issue