[PATCH gnumach] CI: Email failures to commit-hurd
Damien Zammit <[email protected]> Mon, 03 Aug 2026 11:43:04 +0000
| Newsgroups | gmane.os.hurd.bugs |
|---|---|
| Message-ID | <[email protected]> |
This will email gzipped error logs to commit-hurd AT gnu.org from any
forgejo instance set up as a mirror. This is facilitated by
not specifying any domain or user specific configuration, but to
execute the mailing code path, the repository must be called "gnumach"
and the branch that was synced be "master".
If the mail command is not configured in the CI, it will simply fail
to send mail and the failing test will not be reported.
Since there is only one instance currently set up, we won't get
duplicated reports.
---
.forgejo/workflows/action.yaml | 39 ++++++++++++++++++++++++++++------
1 file changed, 33 insertions(+), 6 deletions(-)
diff --git a/.forgejo/workflows/action.yaml b/.forgejo/workflows/action.yam=
l
index ef3ed81d..6ea930b3 100644
--- a/.forgejo/workflows/action.yaml
+++ b/.forgejo/workflows/action.yaml
@@ -52,8 +52,22 @@ jobs:
--disable-linux-groups \
${{ matrix.platform }} \
${{ matrix.kdb }}
- make gnumach.gz
- make VERBOSE=3Dtrue check
+ set -o pipefail
+ make gnumach.gz 2>&1 | tee ../error.log
+ make VERBOSE=3Dtrue check 2>&1 | tee ../error.log
+
+ - name: Email failures
+ if: failure()
+ run: |
+ echo "CI failure: gnumach i386 on commit ${{ forgejo.SHA }} with=
options ${{ matrix.platform }} ${{ matrix.kdb }}"
+ if [ `basename ${{ forgejo.REPOSITORY }}` =3D=3D "gnumach" ] && =
[ ${{ forgejo.REF_NAME }} =3D=3D "master" ]; then
+ gzip -9 error.log
+ echo "CI failure: gnumach i386 master on commit ${{ forgejo.SH=
A }} with options ${{ matrix.platform }} ${{ matrix.kdb }}" | \
+ mail -a error.log.gz -s "[CI fail]: gnumach i386 ${{ forgejo=
.SHA }} (${{ matrix.platform }} ${{ matrix.kdb }})" \
+ [email protected]
+ fi
+ exit 1
+
x86_64:
runs-on: self
strategy:
@@ -101,9 +115,10 @@ jobs:
TARGET_CPPFLAGS=3D-I"$GNU"/include TARGET_CC=3Dx86_64-linux-gnu-=
gcc ../configure --prefix=3D"$GNU" --target=3Dx86_64-gnu
make all install
cd ../..
+ mkdir gnu32
+ GNU32=3D$(realpath gnu32)
if [ "$USER_H" =3D=3D "i686" ]; then
# We need i386 headers to build mig 32bit
- mkdir gnu32
mkdir build32
cd build32
../configure --prefix=3D --host=3Di686-gnu LD=3D"x86_64-linux-=
gnu-ld -melf_i386" CC=3D"x86_64-linux-gnu-gcc -m32" \
@@ -115,7 +130,6 @@ jobs:
cd mig
mkdir build32
cd build32
- GNU32=3D$(realpath ../../gnu32)
TARGET_CPPFLAGS=3D-I"$GNU32"/include TARGET_CC=3D"x86_64-linux=
-gnu-gcc -m32" TARGET_LD=3D"x86_64-linux-gnu-ld -melf_i386" ../configure --=
prefix=3D"$GNU32" --target=3Di686-gnu
make all install
cd ../..
@@ -130,5 +144,18 @@ jobs:
${{ matrix.platform }} \
${{ matrix.user32 }} \
${{ matrix.kdb }}
- make gnumach.gz
- make VERBOSE=3Dtrue check
+ set -o pipefail
+ make gnumach.gz 2>&1 | tee ../error.log
+ make VERBOSE=3Dtrue check 2>&1 | tee ../error.log
+
+ - name: Email failures
+ if: failure()
+ run: |
+ echo "CI failure: gnumach amd64 on commit ${{ forgejo.SHA }} wit=
h options ${{ matrix.platform }} ${{ matrix.user32 }} ${{ matrix.kdb }}"
+ if [ `basename ${{ forgejo.REPOSITORY }}` =3D=3D "gnumach" ] && =
[ ${{ forgejo.REF_NAME }} =3D=3D "master" ]; then
+ gzip -9 error.log
+ echo "CI failure: gnumach amd64 master on commit ${{ forgejo.S=
HA }} with options ${{ matrix.platform }} ${{ matrix.user32 }} ${{ matrix.k=
db }}" | \
+ mail -a error.log.gz -s "[CI fail]: gnumach amd64 ${{ forgej=
o.SHA }} (${{ matrix.platform }} ${{ matrix.user32 }} ${{ matrix.kdb }})" \
+ [email protected]
+ fi
+ exit 1
--=20
2.51.0