forked from dearimgui/dear_bindings
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 1.95 KB
/
build.yml
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
name: build
on:
push:
pull_request:
workflow_run:
# Use a workflow as a trigger of scheduled builds. Forked repositories can disable scheduled builds by disabling
# "scheduled" workflow, while maintaining ability to perform local CI builds.
workflows:
- scheduled
types:
- requested
jobs:
Linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
branch:
- master
- docking
compiler:
- gcc
- clang
steps:
# Checkout both repositories
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
path: imgui
repository: ocornut/imgui
ref: ${{ matrix.branch }}
fetch-depth: 1
- name: Dependencies
run: |
sudo pip3 install ply
- name: Generate
run: |
python3 dear_bindings.py --output cimgui imgui/imgui.h --generateexplodedvarargsfunctions --generateunformattedfunctions
# imgui_internal.h disabled for now as it generates errors
# python3 dear_bindings.py --output cimgui_internal imgui/imgui_internal.h
- name: Build
run: |
# FIXME: cimgui_internal.cpp can be added when generator produces compilable result.
${{ matrix.compiler }} \
-o example_null \
-Iimgui -I. \
-x c examples/example_null.c \
-x c++ cimgui.cpp \
imgui/imgui.cpp \
imgui/imgui_demo.cpp \
imgui/imgui_draw.cpp \
imgui/imgui_tables.cpp \
imgui/imgui_widgets.cpp \
-lm -lstdc++
- name: Run
run: ./example_null
- uses: actions/upload-artifact@v3
with:
name: dear_bindings_${{ matrix.branch }}
path: |
cimgui.*
cimgui_internal.*