summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yaml9
-rw-r--r--buildscripts_support_functions60
2 files changed, 62 insertions, 7 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index dda5867a9f..e7608657e3 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -41,7 +41,8 @@ jobs:
build_log_dir: ${{ github.workspace }}/.logs
build_viewer: true
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_REF: ${{ github.head_ref || github.ref }}
LL_SKIP_REQUIRE_SYSROOT: 1
@@ -71,12 +72,6 @@ jobs:
ref: viewer
path: .build-variables
- - name: Checkout buildscripts
- uses: actions/checkout@v3
- with:
- repository: secondlife/sling-buildscripts
- path: .buildscripts
-
- name: Checkout git-hooks
uses: actions/checkout@v3
with:
diff --git a/buildscripts_support_functions b/buildscripts_support_functions
new file mode 100644
index 0000000000..557d2f80fb
--- /dev/null
+++ b/buildscripts_support_functions
@@ -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