-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (88 loc) · 3.06 KB
/
ci.yml
File metadata and controls
107 lines (88 loc) · 3.06 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
XLINGS_VERSION: v0.4.0
jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update -qq
sudo apt-get install -y curl git build-essential
- name: Install Xlings
env:
XLINGS_NON_INTERACTIVE: 1
run: |
VERSION_NUM="${XLINGS_VERSION#v}"
TARBALL="xlings-${VERSION_NUM}-linux-x86_64.tar.gz"
curl -fSL -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${TARBALL}"
tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP"
EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1)
chmod +x "$EXTRACT_DIR/bin/xlings"
"$EXTRACT_DIR/bin/xlings" self install
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
- name: Install Project Dependencies via Xlings
run: |
xlings install
- name: Build with xmake
run: |
xmake f -m release -vv -y
xmake -j$(nproc)
- name: Verify d2x
run: |
./build/linux/x86_64/release/d2x --version
./build/linux/x86_64/release/d2x new hello
build-macos:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Xlings
env:
XLINGS_NON_INTERACTIVE: 1
run: |
VERSION_NUM="${XLINGS_VERSION#v}"
TARBALL="xlings-${VERSION_NUM}-macosx-arm64.tar.gz"
curl -fSL -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${TARBALL}"
tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP"
EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1)
xattr -dr com.apple.quarantine "$EXTRACT_DIR" 2>/dev/null || true
chmod +x "$EXTRACT_DIR/bin/xlings"
"$EXTRACT_DIR/bin/xlings" self install
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
- name: Install Project Dependencies via Xlings
run: |
xlings install
clang --version
- name: Build with xmake
run: |
xmake f -m release --toolchain=llvm -vv -y
xmake -j$(nproc)
- name: Verify d2x
run: |
./build/macosx/arm64/release/d2x --version
./build/macosx/arm64/release/d2x new hello
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Build with xmake
run: |
xmake f -m release -y
xmake -j$env:NUMBER_OF_PROCESSORS
- name: Verify d2x
run: |
build\windows\x64\release\d2x.exe --version
build\windows\x64\release\d2x.exe new hello