Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Matrix

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
build:
name: Build ${{ matrix.config }} for ${{ matrix.arch }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
config: [Debug, Release, RelWithDebInfo, MinSizeRel]
arch: [x86_64-linux-gnu, x86_64-w64-mingw32]

container:
image: debian:trixie
options: --user root

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y \
clangd \
clang-format \
sudo \
locales \
doxygen \
git \
build-essential \
make \
pkg-config \
cmake \
ninja-build \
yq \
jq \
gcc-mingw-w64-x86-64 \
g++-mingw-w64-x86-64

- name: Setup locale
run: |
locale-gen en_GB.UTF-8
update-locale

- name: Make build script executable
run: chmod +x scripts/build.sh

- name: Build ${{ matrix.config }} for ${{ matrix.arch }}
run: ./scripts/build.sh ${{ matrix.config }} ${{ matrix.arch }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.config }}-${{ matrix.arch }}
path: build-${{ matrix.arch }}/bin/
retention-days: 7
4 changes: 2 additions & 2 deletions toolchain/cmake-x86_64-w64-mingw32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set(CMAKE_SYSTEM_INCLUDE_PATH /usr/x86_64-w64-mingw32/include)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldbghelp")

# runtime deps for mingw
file( COPY /usr/lib/gcc/x86_64-w64-mingw32/14-win32/libstdc++-6.dll build-${BUILD_ARCH}/bin/libstdc++-6.dll
/usr/lib/gcc/x86_64-w64-mingw32/14-win32/libgcc_s_seh-1.dll build-${BUILD_ARCH}/bin/libgcc_s_seh-1.dll
file( COPY /usr/lib/gcc/x86_64-w64-mingw32/13-win32/libstdc++-6.dll
/usr/lib/gcc/x86_64-w64-mingw32/13-win32/libgcc_s_seh-1.dll
DESTINATION ${CMAKE_BINARY_DIR}/bin/ )
Loading