Re: [PATCH 2/2 gnumach] CI: Add forgejo build/test script
Hello,
Damien Zammit, le mer. 21 janv. 2026 21:54:07 +, a ecrit:
> + i386:
> +runs-on: self
> +strategy:
> + matrix:
> +enable-ncpus: ["--enable-ncpus=1", "--enable-ncpus=8"]
We'd also probably want to try apic vs non-apic, independently of smp.
Also, pae vs non-pae.
> +kdb: ["--enable-kdb", "--disable-kdb"]
> +steps:
> + - name: Checkout code
> +uses: actions/checkout@v6
> + - name: gnumach 32 bit
> +run: |
> + git clone -q --depth=1 --single-branch
> https://code.zammit.org/damo22/mig mig32
We'd rather want to use the upstream repository. We don't expect it to
change much anyway.
> + autoreconf -fi
> + mkdir gnu32
> + mkdir build32
> + cd build32
> + ../configure --prefix= --host=i686-gnu LD=i686-linux-gnu-ld
> CC=i686-linux-gnu-gcc \
> + --enable-apic --disable-linux-groups \
> + ${{ matrix.enable-ncpus }} \
> + ${{ matrix.kdb }}
> + make DESTDIR=../gnu32 install-data
> + cd ..
> + cd mig32
> + autoreconf -fi
> + mkdir build32
> + cd build32
> + GNU=$(realpath ../../gnu32)
> + TARGET_CPPFLAGS=-I"$GNU"/include TARGET_CC=i686-linux-gnu-gcc
> ../configure --prefix="$GNU" --target=i686-gnu
> + make all install
> + PATH=$PATH:$GNU/bin
> + cd ../..
> + cd build32
> + ../configure --prefix= --host=i686-gnu LD=i686-linux-gnu-ld
> CC=i686-linux-gnu-gcc MIG=i686-gnu-mig \
> + --enable-apic --disable-linux-groups \
> + ${{ matrix.enable-ncpus }} \
> + ${{ matrix.kdb }}
> + make gnumach.gz
> + make check
Does your system have several cores? You can use -j$(nproc) to enable
parallelism, both for building mig&gnumach, and make check.
> + x86_64:
> +runs-on: self
> +strategy:
> + matrix:
> +enable-ncpus: ["--enable-ncpus=1", "--enable-ncpus=8"]
We'd probably want to try user32 vs non-user32.
> +kdb: ["--enable-kdb", "--disable-kdb"]
> +steps:
> + - name: Checkout code
> +uses: actions/checkout@v6
> + - name: gnumach 64 bit
> +run: |
You could probably factorize the 32b and 64b versions, by using
variables to set LD/CC, and i386 vs x86_64.
> + git clone -q --depth=1 --single-branch
> https://code.zammit.org/damo22/mig mig64
> + autoreconf -fi
> + mkdir gnu64
> + mkdir build64
> + cd build64
> + ../configure --prefix= --host=x86_64-gnu \
> + --enable-apic --disable-linux-groups \
> + ${{ matrix.enable-ncpus }} \
> + ${{ matrix.kdb }}
> + make DESTDIR=../gnu64 install-data
> + cd ..
> + cd mig64
> + autoreconf -fi
> + mkdir build64
> + cd build64
> + GNU=$(realpath ../../gnu64)
> + TARGET_CPPFLAGS=-I"$GNU"/include TARGET_CC=x86_64-linux-gnu-gcc
> ../configure --prefix="$GNU" --target=x86_64-gnu
> + make all install
> + PATH=$PATH:$GNU/bin
> + cd ../..
> + cd build64
> + ../configure --prefix= --host=x86_64-gnu MIG=x86_64-gnu-mig \
> + --enable-apic --disable-linux-groups \
> + ${{ matrix.enable-ncpus }} \
> + ${{ matrix.kdb }}
> + make gnumach.gz
> + make check
> --
> 2.51.0
[PATCH 2/2 gnumach] CI: Add forgejo build/test script
Cross compiles mig and gnumach i686/x86_64 on a forgejo runner.
Uses ncpus=[1,8] and with and without kdb.
Also runs the qemu test suite.
---
.forgejo/workflows/action.yaml | 83 ++
1 file changed, 83 insertions(+)
create mode 100644 .forgejo/workflows/action.yaml
diff --git a/.forgejo/workflows/action.yaml b/.forgejo/workflows/action.yaml
new file mode 100644
index ..d02a8ae4
--- /dev/null
+++ b/.forgejo/workflows/action.yaml
@@ -0,0 +1,83 @@
+on:
+ push:
+branches:
+ - 'master'
+ - 'ci-*'
+
+jobs:
+ i386:
+runs-on: self
+strategy:
+ matrix:
+enable-ncpus: ["--enable-ncpus=1", "--enable-ncpus=8"]
+kdb: ["--enable-kdb", "--disable-kdb"]
+steps:
+ - name: Checkout code
+uses: actions/checkout@v6
+ - name: gnumach 32 bit
+run: |
+ git clone -q --depth=1 --single-branch
https://code.zammit.org/damo22/mig mig32
+ autoreconf -fi
+ mkdir gnu32
+ mkdir build32
+ cd build32
+ ../configure --prefix= --host=i686-gnu LD=i686-linux-gnu-ld
CC=i686-linux-gnu-gcc \
+ --enable-apic --disable-linux-groups \
+ ${{ matrix.enable-ncpus }} \
+ ${{ matrix.kdb }}
+ make DESTDIR=../gnu32 install-data
+ cd ..
+ cd mig32
+ autoreconf -fi
+ mkdir build32
+ cd build32
+ GNU=$(realpath ../../gnu32)
+ TARGET_CPPFLAGS=-I"$GNU"/include TARGET_CC=i686-linux-gnu-gcc
../configure --prefix="$GNU" --target=i686-gnu
+ make all install
+ PATH=$PATH:$GNU/bin
+ cd ../..
+ cd build32
+ ../configure --prefix= --host=i686-gnu LD=i686-linux-gnu-ld
CC=i686-linux-gnu-gcc MIG=i686-gnu-mig \
+ --enable-apic --disable-linux-groups \
+ ${{ matrix.enable-ncpus }} \
+ ${{ matrix.kdb }}
+ make gnumach.gz
+ make check
+ x86_64:
+runs-on: self
+strategy:
+ matrix:
+enable-ncpus: ["--enable-ncpus=1", "--enable-ncpus=8"]
+kdb: ["--enable-kdb", "--disable-kdb"]
+steps:
+ - name: Checkout code
+uses: actions/checkout@v6
+ - name: gnumach 64 bit
+run: |
+ git clone -q --depth=1 --single-branch
https://code.zammit.org/damo22/mig mig64
+ autoreconf -fi
+ mkdir gnu64
+ mkdir build64
+ cd build64
+ ../configure --prefix= --host=x86_64-gnu \
+ --enable-apic --disable-linux-groups \
+ ${{ matrix.enable-ncpus }} \
+ ${{ matrix.kdb }}
+ make DESTDIR=../gnu64 install-data
+ cd ..
+ cd mig64
+ autoreconf -fi
+ mkdir build64
+ cd build64
+ GNU=$(realpath ../../gnu64)
+ TARGET_CPPFLAGS=-I"$GNU"/include TARGET_CC=x86_64-linux-gnu-gcc
../configure --prefix="$GNU" --target=x86_64-gnu
+ make all install
+ PATH=$PATH:$GNU/bin
+ cd ../..
+ cd build64
+ ../configure --prefix= --host=x86_64-gnu MIG=x86_64-gnu-mig \
+ --enable-apic --disable-linux-groups \
+ ${{ matrix.enable-ncpus }} \
+ ${{ matrix.kdb }}
+ make gnumach.gz
+ make check
--
2.51.0
