Skip to content

Commit fefc800

Browse files
CI: the bundle and the universal package are packed once, on Linux, with okrun for Linux, macOS and Windows (each built over the platform's hosted arrangement); no per-system packs and no --merge
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 83ad846 commit fefc800

2 files changed

Lines changed: 29 additions & 74 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 25 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ env:
1717
jobs:
1818
# The backend on each system the editors run on: build every program (the backend, the mock mcpp,
1919
# the dev tool), run the tests -- the protocol against its schema and the fixtures against mcpp's
20-
# contract among them -- and check the translations. A `pack` leg then packs the backend as the
21-
# 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 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.
20+
# contract among them -- and check the translations. The `pack` leg then packs the backend as the
21+
# editor packages carry it (mcpp design 2026-10-28 part 2 §15): the ok-image bundle, and the
22+
# universal self-contained package (both images; okrun for Linux, macOS and Windows, each built
23+
# over the platform's hosted arrangement) whose okrun the packages take. The `host-platform` row
24+
# builds and tests with the build programs (build.mcpp, the spec/ generators) as ok images run by
25+
# okrun.
2826
backend:
2927
name: backend (${{ matrix.platform }}${{ matrix.host-platform && format(', host platform {0}', matrix.host-platform) || '' }})
3028
runs-on: ${{ matrix.os }}
@@ -33,11 +31,11 @@ jobs:
3331
fail-fast: false
3432
matrix:
3533
include:
36-
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', pack: 'package okb', systems: 'linux,windows' }
37-
- { os: ubuntu-24.04-arm, platform: linux-arm64, llvm: 'false', pack: '' }
38-
- { os: macos-14, platform: darwin-arm64, llvm: 'true', pack: 'package', systems: 'macos' }
39-
- { os: windows-2022, platform: win32-x64, llvm: 'true', pack: '' }
40-
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', pack: '', host-platform: 'openkal-platform@0.17.3' }
34+
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', pack: true }
35+
- { os: ubuntu-24.04-arm, platform: linux-arm64, llvm: 'false' }
36+
- { os: macos-14, platform: darwin-arm64, llvm: 'true' }
37+
- { os: windows-2022, platform: win32-x64, llvm: 'true' }
38+
- { os: ubuntu-24.04, platform: linux-x64, llvm: 'false', host-platform: 'openkal-platform@0.17.3' }
4139
defaults:
4240
run:
4341
shell: bash
@@ -55,75 +53,32 @@ jobs:
5553
run: mcpp test
5654
- name: Every string has its translation
5755
run: mcpp run mcpp-ide-dev -- check-i18n
58-
- name: The backend's packages
59-
if: matrix.pack != ''
56+
- name: The backend as the editor packages carry it
57+
if: matrix.pack
6058
run: |
6159
set -euo pipefail
6260
version="$(sed -n 's/^version *= *"\(.*\)"/\1/p' mcpp.toml | head -1)"
63-
case "$(uname -m)" in x86_64|amd64|AMD64) arch=x86_64 ;; *) arch=aarch64 ;; esac
64-
case "$RUNNER_OS" in Linux) system=linux ;; *) system=macos ;; esac
6561
package="mcpp-ide-$version-openkal"
66-
mkdir -p out unpacked
67-
# An archive keeps the mode bits an artifact does not, and names its one directory.
68-
mcpp pack mcpp-ide --target "$arch-openkal" --mode self-contained --systems "${{ matrix.systems }}" \
62+
mcpp pack mcpp-ide --target x86_64-openkal --mode self-contained --systems linux,macos,windows \
6963
--pkg-format tar -o "$package.tar.gz"
70-
cp "target/dist/$package.tar.gz" out/
71-
tar -xzf "out/$package.tar.gz" -C unpacked
72-
ls -R "unpacked/$package/libexec"
73-
"unpacked/$package/bin/mcpp-ide" --version
74-
case " ${{ matrix.pack }} " in *" okb "*)
75-
mcpp pack mcpp-ide --target "$arch-openkal" --pkg-format okb
76-
cp "target/dist/mcpp-ide-$version.okb" out/mcpp-ide.okb
77-
"unpacked/$package/libexec/okrun/$system-$arch/okrun" out/mcpp-ide.okb --version
78-
;;
79-
esac
80-
ls -l out
81-
- uses: actions/upload-artifact@v5
82-
if: matrix.pack != ''
83-
with:
84-
name: backend-${{ matrix.platform }}
85-
path: out
86-
87-
# The packages of every system made one (`mcpp pack --merge`): the universal self-contained package
88-
# (both images, okrun for every system a leg packed), and what the editor packages carry of it --
89-
# the bundle and the okrun of each system and architecture.
90-
backend-package:
91-
name: backend package
92-
needs: backend
93-
runs-on: ubuntu-24.04
94-
timeout-minutes: 30
95-
defaults:
96-
run:
97-
shell: bash
98-
steps:
99-
- uses: actions/checkout@v5
100-
- uses: ./.github/actions/setup-mcpp
101-
- uses: actions/download-artifact@v5
102-
with:
103-
pattern: backend-*
104-
path: backends
105-
- name: One package for every system
106-
run: |
107-
set -euo pipefail
108-
version="$(sed -n 's/^version *= *"\(.*\)"/\1/p' mcpp.toml | head -1)"
109-
package="mcpp-ide-$version-openkal"
110-
mkdir -p merged backend
111-
merge=()
112-
for p in backends/*/"$package.tar.gz"; do merge+=(--merge "$p"); done
113-
mcpp pack "${merge[@]}" -o "$PWD/backend/$package.tar.gz"
114-
tar -xzf "backend/$package.tar.gz" -C merged
115-
cp backends/backend-linux-x64/mcpp-ide.okb backend/mcpp-ide.okb
116-
cp -R "merged/$package/libexec/okrun" backend/okrun
117-
python3 - "merged/$package/mcpp-package.json" <<'PY'
64+
mcpp pack mcpp-ide --target x86_64-openkal --pkg-format okb
65+
mkdir -p backend unpacked
66+
cp "target/dist/$package.tar.gz" backend/
67+
cp "target/dist/mcpp-ide-$version.okb" backend/mcpp-ide.okb
68+
tar -xzf "backend/$package.tar.gz" -C unpacked
69+
cp -R "unpacked/$package/libexec/okrun" backend/okrun
70+
python3 - "unpacked/$package/mcpp-package.json" <<'PY'
11871
import json, sys
11972
d = json.load(open(sys.argv[1]))
12073
print("legs", d["legs"], "systems", d["systems"])
12174
want = {"linux-x86_64", "linux-aarch64", "macos-aarch64", "windows-x86_64"}
12275
assert want <= set(d["systems"]), d["systems"]
12376
PY
77+
"unpacked/$package/bin/mcpp-ide" --version
12478
backend/okrun/linux-x86_64/okrun backend/mcpp-ide.okb --version
12579
ls -lR backend
12680
- uses: actions/upload-artifact@v5
81+
if: matrix.pack
12782
with:
12883
name: backend
12984
path: backend
@@ -133,7 +88,7 @@ jobs:
13388
# mock mcpp, with that backend and with the bundle it carries; then the package, and its file list.
13489
vscode:
13590
name: VS Code extension
136-
needs: backend-package
91+
needs: backend
13792
runs-on: ubuntu-24.04
13893
timeout-minutes: 45
13994
defaults:
@@ -190,7 +145,7 @@ jobs:
190145
# (2025.2) and the one it is built on.
191146
jetbrains:
192147
name: CLion plugin
193-
needs: backend-package
148+
needs: backend
194149
runs-on: ubuntu-24.04
195150
timeout-minutes: 90
196151
defaults:

‎docs/architecture.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ 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`: 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 |
44+
| `backend/okrun/<os>-<arch>/okrun[.exe]` | okrun for `linux-x86_64`, `linux-aarch64`, `macos-aarch64`, `windows-x86_64`, from the universal self-contained package (`mcpp pack --mode self-contained --systems linux,macos,windows`: each okrun built over the platform's hosted arrangement) | `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
47-
installed `mcpp-ide` (xlings, whose command runs okrun on its bundle) or one on PATH. CI builds the
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
47+
installed `mcpp-ide` (xlings, whose command runs okrun on its bundle) or one on PATH. CI packs the
48+
bundle and the universal package (`mcpp-ide-<version>-openkal.tar.gz`, a release asset) once, on
49+
Linux, takes okrun from that package, opens both editor packages and the universal package on every
5050
system and starts what they carry for it (`.github/scripts/check-package.sh`).
5151

5252
## Generated declarations

0 commit comments

Comments
 (0)