Skip to content

Commit 77d584b

Browse files
committed
Added CI.
1 parent 2d4e6c6 commit 77d584b

File tree

1 file changed

+183
-0
lines changed

1 file changed

+183
-0
lines changed

.github/workflows/main.yml

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
name: CI
2+
3+
concurrency:
4+
group: ${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
pull_request:
10+
11+
jobs:
12+
msvc:
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
include: [
17+
{ config: Debug, platform: Win32, bindir: 'win32_vs2022' },
18+
{ config: Debug, platform: x64, bindir: 'win64_vs2022' },
19+
{ config: Release, platform: Win32, bindir: 'win32_vs2022' },
20+
{ config: Release, platform: x64, bindir: 'win64_vs2022' },
21+
]
22+
name: msvc-${{ matrix.config }}-${{ matrix.platform }}
23+
runs-on: windows-2022
24+
steps:
25+
- name: Checkout bx
26+
uses: actions/checkout@v4
27+
with:
28+
repository: bkaradzic/bx
29+
path: bx
30+
- name: Checkout bimg
31+
uses: actions/checkout@v4
32+
with:
33+
repository: bkaradzic/bimg
34+
path: bimg
35+
- name: Prepare
36+
uses: microsoft/[email protected]
37+
- name: Build
38+
shell: cmd
39+
run: |
40+
cd bimg
41+
..\bx\tools\bin\windows\genie.exe --with-tools --with-shared-lib vs2022
42+
msbuild ".build/projects/vs2022/bimg.sln" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
43+
- name: Check
44+
shell: cmd
45+
run: |
46+
cd bimg
47+
dir /s ".build\${{ matrix.bindir }}\bin"
48+
".build\${{ matrix.bindir }}\bin\texturec${{ matrix.config }}.exe" --version
49+
mingw:
50+
strategy:
51+
fail-fast: true
52+
matrix:
53+
include: [
54+
{ msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' },
55+
# { msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' },
56+
]
57+
name: mingw-${{ matrix.msystem }}
58+
runs-on: windows-2022
59+
steps:
60+
- name: Checkout bx
61+
uses: actions/checkout@v4
62+
with:
63+
repository: bkaradzic/bx
64+
path: bx
65+
- name: Checkout bimg
66+
uses: actions/checkout@v4
67+
with:
68+
repository: bkaradzic/bimg
69+
path: bimg
70+
- name: Prepare
71+
uses: msys2/setup-msys2@v2
72+
with:
73+
msystem: ${{ matrix.msystem }}
74+
update: true
75+
install: make
76+
pacboy: cc:p
77+
- name: Build
78+
shell: msys2 {0}
79+
run: |
80+
cd bimg
81+
make ${{ matrix.project }}-release64 -j$(nproc) AR=ar CC=cc CXX=c++ MINGW=$MINGW_PREFIX
82+
- name: Check
83+
shell: cmd
84+
run: |
85+
cd bimg
86+
dir /s ".build\${{ matrix.bindir }}\bin"
87+
".build\${{ matrix.bindir }}\bin\texturecRelease.exe" --version
88+
linux:
89+
strategy:
90+
fail-fast: true
91+
matrix:
92+
include: [
93+
{ config: debug, binsuffix: Debug },
94+
{ config: release, binsuffix: Release },
95+
]
96+
name: linux-gcc-${{ matrix.config }}64
97+
runs-on: ubuntu-24.04
98+
steps:
99+
- name: Checkout bx
100+
uses: actions/checkout@v4
101+
with:
102+
repository: bkaradzic/bx
103+
path: bx
104+
- name: Checkout bimg
105+
uses: actions/checkout@v4
106+
with:
107+
repository: bkaradzic/bimg
108+
path: bimg
109+
- name: Build
110+
run: |
111+
sudo apt install libgl-dev
112+
cd bimg
113+
make -j$(nproc) linux-gcc-${{ matrix.config }}64
114+
- name: Check
115+
run: |
116+
cd bgfx
117+
ls -lash ".build/linux64_gcc/bin"
118+
".build/linux64_gcc/bin/texturec${{ matrix.binsuffix}}" --version
119+
osx:
120+
strategy:
121+
fail-fast: true
122+
matrix:
123+
include: [
124+
{ config: debug, binsuffix: Debug },
125+
{ config: release, binsuffix: Release },
126+
]
127+
name: osx-arm64-${{ matrix.config }}
128+
runs-on: macos-14
129+
steps:
130+
- name: Checkout bx
131+
uses: actions/checkout@v4
132+
with:
133+
repository: bkaradzic/bx
134+
path: bx
135+
- name: Checkout bimg
136+
uses: actions/checkout@v4
137+
with:
138+
repository: bkaradzic/bimg
139+
path: bimg
140+
- name: Build
141+
run: |
142+
cd bimg
143+
make -j$(sysctl -n hw.physicalcpu) osx-arm64-${{ matrix.config }}
144+
- name: Check
145+
run: |
146+
cd bgfx
147+
ls -lash ".build/osx-arm64/bin"
148+
".build/osx-arm64/bin/texturec${{ matrix.binsuffix}}" --version
149+
android:
150+
strategy:
151+
fail-fast: true
152+
matrix:
153+
include: [
154+
{ platform: arm64 },
155+
]
156+
name: android-${{ matrix.platform }}
157+
runs-on: ubuntu-24.04
158+
steps:
159+
- uses: nttld/setup-ndk@v1
160+
id: setup-ndk
161+
with:
162+
ndk-version: r25b
163+
add-to-path: false
164+
- name: Checkout bx
165+
uses: actions/checkout@v4
166+
with:
167+
repository: bkaradzic/bx
168+
path: bx
169+
- name: Checkout bimg
170+
uses: actions/checkout@v4
171+
with:
172+
repository: bkaradzic/bimg
173+
path: bimg
174+
- name: Build
175+
run: |
176+
cd bimg
177+
make -j$(sysctl -n hw.physicalcpu) android-${{ matrix.platform }}
178+
env:
179+
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
180+
- name: Check
181+
run: |
182+
cd bimg
183+
ls -lash ".build/android-${{ matrix.platform }}/bin"

0 commit comments

Comments
 (0)