Skip to content

Commit 087af84

Browse files
author
Julian LALU
committed
Add mingw compilation
Group header files by elements instead of OSes
1 parent 3299000 commit 087af84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2196
-2226
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Windows MinGW 64 build & test
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
build-and-tests:
9+
runs-on: windows-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
- name: Install MinGW dependencies
14+
run: |
15+
C:/msys64/usr/bin/pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain --noconfirm
16+
$env:Path += ";C:\msys64\ucrt64\bin"
17+
- name: Generate
18+
run: cmake.exe --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER:FILEPATH="gcc.exe" -DCMAKE_CXX_COMPILER:FILEPATH="g++.exe" -Btarget -G "MinGW Makefiles"
19+
- name: Build
20+
run: cmake --build target -- -j 8
21+
- name: Test
22+
run: ctest --test-dir target -j8 -C Release -T test --output-on-failure
23+
# No test report for the moment
24+
# - name: Test Report
25+
# uses: dorny/test-reporter@v1
26+
# if: success() || failure()
27+
# with:
28+
# name: Windows CityHash Test Report
29+
# path: target/test/test_*_report.xml
30+
# reporter: java-junit
31+
- name: Release
32+
run: |
33+
xcopy target\test\Release release\ /s /y
34+
xcopy target\src\Release release\ /s /y
35+
xcopy src\cityhash release\cityhash\ /s /y
36+
- name: Upload artifacts
37+
uses: actions/[email protected]
38+
with:
39+
name: windows_mingw_64
40+
path: release\**

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ cmake_minimum_required(VERSION 3.18)
22
# If operating system for which CMake to build is Windows set SDK version to 10
33
set(CMAKE_SYSTEM_VERSION 10.0)
44

5+
set(lib_name core)
6+
57
# Set project name
6-
project(core
8+
project(${lib_name}
79
DESCRIPTION "HUD Engine Core"
810
LANGUAGES CXX
911
)
1012

1113
# Create variable CMAKE_CXX_COMPILER_PATH
12-
get_filename_component(CMAKE_CXX_COMPILER_PATH ${CMAKE_CXX_COMPILER} DIRECTORY)
14+
#get_filename_component(CMAKE_CXX_COMPILER_PATH ${CMAKE_CXX_COMPILER} DIRECTORY)
1315

1416
add_subdirectory(src)
1517
enable_testing()

0 commit comments

Comments
 (0)