Fix building with MinGW 11.2.0 on Windows, add it into CI/CD

This commit is contained in:
Nikolaj Schlej 2022-09-27 17:36:27 +02:00 committed by Nikolaj Schlej
parent 9bb0549ad2
commit 6247fa5bbc
3 changed files with 26 additions and 7 deletions

View File

@ -87,7 +87,7 @@ jobs:
- name: Build everything
run: ninja -C build-meson
build_win:
build_windows:
name: Build on Windows
runs-on: windows-2019
steps:
@ -115,7 +115,7 @@ jobs:
- name: Configure UEFIExtract
shell: bash
working-directory: ${{runner.workspace}}/build/UEFIExtract
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" -DU_STATIC_RT=YES ../../UEFITool/UEFIExtract/
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" ../../UEFITool/UEFIExtract/
- name: Build UEFIExtract
working-directory: ${{runner.workspace}}/build/UEFIExtract
@ -135,7 +135,7 @@ jobs:
- name: Configure UEFIFind
shell: bash
working-directory: ${{runner.workspace}}/build/UEFIFind
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" -DU_STATIC_RT=YES ../../UEFITool/UEFIFind/
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" ../../UEFITool/UEFIFind/
- name: Build UEFIFind
working-directory: ${{runner.workspace}}/build/UEFIFind
@ -186,6 +186,25 @@ jobs:
tag: ${{ github.ref }}
file_glob: true
build_windows_mingw:
name: Build on Windows with MinGW
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.3.1'
host: 'windows'
target: 'desktop'
arch: 'win64_mingw'
- name: Build everything using CMake and MinGW
run: |
cmake -G "MinGW Makefiles" -B build .
cmake --build build -j
analyze_coverity:
env:
PROJECT_TYPE: TOOL
@ -262,7 +281,7 @@ jobs:
run: |
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
- name: Publish PVS-Studio report
- name: Publish PVS-Studio report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: pvs-report.sarif

View File

@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <sys/stat.h>
#include <fstream>
#ifdef WIN32
#if defined(_WIN32) || defined(__MINGW32__)
#include <direct.h>
#include <stdlib.h>
static inline bool isExistOnFs(const UString & path) {

View File

@ -12,8 +12,8 @@
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
// Windows with MS compiler
#elif defined(_MSC_VER)
// Windows with MS or MinGW compilers
#elif defined(_MSC_VER) || defined(__MINGW32__)
#include <stdlib.h>
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321