Files
bx/.github/workflows/main.yml
2026-05-04 07:53:54 -07:00

187 lines
6.2 KiB
YAML

name: CI
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
pull_request:
jobs:
msvc:
strategy:
fail-fast: true
matrix:
include: [
{ config: Debug, platform: x64, bindir: 'win64_vs2022', genie-action: 'vs2022', solution-ext: 'sln' },
{ config: Release, platform: x64, bindir: 'win64_vs2022', genie-action: 'vs2022', solution-ext: 'sln' },
# { config: Debug, platform: x64, bindir: 'win64_vs2026', genie-action: 'vs2026', solution-ext: 'slnx' },
# { config: Release, platform: x64, bindir: 'win64_vs2026', genie-action: 'vs2026', solution-ext: 'slnx' },
]
name: msvc-${{ matrix.config }}-${{ matrix.platform }}
runs-on: windows-latest
steps:
- name: Checkout bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- name: Prepare
uses: microsoft/setup-msbuild@v2
- name: Build
shell: cmd
run: |
cd bx
tools\bin\windows\genie.exe ${{ matrix.genie-action }}
msbuild ".build/projects/${{ matrix.genie-action }}/bx.${{ matrix.solution-ext }}" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
- name: Check
shell: cmd
run: |
cd bx
".build\${{ matrix.bindir }}\bin\bx.test${{ matrix.config }}.exe" -d yes
mingw:
strategy:
fail-fast: true
matrix:
include: [
{ msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' },
{ msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' },
]
name: mingw-${{ matrix.msystem }}
runs-on: windows-2022
steps:
- name: Checkout bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- name: Prepare
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: make
pacboy: cc:p
- name: Build
shell: msys2 {0}
run: |
cd bx
tools/bin/windows/genie.exe --gcc=${{ matrix.project }} gmake
make -R -C .build/projects/gmake-${{ matrix.project }} config=release64 -j$(nproc) AR=ar CC=cc CXX=c++ MINGW=$MINGW_PREFIX
- name: Check
shell: cmd
run: |
cd bx
".build\${{ matrix.bindir }}\bin\bx.testRelease.exe" -d yes
linux:
strategy:
fail-fast: true
matrix:
include: [
{ compiler: gcc, genie: linux-gcc, bindir: linux64_gcc, config: debug, binsuffix: Debug },
{ compiler: gcc, genie: linux-gcc, bindir: linux64_gcc, config: release, binsuffix: Release },
{ compiler: clang, genie: linux-clang, bindir: linux64_clang, config: debug, binsuffix: Debug },
{ compiler: clang, genie: linux-clang, bindir: linux64_clang, config: release, binsuffix: Release },
]
name: linux-${{ matrix.compiler }}-${{ matrix.config }}64
runs-on: ubuntu-24.04
steps:
- name: Checkout bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- name: Build
run: |
cd bx
tools/bin/linux/genie --gcc=${{ matrix.genie }} gmake
make -R -C .build/projects/gmake-${{ matrix.genie }} config=${{ matrix.config }}64 -j$(nproc)
- name: Check
run: |
cd bx
".build/${{ matrix.bindir }}/bin/bx.test${{ matrix.binsuffix }}" -d yes
osx:
strategy:
fail-fast: true
matrix:
include: [
{ 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 bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- name: Build
run: |
cd bx
tools/bin/darwin/genie --gcc=${{ matrix.arch }} gmake
make -C .build/projects/gmake-${{ matrix.arch }} config=${{ matrix.config }} -j$(sysctl -n hw.physicalcpu)
- name: Check
run: |
cd bx
".build/${{ matrix.bindir }}/bin/bx.test${{ matrix.binsuffix }}" -d yes
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 bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- 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 bx
tools/bin/linux/genie --gcc=${{ matrix.project }} gmake
make -R -C .build/projects/gmake-${{ matrix.project }} config=release -j$(nproc)
emscripten:
strategy:
fail-fast: true
matrix:
include: [
{ config: debug, binsuffix: Debug },
{ config: release, binsuffix: Release },
]
name: wasm-${{ matrix.config }}
runs-on: ubuntu-24.04
steps:
- name: Checkout bx
uses: actions/checkout@v6
with:
repository: bkaradzic/bx
path: bx
- uses: mymindstorm/setup-emsdk@v14
with:
version: 5.0.2
- uses: browser-actions/setup-chrome@v1
- name: Build
run: |
cd bx
tools/bin/linux/genie --gcc=wasm gmake
make -C .build/projects/gmake-wasm config=${{ matrix.config }} -j$(nproc) EMSCRIPTEN=$EMSDK/upstream/emscripten
- name: Check
run: |
cd bx
# npx http-server -o .build/wasm/bin/ & chromium http://127.0.0.1:8080/.build/wasm/bin/bx.testRelease.html