Skip to content
Merged
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
36 changes: 20 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ name: CI
# platform a platform module used outside `if constexpr' for its platform
# fails to LINK, and the same use in a discarded branch links (R5)
#
# The library is built with the mcpp under cross-validation: until mcpp
# 2026.10.26.2 is released, a unit with a module map that imports another
# package's module through a third (`mcpplibs.os.terminal' through
# `mcpplibs.os.error') does not compile under GCC (mcpp part 2 design §10.2),
# so the mcpp named by MCPP_SOURCE_REF is built and used.
# The library is built with the released mcpp, 2026.10.26.2 or later: the
# first that compiles a unit with a module map importing another package's
# module through a third under GCC (`mcpplibs.os.terminal' through
# `mcpplibs.os.error', mcpp part 2 design §10.2) and builds the ok images.
# A dispatch may name a branch of mcpp instead (`mcpp_ref'), which is then
# built and used.

on:
push:
Expand All @@ -25,7 +26,8 @@ on:
default: ""

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

Expand Down Expand Up @@ -69,7 +71,7 @@ jobs:
run: |
for attempt in 1 2 3 4 5 6; do
xlings update > /dev/null 2>&1 || true
if xlings install mcpp -y -g; then break; fi
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
Expand Down Expand Up @@ -140,15 +142,17 @@ jobs:
- name: The mcpp that has the target
run: |
xlings update > /dev/null 2>&1 || true
xlings install mcpp -y -g
xlings install "mcpp@$MCPP_VERSION" -y -g
mcpp self config --mirror GLOBAL
src="$RUNNER_TEMP/mcpp-src"
git clone --quiet --depth 1 --branch "$MCPP_SOURCE_REF" https://github.com/mcpp-community/mcpp.git "$src"
rm -f "$src/.xlings.json"
( cd "$src" && mcpp build --release )
built=$(find "$src/target" -type f -name mcpp | head -1)
[ -n "$built" ] || { echo "::error::mcpp did not build"; exit 1; }
echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
if [ -n "${MCPP_SOURCE_REF:-}" ]; then
src="$RUNNER_TEMP/mcpp-src"
git clone --quiet --depth 1 --branch "$MCPP_SOURCE_REF" https://github.com/mcpp-community/mcpp.git "$src"
rm -f "$src/.xlings.json"
( cd "$src" && mcpp build --release )
built=$(find "$src/target" -type f -name mcpp | head -1)
[ -n "$built" ] || { echo "::error::mcpp did not build"; exit 1; }
echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
fi
- name: The suites, run here and built for the other architecture
run: |
set -euo pipefail
Expand Down Expand Up @@ -200,7 +204,7 @@ jobs:
"$env:USERPROFILE\.xlings\subos\current\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: okrun, built here
run: |
xlings install mcpp -y -g
xlings install "mcpp@$MCPP_VERSION" -y -g
mcpp self config --mirror GLOBAL
mcpp toolchain install llvm 23.1.3
mcpp toolchain default llvm@23.1.3
Expand Down
Loading