-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (42 loc) · 1.65 KB
/
ci.yml
File metadata and controls
50 lines (42 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
name: build (linux x86_64, mcpp)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install xlings
env:
XLINGS_VERSION: 0.4.30
run: |
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
curl -fsSL -o "/tmp/${tarball}" \
"https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
tar -xzf "/tmp/${tarball}" -C /tmp
"/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
- name: Install workspace tools (.xlings.json → mcpp 0.0.11)
run: xlings install -y
# Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils +
# glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by
# mcpp 0.0.11, so a fixed key suffices.
- name: Cache mcpp sandbox
uses: actions/cache@v4
with:
path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry
key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v2
- name: Update package index
run: mcpp index update
- name: Debug mcpp env
run: |
mcpp self env
echo "--- xpkgs directory ---"
find $(mcpp self env 2>&1 | grep MCPP_HOME | awk -F'= ' '{print $2}')/registry/data/xpkgs -maxdepth 2 -type d 2>/dev/null || echo "no xpkgs dir"
echo "--- xlings global data ---"
ls ~/.xlings/data/xpkgs/ 2>/dev/null | head -20 || echo "no global xpkgs"
- name: Build with mcpp
run: mcpp build