Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 93 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ name: CI
# i686-openkal the ok image of i386, run by okrun built for i686-linux-musl
# dos a DOS program, and the i386 image carried as one (technical
# experiment only), run under DOSBox Staging through dirun
# svr4 a System V Release 4 program (i386), run under ibcs-us, an
# emulation of the kernel's interface, as each of its three interfaces
# freebsd the musl rows of FreeBSD are built here and run in a FreeBSD VM,
# with okrun built for them running an ok image there
#
Expand Down Expand Up @@ -46,7 +48,7 @@ on:

env:
MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF || '' }}
MCPP_VERSION: 2026.11.16.1
MCPP_VERSION: 2026.11.18.1
XLINGS_VERSION: v2026.10.26.1
XLINGS_NON_INTERACTIVE: '1'

Expand All @@ -61,20 +63,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install xlings and mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
| bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
sleep 60
done
mcpp --version
mcpp self config --mirror GLOBAL
- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

- name: Every member and runner package is in the indexes mcpp reads
run: |
Expand Down Expand Up @@ -284,20 +276,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install xlings and mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
| bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
sleep 60
done
mcpp --version
mcpp self config --mirror GLOBAL
- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

- name: The hosted program, thirty-two bit
working-directory: checks/hosted
Expand Down Expand Up @@ -334,20 +316,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install xlings and mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
| bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
sleep 60
done
mcpp --version
mcpp self config --mirror GLOBAL
- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

# The provider's runner: dirun, xim's OVMF with its profile, and QEMU, installed by the
# first run; the status returns through the board's exit.
Expand Down Expand Up @@ -380,20 +352,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install xlings and mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
| bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
sleep 60
done
mcpp --version
mcpp self config --mirror GLOBAL
- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

- name: okrun for i686-linux-musl
run: |
Expand Down Expand Up @@ -427,6 +389,72 @@ jobs:
[ "$status" -eq 7 ] || { echo "::error::the image returned $status, not 7 ($mode)"; exit 1; }
done

# System V Release 4 on i386 (0.30.0): a program of i686-svr4-musl (openkal-musl
# over openkal-svr4) built in both modes and run by the provider's runner,
# ibcs-us in a user namespace; then the same executable under the two other
# interfaces the emulation has. The runs are under an emulation of the
# interface on Linux x86_64, none on a System V kernel.
svr4:
needs: resolves
name: i686-svr4-musl (built on Linux x86_64, run under ibcs-us)
runs-on: ubuntu-24.04
timeout-minutes: 60
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

# ibcs-us asks for the root identity and has it in a user namespace; a
# runner image whose AppArmor refuses an unprivileged one is told to allow it.
- name: The host lets an unprivileged user make a user namespace
run: |
if ! unshare -Ur true 2>/dev/null; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
unshare -Ur true

- name: The System V program (dev and release)
working-directory: checks/svr4
run: |
for mode in "" --release; do
set +e
mcpp run --target i686-svr4-musl $mode -- two one | tee run.log
status=${PIPESTATUS[0]}
set -e
grep -q 'svr4 ok: \["one", "two"\]' run.log && grep -q 'caught: across a frame' run.log \
&& grep -q 'files: true' run.log && grep -q 'here: true' run.log \
|| { echo "::error::the System V program's output ($mode)"; exit 1; }
[ "$status" -eq 7 ] || { echo "::error::the System V program returned $status, not 7 ($mode)"; exit 1; }
done
p=$(find target/i686-svr4-musl -path '*bin/svr4' -type f | head -1)
file "$p"
file "$p" | grep -q 'ELF 32-bit LSB executable, Intel 80386.*statically linked' \
|| { echo "::error::the program is not a static ELF32 i386 executable"; exit 1; }

# The same executable under the interfaces the emulation is told to answer
# as: the part of the interface the program issues is the one they share.
- name: The same executable as Solaris and as OpenServer 5
working-directory: checks/svr4
run: |
# The emulator the runner installed, among the packages mcpp holds.
ibcs=$(find "$HOME/.mcpp" "$HOME/.xlings" -path '*xim-x-ibcs-us/*/bin/ibcs-us' -type f 2>/dev/null | sort | tail -1 || true)
[ -n "$ibcs" ] || { echo "::error::ibcs-us is not installed"; exit 1; }
p=$(find "$PWD/target/i686-svr4-musl" -path '*bin/svr4' -type f | head -1)
for interface in per_solaris per_osr5; do
set +e
unshare -Ur "$ibcs" -p "$interface" "$p" two one | tee "$interface.log"
status=${PIPESTATUS[0]}
set -e
grep -q 'files: true' "$interface.log" || { echo "::error::the program's output under $interface"; exit 1; }
[ "$status" -eq 7 ] || { echo "::error::the program returned $status under $interface, not 7"; exit 1; }
done

# DOS (0.28.0; technical experiment only): a program of i686-dos-musl
# (openkal-musl over openkal-dos, run under CWSDPMI) built in both modes and
# run by the provider's runner, dirun with DOSBox Staging; and the i386 ok
Expand All @@ -442,20 +470,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install xlings and mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
| bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
sleep 60
done
mcpp --version
mcpp self config --mirror GLOBAL
- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

