Match CI with bx. (#3702)

This commit is contained in:
Branimir Karadžić
2026-05-03 18:39:29 -07:00
committed by GitHub
parent 87c1929d71
commit 4a8489a549
2 changed files with 104 additions and 58 deletions

View File

@@ -14,41 +14,38 @@ jobs:
fail-fast: true fail-fast: true
matrix: matrix:
include: [ include: [
{ config: Debug, platform: Win32, bindir: 'win32_vs2022' }, { config: Debug, platform: x64, bindir: 'win64_vs2022', genie-action: 'vs2022', solution-ext: 'sln' },
{ config: Debug, platform: x64, bindir: 'win64_vs2022' }, { config: Release, platform: x64, bindir: 'win64_vs2022', genie-action: 'vs2022', solution-ext: 'sln' },
{ config: Release, platform: Win32, bindir: 'win32_vs2022' },
{ config: Release, platform: x64, bindir: 'win64_vs2022' },
] ]
name: msvc-${{ matrix.config }}-${{ matrix.platform }} name: msvc-${{ matrix.config }}-${{ matrix.platform }}
runs-on: windows-2022 runs-on: windows-latest
steps: steps:
- name: Checkout bgfx - name: Checkout bgfx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: bgfx path: bgfx
- name: Checkout bx - name: Checkout bx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bx repository: bkaradzic/bx
path: bx path: bx
- name: Checkout bimg - name: Checkout bimg
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bimg repository: bkaradzic/bimg
path: bimg path: bimg
- name: Prepare - name: Prepare
uses: microsoft/setup-msbuild@v1.1 uses: microsoft/setup-msbuild@v2
- name: Build - name: Build
shell: cmd shell: cmd
run: | run: |
cd bgfx cd bgfx
..\bx\tools\bin\windows\genie.exe --with-tools --with-combined-examples --with-shared-lib vs2022 ..\bx\tools\bin\windows\genie.exe --with-tools --with-combined-examples --with-shared-lib ${{ matrix.genie-action }}
msbuild ".build/projects/vs2022/bgfx.sln" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }} msbuild ".build/projects/${{ matrix.genie-action }}/bgfx.${{ matrix.solution-ext }}" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
- name: Check - name: Check
shell: cmd shell: cmd
run: | run: |
cd bgfx cd bgfx
dir /s ".build\${{ matrix.bindir }}\bin"
".build\${{ matrix.bindir }}\bin\geometryc${{ matrix.config }}.exe" --version ".build\${{ matrix.bindir }}\bin\geometryc${{ matrix.config }}.exe" --version
".build\${{ matrix.bindir }}\bin\shaderc${{ matrix.config }}.exe" --version ".build\${{ matrix.bindir }}\bin\shaderc${{ matrix.config }}.exe" --version
".build\${{ matrix.bindir }}\bin\texturec${{ matrix.config }}.exe" --version ".build\${{ matrix.bindir }}\bin\texturec${{ matrix.config }}.exe" --version
@@ -58,22 +55,22 @@ jobs:
matrix: matrix:
include: [ include: [
{ msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' }, { msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' },
# { msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' }, { msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' },
] ]
name: mingw-${{ matrix.msystem }} name: mingw-${{ matrix.msystem }}
runs-on: windows-2022 runs-on: windows-2022
steps: steps:
- name: Checkout bgfx - name: Checkout bgfx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: bgfx path: bgfx
- name: Checkout bx - name: Checkout bx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bx repository: bkaradzic/bx
path: bx path: bx
- name: Checkout bimg - name: Checkout bimg
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bimg repository: bkaradzic/bimg
path: bimg path: bimg
@@ -93,7 +90,6 @@ jobs:
shell: cmd shell: cmd
run: | run: |
cd bgfx cd bgfx
dir /s ".build\${{ matrix.bindir }}\bin"
".build\${{ matrix.bindir }}\bin\geometrycRelease.exe" --version ".build\${{ matrix.bindir }}\bin\geometrycRelease.exe" --version
".build\${{ matrix.bindir }}\bin\shadercRelease.exe" --version ".build\${{ matrix.bindir }}\bin\shadercRelease.exe" --version
".build\${{ matrix.bindir }}\bin\texturecRelease.exe" --version ".build\${{ matrix.bindir }}\bin\texturecRelease.exe" --version
@@ -102,23 +98,25 @@ jobs:
fail-fast: true fail-fast: true
matrix: matrix:
include: [ include: [
{ config: debug, binsuffix: Debug }, { compiler: gcc, config: debug, binsuffix: Debug, bindir: linux64_gcc },
{ config: release, binsuffix: Release }, { compiler: gcc, config: release, binsuffix: Release, bindir: linux64_gcc },
{ compiler: clang, config: debug, binsuffix: Debug, bindir: linux64_clang },
{ compiler: clang, config: release, binsuffix: Release, bindir: linux64_clang },
] ]
name: linux-gcc-${{ matrix.config }}64 name: linux-${{ matrix.compiler }}-${{ matrix.config }}64
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- name: Checkout bgfx - name: Checkout bgfx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: bgfx path: bgfx
- name: Checkout bx - name: Checkout bx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bx repository: bkaradzic/bx
path: bx path: bx
- name: Checkout bimg - name: Checkout bimg
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bimg repository: bkaradzic/bimg
path: bimg path: bimg
@@ -126,15 +124,88 @@ jobs:
run: | run: |
sudo apt install libgl-dev sudo apt install libgl-dev
cd bgfx cd bgfx
make -j$(nproc) linux-gcc-${{ matrix.config }}64 make -j$(nproc) linux-${{ matrix.compiler }}-${{ matrix.config }}64
- name: Check - name: Check
run: | run: |
cd bgfx cd bgfx
ls -lash ".build/linux64_gcc/bin" ".build/${{ matrix.bindir }}/bin/geometryc${{ matrix.binsuffix }}" --version
".build/linux64_gcc/bin/geometryc${{ matrix.binsuffix}}" --version ".build/${{ matrix.bindir }}/bin/shaderc${{ matrix.binsuffix }}" --version
".build/linux64_gcc/bin/shaderc${{ matrix.binsuffix}}" --version ".build/${{ matrix.bindir }}/bin/texturec${{ matrix.binsuffix }}" --version
".build/linux64_gcc/bin/texturec${{ matrix.binsuffix}}" --version
osx: osx:
strategy:
fail-fast: true
matrix:
include: [
{ runs-on: macos-13, arch: osx-x64, bindir: osx-x64, config: debug, binsuffix: Debug },
{ runs-on: macos-13, arch: osx-x64, bindir: osx-x64, config: release, binsuffix: Release },
{ runs-on: macos-14, arch: osx-arm64, bindir: osx-arm64, config: debug, binsuffix: Debug },
{ runs-on: macos-14, arch: osx-arm64, bindir: osx-arm64, config: release, binsuffix: Release },
]
name: osx-${{ matrix.arch }}-${{ matrix.config }}
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout bgfx
uses: actions/checkout@v6
with:
path: bgfx
- name: Checkout bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- name: Checkout bimg
uses: actions/checkout@v6
with:
repository: bkaradzic/bimg
path: bimg
- name: Build
run: |
cd bgfx
make -j$(sysctl -n hw.physicalcpu) ${{ matrix.arch }}-${{ matrix.config }}
- name: Check
run: |
cd bgfx
".build/${{ matrix.bindir }}/bin/geometryc${{ matrix.binsuffix }}" --version
".build/${{ matrix.bindir }}/bin/shaderc${{ matrix.binsuffix }}" --version
".build/${{ matrix.bindir }}/bin/texturec${{ matrix.binsuffix }}" --version
android:
strategy:
fail-fast: true
matrix:
include: [
{ project: android-arm, bindir: android-arm },
{ project: android-arm64, bindir: android-arm64 },
]
name: ${{ matrix.project }}
runs-on: ubuntu-24.04
steps:
- name: Checkout bgfx
uses: actions/checkout@v6
with:
path: bgfx
- name: Checkout bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- name: Checkout bimg
uses: actions/checkout@v6
with:
repository: bkaradzic/bimg
path: bimg
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27c
- name: Build
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ARM: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ARM64: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
cd bgfx
make -j$(nproc) ${{ matrix.project }}-release
emscripten:
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
@@ -142,70 +213,27 @@ jobs:
{ config: debug, binsuffix: Debug }, { config: debug, binsuffix: Debug },
{ config: release, binsuffix: Release }, { config: release, binsuffix: Release },
] ]
name: osx-arm64-${{ matrix.config }} name: wasm-${{ matrix.config }}
runs-on: macos-14
steps:
- name: Checkout bgfx
uses: actions/checkout@v4
with:
path: bgfx
- name: Checkout bx
uses: actions/checkout@v4
with:
repository: bkaradzic/bx
path: bx
- name: Checkout bimg
uses: actions/checkout@v4
with:
repository: bkaradzic/bimg
path: bimg
- name: Build
run: |
cd bgfx
make -j$(sysctl -n hw.physicalcpu) osx-arm64-${{ matrix.config }}
- name: Check
run: |
cd bgfx
ls -lash ".build/osx-arm64/bin"
".build/osx-arm64/bin/geometryc${{ matrix.binsuffix}}" --version
".build/osx-arm64/bin/shaderc${{ matrix.binsuffix}}" --version
".build/osx-arm64/bin/texturec${{ matrix.binsuffix}}" --version
android:
strategy:
fail-fast: true
matrix:
include: [
{ platform: arm64 },
]
name: android-${{ matrix.platform }}
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25b
add-to-path: false
- name: Checkout bgfx - name: Checkout bgfx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: bgfx path: bgfx
- name: Checkout bx - name: Checkout bx
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bx repository: bkaradzic/bx
path: bx path: bx
- name: Checkout bimg - name: Checkout bimg
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: bkaradzic/bimg repository: bkaradzic/bimg
path: bimg path: bimg
- uses: mymindstorm/setup-emsdk@v14
with:
version: 5.0.2
- name: Build - name: Build
run: | run: |
cd bgfx cd bgfx
make -j$(sysctl -n hw.physicalcpu) android-${{ matrix.platform }} make -j$(nproc) wasm-${{ matrix.config }} EMSCRIPTEN=$EMSDK/upstream/emscripten
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Check
run: |
cd bgfx
ls -lash ".build/android-${{ matrix.platform }}/bin"

