Skip to content
Open
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
54 changes: 54 additions & 0 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: MinGW Clang64 Full Pipeline

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

jobs:
build:
strategy:
fail-fast: false
matrix:
profile: [RelWithDebInfo, Debug]

name: MinGW Clang64 Build (${{ matrix.profile }})
runs-on: windows-2025

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


- name: Setup MSYS2
id: msys2
uses: msys2/setup-msys2@v2
with:
msystem: clang64
update: true
install: >-
git
mingw-w64-clang-x86_64-toolchain
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-ninja

- name: Configure
run: >
cmake -GNinja
-B${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{ matrix.profile }}
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang

- name: Build
run: >
cmake
--build ${{github.workspace}}/build
--parallel

- name: Test
run: |
cd ${{github.workspace}}/build
ctest

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,10 @@ function(add_warning_flags name)
$<$<CXX_COMPILER_ID:MSVC>:/Zi /W4 /WX /wd4127 /wd4324 /wd4201>
$<$<NOT:$<OR:$<CXX_COMPILER_ID:MSVC>,$<STREQUAL:${CMAKE_CXX_SIMULATE_ID},MSVC>>>:-fno-rtti -Wall -Wextra -Werror -Wundef>
$<$<CXX_COMPILER_ID:Clang>:-Wsign-conversion -Wconversion>)

target_link_options(${name} PRIVATE
$<$<BOOL:${SNMALLOC_LINKER_SUPPORT_NO_ALLOW_SHLIB_UNDEF}>:-Wl,--no-undefined>
$<$<PLATFORM_ID:Windows>:$<${ci_or_debug}:/DEBUG>>)
$<$<PLATFORM_ID:Windows>:$<${ci_or_debug}:LINKER:/DEBUG>>)
endfunction()

# To build with just the header library target define SNMALLOC_HEADER_ONLY_LIBRARY
Expand Down
Loading