Skip to content

Commit

Permalink
Signal build failures to GHA but try to upload any existing build logs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-mnemonic committed Jan 31, 2025
1 parent cfcb1c6 commit add56de
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/make-sandwich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
jobs:
build_toolchain_parts:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:

- uses: actions/checkout@v4
Expand Down Expand Up @@ -43,7 +41,8 @@ jobs:
# exports ############################################################
echo "BUILD_LOGS=${BUILD_LOGS}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
- if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: build-logs
path: ${{ env.BUILD_LOGS }}/
Expand Down
2 changes: 1 addition & 1 deletion config/build-order.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for _job in @@_BUILD_ORDER_@@; do

date

time scripts/Build-Target -cfg @@_TARGET_CONFIG_@@ -job $_job # || exit 1
time scripts/Build-Target -cfg @@_TARGET_CONFIG_@@ -job $_job || touch /BUILD_FAILED

date

Expand Down
13 changes: 10 additions & 3 deletions tools/workflow.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#CONFIG_DIR="$PWD/toolchain-autobuilds/config"
#TOOLS_DIR="$PWD/toolchain-autobuilds/tools"
#SNAPSHOTS="$PWD/snapshots"
#PAST_BUILDS="$PWD/past-builds"
#BUILD_LOGS="$PWD/build-logs"
#
#export T2_TEMPLATE_BASE_DIR T2_ROOT CONFIG_DIR TOOLS_DIR SNAPSHOTS PAST_BUILDS
#export T2_TEMPLATE_BASE_DIR T2_ROOT CONFIG_DIR TOOLS_DIR SNAPSHOTS PAST_BUILDS BUILD_LOGS

# prepare snapshots if any new are available
NEW_SNAPSHOTS=0
Expand Down Expand Up @@ -77,4 +77,11 @@ for _build in ${_build_order}; do
cp ${_target_env_log_dir}/${_build}* ${BUILD_LOGS}/
done

exit
# check for build failure marker
if [[ -e ${T2_ROOT}/BUILD_FAILED ]]; then

echo "E: Build failed for at least one build job. Please examine."
exit 1
else
exit 0
fi

0 comments on commit add56de

Please sign in to comment.