View File

@@ -42,8 +42,10 @@ projgen: ## Generate project files for all configurations.
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-clang gmake $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-clang gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-arm64 gmake $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-arm64 gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-x64 gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode9 $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode9
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode9 $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode9
$(GENIE) --with-combined-examples --with-shared-lib --gcc=android-arm gmake
$(GENIE) --with-combined-examples --with-shared-lib --gcc=android-arm64 gmake $(GENIE) --with-combined-examples --with-shared-lib --gcc=android-arm64 gmake
$(GENIE) --with-combined-examples --gcc=ios-arm64 gmake $(GENIE) --with-combined-examples --gcc=ios-arm64 gmake
$(GENIE) --with-combined-examples --gcc=rpi gmake $(GENIE) --with-combined-examples --gcc=rpi gmake
@@ -52,6 +54,14 @@ idl: ## Generate code from IDL.
@echo Generating code from IDL. @echo Generating code from IDL.
cd scripts && ../$(GENIE) idl cd scripts && ../$(GENIE) idl
.build/projects/gmake-android-arm:
$(GENIE) --gcc=android-arm --with-combined-examples --with-shared-lib gmake
android-arm-debug: .build/projects/gmake-android-arm ## Build - Android ARM Debug
$(MAKE) -R -C .build/projects/gmake-android-arm config=debug
android-arm-release: .build/projects/gmake-android-arm ## Build - Android ARM Release
$(MAKE) -R -C .build/projects/gmake-android-arm config=release
android-arm: android-arm-debug android-arm-release ## Build - Android ARM Debug and Release
.build/projects/gmake-android-arm64: .build/projects/gmake-android-arm64:
$(GENIE) --gcc=android-arm64 --with-combined-examples --with-shared-lib gmake $(GENIE) --gcc=android-arm64 --with-combined-examples --with-shared-lib gmake
android-arm64-debug: .build/projects/gmake-android-arm64 ## Build - Android ARM64 Debug android-arm64-debug: .build/projects/gmake-android-arm64 ## Build - Android ARM64 Debug
@@ -128,6 +138,14 @@ osx-arm64-release: .build/projects/gmake-osx-arm64 ## Build - macOS ARM Release
$(MAKE) -C .build/projects/gmake-osx-arm64 config=release $(MAKE) -C .build/projects/gmake-osx-arm64 config=release
osx-arm64: osx-arm64-debug osx-arm64-release ## Build - macOS ARM Debug and Release osx-arm64: osx-arm64-debug osx-arm64-release ## Build - macOS ARM Debug and Release
.build/projects/gmake-osx-x64:
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-x64 gmake
osx-x64-debug: .build/projects/gmake-osx-x64 ## Build - macOS x64 Debug
$(MAKE) -C .build/projects/gmake-osx-x64 config=debug
osx-x64-release: .build/projects/gmake-osx-x64 ## Build - macOS x64 Release
$(MAKE) -C .build/projects/gmake-osx-x64 config=release
osx-x64: osx-x64-debug osx-x64-release ## Build - macOS x64 Debug and Release
.build/projects/gmake-ios-arm64: .build/projects/gmake-ios-arm64:
$(GENIE) --gcc=ios-arm64 gmake $(GENIE) --gcc=ios-arm64 gmake
ios-arm64-debug: .build/projects/gmake-ios-arm64 ## Build - iOS ARM64 Debug ios-arm64-debug: .build/projects/gmake-ios-arm64 ## Build - iOS ARM64 Debug