Skip to content

Commit

Permalink
.workflow: add mingw ci builds (#36)
Browse files Browse the repository at this point in the history
Add mingw-w64 builds to the CI


---------

Signed-off-by: Jan Kraemer <[email protected]>
Co-authored-by: Daniel Edwards <[email protected]>
  • Loading branch information
VJanKraemer and VDanielEdwards authored Sep 16, 2024
1 parent 4933593 commit d732f2b
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 15 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-mingw64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'mingw64 release Builds'
on:
workflow_call:
inputs:
do_package:
required: false
type: boolean
default: false
do_package_symbols:
required: false
type: boolean
default: false
retention_days:
required: false
type: number
default: 14
run_build:
required: true
type: boolean

jobs:
gcc13-release:
name: GCC 13.2 release Builds for mingw64
environment: public-github-runners
runs-on: windows-latest
if: inputs.run_build == true
steps:
- name: setup
run: |
echo "C:\msys64" >> $GITHUB_PATH
echo "C:\msys64\mingw64\bin\" >> $GITHUB_PATH
- name: Install Dependencies
run: |
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja --noconfirm
export PATH="/mingw64/bin/:$PATH"
shell: C:\shells\msys2bash.cmd {0}
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure
id: cmake-configure-mingw64
run: |
export PATH="/mingw64/bin/:$PATH"
echo "PATH: $PATH"
cmake --preset gcc-release -DSILKIT_BUILD_DOCS=OFF
shell: C:\shells\msys2bash.cmd {0}
- name: Build
id: cmake-build-mingw64
run: |
export PATH="/mingw64/bin/:$PATH"
echo "PATH: $PATH"
cmake --build --preset gcc-release
shell: C:\shells\msys2bash.cmd {0}
- name: Test
id: cmake-test-mingw64
run: |
export PATH="/mingw64/bin/:$PATH"
echo "PATH: $PATH"
ctest --preset gcc-release --output-on-failure
shell: C:\shells\msys2bash.cmd {0}
8 changes: 8 additions & 0 deletions .github/workflows/sil-kit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,11 @@ jobs:
do_package: ${{ github.event_name == 'push' && true || false }}
retention_days: ${{ github.event_name == 'push' && 90 || 14 }}
run_build: ${{ needs.check-run-builds.outputs.run_builds == 'true' }}

mingw-release-builds:
uses: ./.github/workflows/build-mingw64.yml
needs: [check-licenses, check-run-builds, check-formatting]
with:
do_package: ${{ github.event_name == 'push' && true || false }}
retention_days: ${{ github.event_name == 'push' && 90 || 14 }}
run_build: ${{ needs.check-run-builds.outputs.run_builds == 'true' }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ _build_*/
# ignore cmake CMakeUserPresets
CMakeUserPresets.json

#ignore vim swap files
*.swp
28 changes: 13 additions & 15 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@
}
},


{
"name": "mixin-clang10",
"description": "Target clang 10",
Expand Down Expand Up @@ -451,13 +450,17 @@

{
"name": "gcc-debug",
"inherits": [ "mixin-posix", "mixin-dirs", "mixin-ninja", "mixin-debug", "mixin-gcc", "mixin-werror" ]
"inherits": [ "mixin-dirs", "mixin-ninja", "mixin-debug", "mixin-gcc", "mixin-werror" ]
},

{
"name": "gcc-release",
"inherits": [ "mixin-release", "gcc-debug", "mixin-build-docs" ]
},
{
"name": "gcc-relwithdebinfo",
"inherits": [ "mixin-relwithdebinfo", "gcc-debug", "mixin-build-docs" ]
},

{
"name": "gcc8-debug",
Expand Down Expand Up @@ -695,6 +698,10 @@
"name": "gcc-release",
"configurePreset": "gcc-release"
},
{
"name": "gcc-relwithdebinfo",
"configurePreset": "gcc-relwithdebinfo"
},

{
"name": "gcc8-debug",
Expand Down Expand Up @@ -938,7 +945,10 @@
"name": "gcc-release",
"configurePreset": "gcc-release"
},

{
"name": "gcc-relwithdebinfo",
"configurePreset": "gcc-relwithdebinfo"
},
{
"name": "gcc8-debug",
"configurePreset": "gcc8-debug"
Expand Down Expand Up @@ -1012,18 +1022,6 @@
"name": "clang15-relwithdebinfo",
"configurePreset": "clang15-relwithdebinfo"
},
{
"name": "clang-debug",
"configurePreset": "clang-debug"
},
{
"name": "clang-release",
"configurePreset": "clang-release"
},
{
"name": "clang-relwithdebinfo",
"configurePreset": "clang-relwithdebinfo"
},
{
"name": "clang12-asan-debug",
"configurePreset": "clang12-asan-debug"
Expand Down
1 change: 1 addition & 0 deletions SilKit/cmake/SilKitBuildSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function(silkit_enable_warnings isOn)
-Wcast-align
-Wpacked
-Wno-implicit-fallthrough
-Wno-error=dangling-reference

-Wno-shadow # Appears in ThirdParty/spdlog/include/spdlog/common.h:214:9
-Wno-format # MinGW-gcc does not recognize %zu
Expand Down

0 comments on commit d732f2b

Please sign in to comment.