Skip to content

Commit 7fdfe4c

Browse files
authored
[0721] 添加 ImGui CI (#3916)
1 parent 237ed63 commit 7fdfe4c

3 files changed

Lines changed: 145 additions & 0 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build ImGUI on Debian 13
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- "src/**"
8+
- "!src/Plugins/Macos/**"
9+
- "!src/Plugins/Windows/**"
10+
- "tests/**"
11+
- "lolly/**"
12+
- "moebius/**"
13+
- "xmake.lua"
14+
- 'xmake/options.lua'
15+
- 'xmake/requires.lua'
16+
- 'xmake/targets/**'
17+
- "xmake/packages.lua"
18+
- "xmake/packages/**"
19+
- ".github/workflows/ci-imgui-debian13.yml"
20+
- "TeXmacs/tests/*.scm"
21+
- "3rdparty/**"
22+
pull_request:
23+
branches: [ main ]
24+
paths:
25+
- "src/**"
26+
- "!src/Plugins/Macos/**"
27+
- "!src/Plugins/Windows/**"
28+
- "tests/**"
29+
- "lolly/**"
30+
- "moebius/**"
31+
- "xmake.lua"
32+
- 'xmake/options.lua'
33+
- 'xmake/requires.lua'
34+
- 'xmake/targets/**'
35+
- "xmake/packages.lua"
36+
- "xmake/packages/**"
37+
- ".github/workflows/ci-imgui-debian13.yml"
38+
- "TeXmacs/tests/*.scm"
39+
- "3rdparty/**"
40+
workflow_dispatch:
41+
42+
env:
43+
XMAKE_ROOT: y
44+
XMAKE_GLOBALDIR: /tmp/xmake-global
45+
46+
jobs:
47+
build:
48+
container: debian:13
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 45
51+
steps:
52+
- name: Install dependencies
53+
run: |
54+
DEBIAN_FRONTEND=noninteractive apt-get update
55+
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc g++ git curl build-essential cmake \
56+
libpng-dev libcurl4-openssl-dev libx11-dev libxcursor-dev libxi-dev \
57+
libxinerama-dev libxrandr-dev libgl1-mesa-dev libxkbcommon-dev \
58+
python3.13 python3.13-venv python3-pip ninja-build pkg-config unzip 7zip
59+
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1
60+
61+
- uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 0
64+
65+
- name: git add safe directory
66+
run: git config --global --add safe.directory '*'
67+
68+
- uses: xmake-io/github-action-setup-xmake@v1
69+
with:
70+
xmake-version: v3.0.7
71+
72+
- name: xmake repo --update
73+
run: xmake repo --update
74+
75+
- name: cache packages from xrepo
76+
uses: actions/cache@v4
77+
with:
78+
path: /tmp/xmake-global/.xmake/packages
79+
key: ${{ runner.os }}-xrepo-imgui-${{ hashFiles('xmake/vars.lua', 'lolly/xmake.lua', 'moebius/xmake.lua', 'xmake/requires.lua') }}
80+
81+
- name: config
82+
run: xmake config -vD --qt_frontend=no --policies=build.ccache --yes
83+
84+
- name: build stem
85+
run: xmake b -vD stem
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build ImGUI on macOS
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/Plugins/ImGui/**'
8+
- ".github/workflows/ci-imgui-macos.yml"
9+
pull_request:
10+
branches: [ main ]
11+
paths:
12+
- 'src/Plugins/ImGui/**'
13+
- ".github/workflows/ci-imgui-macos.yml"
14+
workflow_dispatch:
15+
16+
jobs:
17+
macosbuild:
18+
strategy:
19+
matrix:
20+
os: [macos-14]
21+
arch: [arm64]
22+
runs-on: ${{ matrix.os }}
23+
timeout-minutes: 45
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: set XMAKE_GLOBALDIR
30+
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
31+
32+
- uses: xmake-io/github-action-setup-xmake@v1
33+
with:
34+
xmake-version: v3.0.7
35+
actions-cache-folder: '.xmake-cache'
36+
37+
- name: xmake repo --update
38+
run: xmake repo --update
39+
40+
- name: cache packages from xrepo
41+
uses: actions/cache@v4
42+
with:
43+
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
44+
key: ${{ runner.os }}-xrepo-imgui-${{ matrix.arch }}-${{ hashFiles('xmake/vars.lua', 'lolly/xmake.lua', 'moebius/xmake.lua') }}
45+
46+
- name: config
47+
run: xmake config -vD --qt_frontend=no --policies=build.ccache --yes
48+
49+
- name: build stem
50+
run: xmake b -vD stem

devel/0721.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# [0721] 添加 ImGui CI
2+
3+
## What
4+
添加了 ImGui 在 Debian, macOS 上的 CI
5+
6+
目前 Debian CI 的触发条件与现有的 CI 保持一致。
7+
8+
macOS 的触发条件仅为修改了 `src/Plugins/ImGui` 下的文件
9+
10+
Windows 在编译 `brush.cpp` 的时候似乎遇到了 `if not defined` 宏的问题,因此暂时没有添加

0 commit comments

Comments
 (0)