Skip to content

Commit ade13d7

Browse files
CI: each system's universal package travels as its archive (the mode bits and its one directory kept), and --merge joins the archives
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 5c9dea9 commit ade13d7

2 files changed

Lines changed: 50 additions & 16 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,24 @@ jobs:
6060
case "$(uname -m)" in x86_64|amd64|AMD64) arch=x86_64 ;; *) arch=aarch64 ;; esac
6161
case "$RUNNER_OS" in Linux) system=linux ;; macOS) system=macos ;; *) system=windows ;; esac
6262
package="mcpp-ide-$version-openkal"
63-
mkdir -p out
64-
mcpp pack mcpp-ide --target "$arch-openkal" --mode self-contained --pkg-format dir -o "$package"
65-
cp -R "target/dist/$package" out/
66-
ls -R "out/$package/libexec"
63+
mkdir -p out unpacked
64+
# 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"
66+
cp "target/dist/$package.tar.gz" out/
67+
tar -xzf "out/$package.tar.gz" -C unpacked
68+
ls -R "unpacked/$package/libexec"
6769
if [ "$system" = windows ]; then
68-
(cd "out/$package/bin" && cmd //c "mcpp-ide.cmd --version")
70+
(cd "unpacked/$package/bin" && cmd //c "mcpp-ide.cmd --version")
6971
else
70-
"out/$package/bin/mcpp-ide" --version
72+
"unpacked/$package/bin/mcpp-ide" --version
7173
fi
7274
case " ${{ matrix.pack }} " in *" okb "*)
7375
mcpp pack mcpp-ide --target "$arch-openkal" --pkg-format okb
7476
cp "target/dist/mcpp-ide-$version.okb" out/mcpp-ide.okb
75-
"out/$package/libexec/okrun/$system-$arch/okrun" out/mcpp-ide.okb --version
76-
ls -l out/mcpp-ide.okb
77+
"unpacked/$package/libexec/okrun/$system-$arch/okrun" out/mcpp-ide.okb --version
7778
;;
7879
esac
80+
ls -l out
7981
- uses: actions/upload-artifact@v5
8082
if: matrix.pack != ''
8183
with:
@@ -105,13 +107,11 @@ jobs:
105107
set -euo pipefail
106108
version="$(sed -n 's/^version *= *"\(.*\)"/\1/p' mcpp.toml | head -1)"
107109
package="mcpp-ide-$version-openkal"
108-
# An artifact does not keep the mode bits.
109-
chmod +x backends/*/"$package"/bin/mcpp-ide backends/*/"$package"/libexec/okrun/*/okrun*
110110
mkdir -p merged backend
111111
merge=()
112-
for p in backends/*/"$package"; do merge+=(--merge "$p"); done
113-
mcpp pack "${merge[@]}" --pkg-format dir -o "$PWD/merged/$package"
112+
for p in backends/*/"$package.tar.gz"; do merge+=(--merge "$p"); done
114113
mcpp pack "${merge[@]}" -o "$PWD/backend/$package.tar.gz"
114+
tar -xzf "backend/$package.tar.gz" -C merged
115115
cp backends/backend-linux-x64/mcpp-ide.okb backend/mcpp-ide.okb
116116
cp -R "merged/$package/libexec/okrun" backend/okrun
117117
python3 - "merged/$package/mcpp-package.json" <<'PY'

‎mcpp.lock‎

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,51 @@ version = "os-0.2.1"
1010
source = "git+https://github.com/mcpplibs/os.git#branch=os-0.2.1@211e765edbed99ef02526c45af9da988f6e48399"
1111
hash = "fnv1a:e9ea51f425a4832f"
1212

13+
[package."mcpp.plugins"]
14+
namespace = "mcpp"
15+
version = "0.20.0"
16+
source = "index+mcpp@0.20.0"
17+
hash = "fnv1a:9438fb3cbe77fdc7"
18+
1319
[package."openkal"]
1420
namespace = "mcpplibs"
1521
version = "0.17.1"
1622
source = "index+mcpplibs@0.17.1"
1723
hash = "fnv1a:d9a6fd1043f0f322"
1824

19-
[package."openkal-linux"]
25+
[package."openkal-ld"]
26+
namespace = "mcpplibs"
27+
version = "0.1.3"
28+
source = "index+mcpplibs@0.1.3"
29+
hash = "fnv1a:c45ba7726c74fc44"
30+
31+
[package."openkal-llvm-runtime"]
32+
namespace = "mcpplibs"
33+
version = "0.16.5"
34+
source = "index+mcpplibs@0.16.5"
35+
hash = "fnv1a:1310f23360b2e0f2"
36+
origin = "platform"
37+
38+
[package."openkal-musl"]
39+
namespace = "mcpplibs"
40+
version = "0.22.5"
41+
source = "index+mcpplibs@0.22.5"
42+
hash = "fnv1a:de2d15df84a5a92a"
43+
origin = "platform"
44+
45+
[package."openkal-platform"]
46+
namespace = "mcpplibs"
47+
version = "0.17.2"
48+
source = "index+mcpplibs@0.17.2"
49+
hash = "fnv1a:d470e712205b7b39"
50+
origin = "platform"
51+
52+
[package."openkal-tools"]
2053
namespace = "mcpplibs"
21-
version = "0.18.2"
22-
source = "index+mcpplibs@0.18.2"
23-
hash = "fnv1a:2947b54ddbcf8813"
54+
version = "0.1.3"
55+
source = "index+mcpplibs@0.1.3"
56+
hash = "fnv1a:3a0aa473e0da7eaf"
57+
origin = "platform"
2458

2559
[package."nlohmann.json"]
2660
namespace = "nlohmann"

0 commit comments

Comments
 (0)