From d975aa973007c1ae86fbfcefebccf26f0e3ce657 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 27 Oct 2026 18:41:57 +0900 Subject: [PATCH] ci: the released mcpp 2026.10.26.2; a dispatch may still name a branch to build Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com> --- .github/workflows/ci.yml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac2faf2..ec3f39b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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' @@ -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 @@ -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 @@ -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