- name: The DOS program (dev and release)
working-directory: checks/dos
Expand Down Expand Up @@ -519,20 +537,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install xlings and mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
| bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
sleep 60
done
mcpp --version
mcpp self config --mirror GLOBAL
- uses: mcpp-community/setup-mcpp@v1
with:
version: ${{ env.MCPP_VERSION }}
xlings-version: ${{ env.XLINGS_VERSION }}

- name: The musl rows, built for FreeBSD
working-directory: checks/hosted
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/family-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ name: Family release
# The release of the version group this repository states (mcpp design
# 2026-11-07, §4.2.2, A5 and A6), run on every change of the group and on demand:
#
# group every member's tag and its GitCode mirror (the same bytes); the
# group every member's tag and its GitCode mirror (the same bytes; on a
# pull request the platform itself is the tree under review, and
# its tag follows the merge); the
# open issues of the members' repositories, for the release notes;
# the group's one index change, written into mcpp-index's main and
# kept as an artifact (`index-change.patch`), from which the
# maintainer opens the one index PR
# resolve over that candidate index, the released mcpp and the one under
# review resolve an image of the group and build it; and for a
# resolve over that candidate index, the engine the platform states as
# its floor and the newest one resolve an image of the group and
# build it (on a pull request, with this tree as the platform); and for a
# patch group, the C library and the C++ run-time objects the image
# links keep every global symbol of the previous patch's
#
Expand Down Expand Up @@ -40,7 +43,6 @@ defaults:
shell: bash

env:
MCPP_PREVIOUS: 2026.11.13.1
MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF || '' }}
XLINGS_VERSION: v2026.10.26.1
XLINGS_NON_INTERACTIVE: '1'
Expand All @@ -55,6 +57,8 @@ jobs:
- name: Tags and mirrors
run: |
also=(); for spec in ${{ github.event.inputs.also }}; do also+=(--also "$spec"); done
# On a pull request the platform is the tree under review: its tag follows the merge.
[ "$GITHUB_EVENT_NAME" = pull_request ] && also+=(--review)
echo "ALSO=${also[*]}" >> "$GITHUB_ENV"
python3 tools/family_release.py "${also[@]}" check | tee -a "$GITHUB_STEP_SUMMARY"
- name: Open issues of the members
Expand Down Expand Up @@ -85,9 +89,11 @@ jobs:
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s "$XLINGS_VERSION"
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
# The older engine is the one the platform states as its floor.
floor=$(python3 -c 'import tomllib; print(tomllib.load(open("mcpp.toml","rb"))["package"]["mcpp"].lstrip(">= "))')
for attempt in 1 2 3 4 5; do
xlings update > /dev/null 2>&1 || true
if xlings install "mcpp@$MCPP_PREVIOUS" -y -g; then break; fi
if xlings install "mcpp@$floor" -y -g; then break; fi
[ "$attempt" = 5 ] && exit 1
sleep 60
done
Expand Down Expand Up @@ -120,18 +126,24 @@ jobs:
- name: Both mcpp releases resolve and build an image of the group
run: |
version=$(python3 -c 'import tomllib; print(tomllib.load(open("mcpp.toml","rb"))["package"]["version"])')
echo "PLATFORM=openkal-platform@$version" >> "$GITHUB_ENV"
# Released, the platform is named; on a pull request it is this tree.
if [ "$GITHUB_EVENT_NAME" = pull_request ]; then
platform="{ path = \"$GITHUB_WORKSPACE\" }"; echo "PLATFORM=$GITHUB_WORKSPACE" >> "$GITHUB_ENV"
else
platform="\"openkal-platform@$version\""; echo "PLATFORM=openkal-platform@$version" >> "$GITHUB_ENV"
fi
echo "PLATFORM_VERSION=$version" >> "$GITHUB_ENV"
for mcpp in "$MCPP_OLD" "$MCPP_NEW"; do
dir="$RUNNER_TEMP/probe-$(basename "$(dirname "$(dirname "$mcpp")")")"
mkdir -p "$dir/src"
printf '[package]\nname = "probe"\nversion = "0.1.0"\n' > "$dir/mcpp.toml"
printf '[package]\nname = "probe"\nversion = "0.1.0"\n\n[target.x86_64-openkal]\nplatform = %s\n' "$platform" > "$dir/mcpp.toml"
printf 'import std;\nint main() { std::println("group ok"); }\n' > "$dir/src/main.cpp"
( cd "$dir" && "$mcpp" build --target x86_64-openkal --platform "openkal-platform@$version" ) \
( cd "$dir" && "$mcpp" build --target x86_64-openkal ) \
|| { echo "::error::$("$mcpp" --version) did not build an image of the group"; exit 1; }
done
- name: A patch keeps every global symbol of the previous patch
run: |
version=${PLATFORM#*@}
version=$PLATFORM_VERSION
patch=${version##*.}
if [ "$patch" = 0 ]; then echo "a minor version: no previous patch to compare"; exit 0; fi
previous="openkal-platform@${version%.*}.$((patch - 1))"
Expand Down
Loading
Loading