Skip to content

Commit 3b50e8f

Browse files
CI: Windows' okrun is packed on Linux (an image built on Windows is not yet the file Linux and macOS build, so --merge refuses it); macOS packs its own
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent e9e6a97 commit 3b50e8f

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ jobs:
1919
# the dev tool), run the tests -- the protocol against its schema and the fixtures against mcpp's
2020
# contract among them -- and check the translations. A `pack` leg then packs the backend as the
2121
# editor packages carry it (mcpp design 2026-10-28 part 2 §15): its universal self-contained
22-
# package (`<arch>-openkal`: the x86_64 and aarch64 images, okrun for this system's architectures),
23-
# and on linux-x64 the ok-image bundle. The `host-platform` row builds and tests with the build
24-
# programs (build.mcpp, the spec/ generators) as ok images run by okrun.
22+
# package (`<arch>-openkal`: the x86_64 and aarch64 images, okrun for the `systems` it names), and
23+
# on linux-x64 the ok-image bundle. Windows' okrun is packed on Linux (x86_64-windows-gnu, static):
24+
# an image built on Windows is not yet the same file as one built on Linux or macOS (its __FILE__
25+
# strings keep `\`), and `mcpp pack --merge` joins only packages that hold the same images. The
26+
# `host-platform` row builds and tests with the build programs (build.mcpp, the spec/ generators)
27+
# as ok images run by okrun.
2528
backend:
2629
name: backend (${{ matrix.platform }}${{ matrix.host-platform && format(', host platform {0}', matrix.host-platform) || '' }})
2730
runs-on: ${{ matrix.os }}
@@ -30,10 +33,10 @@ jobs:
3033
fail-fast: false
3134
matrix:
3235
include:
33-
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', pack: 'package okb' }
36+
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', pack: 'package okb', systems: 'linux,windows' }
3437
- { os: ubuntu-24.04-arm, platform: linux-arm64, llvm: 'false', pack: '' }
35-
- { os: macos-14, platform: darwin-arm64, llvm: 'true', pack: 'package' }
36-
- { os: windows-2022, platform: win32-x64, llvm: 'true', pack: 'package' }
38+
- { os: macos-14, platform: darwin-arm64, llvm: 'true', pack: 'package', systems: 'macos' }
39+
- { os: windows-2022, platform: win32-x64, llvm: 'true', pack: '' }
3740
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', pack: '', host-platform: 'openkal-platform@0.17.2' }
3841
defaults:
3942
run:
@@ -58,19 +61,16 @@ jobs:
5861
set -euo pipefail
5962
version="$(sed -n 's/^version *= *"\(.*\)"/\1/p' mcpp.toml | head -1)"
6063
case "$(uname -m)" in x86_64|amd64|AMD64) arch=x86_64 ;; *) arch=aarch64 ;; esac
61-
case "$RUNNER_OS" in Linux) system=linux ;; macOS) system=macos ;; *) system=windows ;; esac
64+
case "$RUNNER_OS" in Linux) system=linux ;; *) system=macos ;; esac
6265
package="mcpp-ide-$version-openkal"
6366
mkdir -p out unpacked
6467
# An archive keeps the mode bits an artifact does not, and names its one directory.
65-
mcpp pack mcpp-ide --target "$arch-openkal" --mode self-contained --pkg-format tar -o "$package.tar.gz"
68+
mcpp pack mcpp-ide --target "$arch-openkal" --mode self-contained --systems "${{ matrix.systems }}" \
69+
--pkg-format tar -o "$package.tar.gz"
6670
cp "target/dist/$package.tar.gz" out/
6771
tar -xzf "out/$package.tar.gz" -C unpacked
6872
ls -R "unpacked/$package/libexec"
69-
if [ "$system" = windows ]; then
70-
(cd "unpacked/$package/bin" && cmd //c "mcpp-ide.cmd --version")
71-
else
72-
"unpacked/$package/bin/mcpp-ide" --version
73-
fi
73+
"unpacked/$package/bin/mcpp-ide" --version
7474
case " ${{ matrix.pack }} " in *" okb "*)
7575
mcpp pack mcpp-ide --target "$arch-openkal" --pkg-format okb
7676
cp "target/dist/mcpp-ide-$version.okb" out/mcpp-ide.okb

‎docs/architecture.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ editor package carries that bundle and the runner that starts it on each system:
4141
| Layout in the package | Holds | Started as |
4242
|---|---|---|
4343
| `backend/mcpp-ide.okb` | the x86_64 and aarch64 images | |
44-
| `backend/okrun/<os>-<arch>/okrun[.exe]` | okrun for `linux-x86_64`, `linux-aarch64`, `macos-aarch64`, `windows-x86_64`, from `mcpp pack --mode self-contained` on each system | `okrun mcpp-ide.okb serve`: the okrun carried for this system, else okrun on PATH |
44+
| `backend/okrun/<os>-<arch>/okrun[.exe]` | okrun for `linux-x86_64`, `linux-aarch64`, `macos-aarch64`, `windows-x86_64`: the universal self-contained packages (`mcpp pack --mode self-contained`) packed on Linux (`--systems linux,windows`) and on macOS, joined by `mcpp pack --merge` | `okrun mcpp-ide.okb serve`: the okrun carried for this system, else okrun on PATH |
4545

4646
Before it, a configured `mcpp.ide.backendPath` (a program or an `.okb`) is used; after it, an
4747
installed `mcpp-ide` (xlings, whose command runs okrun on its bundle) or one on PATH. CI builds the
48-
bundle once, takes okrun from each system's self-contained package, opens both editor packages on
49-
every system and starts what they carry for it (`.github/scripts/check-package.sh`).
48+
bundle once, joins the self-contained packages (`mcpp-ide-<version>-openkal.tar.gz`, a release asset),
49+
takes okrun from the joined package, opens both editor packages and the joined package on every
50+
system and starts what they carry for it (`.github/scripts/check-package.sh`).
5051

5152
## Generated declarations
5253

0 commit comments

Comments
 (0)