generated from mcpplibs/templates
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (86 loc) · 2.39 KB
/
ci.yml
File metadata and controls
105 lines (86 loc) · 2.39 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
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
package-cache: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Install Xlings
env:
XLINGS_NON_INTERACTIVE: 1
run: |
curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/refs/heads/main/tools/other/quick_install.sh | bash
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
- name: Install GCC 15.1 with Xlings
run: |
xlings install gcc@15.1 -y
- name: Build
run: |
xmake f -m release -y -vv
xmake build -y -vv mcpplibs-capi-lua
xmake -y -vv -j$(nproc)
- name: Test
run: xmake run capi_lua_test
- name: Run examples
run: |
xmake run basic
xmake run table
xmake run function
xmake run eval
build-macos:
runs-on: macos-14
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: brew install xmake llvm@20
- name: Build
run: |
export PATH=/opt/homebrew/opt/llvm@20/bin:$PATH
xmake f --toolchain=llvm --sdk=/opt/homebrew/opt/llvm@20 -m release -y -vv
xmake -y -vv -j$(sysctl -n hw.ncpu)
build-windows:
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
package-cache: true
- name: Build
run: |
xmake f -m release -y -vv
xmake -y -vv -j$env:NUMBER_OF_PROCESSORS
- name: Test
run: xmake run capi_lua_test
- name: Run examples
run: |
xmake run basic
xmake run table
xmake run function
xmake run eval