-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (70 loc) · 2.19 KB
/
ci.yml
File metadata and controls
79 lines (70 loc) · 2.19 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
fail-fast: false
matrix:
test:
- name: templates
dir: tests/t/templates
target: templates_test
run: true
- name: cmdline
dir: tests/c/cmdline
target: cmdline_test
run: true
run_args: test_input
- name: llmapi
dir: tests/l/llmapi
target: llmapi_test
run: false
- name: llmapi-capi
dir: tests/l/llmapi/capi
target: llmapi_test_c
run: false
- name: lua
dir: tests/l/lua
target: lua_test
run: true
platform:
- os: ubuntu-24.04
setup: |
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
toolchain: gcc
- os: macos-15
setup: brew install llvm@20
toolchain: llvm
sdk: /opt/homebrew/opt/llvm@20
runs-on: ${{ matrix.platform.os }}
name: ${{ matrix.test.name }} (${{ matrix.platform.os }})
steps:
- uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Setup toolchain
run: ${{ matrix.platform.setup }}
- name: Configure
working-directory: ${{ matrix.test.dir }}
run: |
if [ -n "${{ matrix.platform.sdk }}" ]; then
xmake f -y --toolchain=${{ matrix.platform.toolchain }} --sdk=${{ matrix.platform.sdk }}
else
xmake f -y --toolchain=${{ matrix.platform.toolchain }}
fi
- name: Build
working-directory: ${{ matrix.test.dir }}
run: xmake build ${{ matrix.test.target }}
- name: Run
if: matrix.test.run
working-directory: ${{ matrix.test.dir }}
run: xmake run ${{ matrix.test.target }} ${{ matrix.test.run_args }}