Skip to content

Commit 05c76a3

Browse files
committed
workflows: merge all build-lib-* workflows
1 parent 79fd3ed commit 05c76a3

File tree

4 files changed

+160
-168
lines changed

4 files changed

+160
-168
lines changed

.github/workflows/build-lib-linux.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/build-lib-macos.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/build-lib-win64.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/build-libs.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: Compile cimgui for all platforms
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-linux-x64:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@main
12+
13+
- name: add libs for glfw
14+
run: sudo apt install xorg-dev
15+
16+
- name: configure glfw
17+
run: cmake -S . -Bbuild
18+
working-directory: ./thirdparty/glfw
19+
20+
- name: make glfw
21+
run: make
22+
working-directory: ./thirdparty/glfw/build
23+
24+
- name: copy glfw to lib
25+
run: |
26+
cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/linux/x64
27+
28+
- name: configure cimgui
29+
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DIMGUI_STATIC=On
30+
working-directory: ./lib
31+
32+
- name: make cimgui
33+
run: make
34+
working-directory: ./lib/build
35+
36+
- name: copy cimgui to lib
37+
run: |
38+
mkdir -p ./lib/linux/x64
39+
cp -f ./lib/build/cimgui.a ./lib/linux/x64/
40+
41+
- uses: stefanzweifel/git-auto-commit-action@v4
42+
with:
43+
commit_message: Update linux lib from ci
44+
45+
build-windows-x64:
46+
needs: build-linux-x64
47+
runs-on: windows-latest
48+
49+
defaults:
50+
run:
51+
shell: msys2 {0}
52+
53+
steps:
54+
- uses: actions/checkout@main
55+
56+
- name: Install MinGW
57+
uses: msys2/setup-msys2@v2
58+
with:
59+
update: true
60+
install: >-
61+
make
62+
pacboy: >-
63+
toolchain:p
64+
cmake:p
65+
ninja:p
66+
67+
- name: configure glfw
68+
run: cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
69+
working-directory: ./thirdparty/glfw
70+
71+
- name: make glfw
72+
run: cmake --build build
73+
working-directory: ./thirdparty/glfw
74+
75+
- name: copy glfw to lib
76+
run: cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/windows/x64
77+
78+
- name: configure cimgui
79+
run: cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DIMGUI_STATIC=On
80+
working-directory: .\lib
81+
82+
- name: make cimgui
83+
run: cmake --build build
84+
working-directory: .\lib
85+
86+
- name: copy cimgui to lib
87+
run: cp -f ./lib/build/cimgui.a ./lib/windows/x64/
88+
89+
- uses: stefanzweifel/git-auto-commit-action@v4
90+
with:
91+
commit_message: Update windows lib from ci
92+
93+
build-macos:
94+
needs: build-windows-x64
95+
runs-on: macos-latest
96+
97+
steps:
98+
- uses: actions/checkout@main
99+
100+
- name: configure glfw for x64
101+
run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=x86_64
102+
working-directory: ./thirdparty/glfw
103+
104+
- name: make glfw x84
105+
run: make
106+
working-directory: ./thirdparty/glfw/build
107+
108+
- name: copy glfw to lib
109+
run: |
110+
cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/macos/x64
111+
112+
- name: clean glfw
113+
run: cmake --build ./build --target clean
114+
working-directory: ./thirdparty/glfw
115+
116+
- name: configure glfw for arm64
117+
run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=arm64
118+
working-directory: ./thirdparty/glfw
119+
120+
- name: make glfw arm64
121+
run: make
122+
working-directory: ./thirdparty/glfw/build
123+
124+
- name: copy glfw to lib
125+
run: |
126+
cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/macos/arm64
127+
128+
- name: configure cimgui for x64
129+
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DIMGUI_STATIC=On -DCMAKE_OSX_ARCHITECTURES=x86_64
130+
working-directory: ./cimgui
131+
132+
- name: make cimgui for x64
133+
run: make
134+
working-directory: ./lib/build
135+
136+
- name: copy cimgui x64 to lib
137+
run: |
138+
mkdir -p ./lib/macos/x64
139+
cp -f ./lib/build/cimgui.a ./lib/macos/x64/
140+
141+
- name: clean up
142+
run: cmake --build ./build --target clean
143+
working-directory: ./cimgui
144+
145+
- name: configure cimgui for arm64
146+
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DIMGUI_STATIC=On -DCMAKE_OSX_ARCHITECTURES=arm64
147+
working-directory: ./cimgui
148+
149+
- name: make cimgui for arm64
150+
run: make
151+
working-directory: ./lib/build
152+
153+
- name: copy cimgui arm64 to lib
154+
run: |
155+
mkdir -p ./lib/macos/arm64
156+
cp -f ./lib/build/cimgui.a ./lib/macos/arm64/
157+
158+
- uses: stefanzweifel/git-auto-commit-action@v4
159+
with:
160+
commit_message: Update macos lib from ci

0 commit comments

Comments
 (0)