mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Fix building with MinGW 11.2.0 on Windows, add it into CI/CD
This commit is contained in:
parent
9bb0549ad2
commit
6247fa5bbc
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@ -87,7 +87,7 @@ jobs:
|
|||||||
- name: Build everything
|
- name: Build everything
|
||||||
run: ninja -C build-meson
|
run: ninja -C build-meson
|
||||||
|
|
||||||
build_win:
|
build_windows:
|
||||||
name: Build on Windows
|
name: Build on Windows
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
- name: Configure UEFIExtract
|
- name: Configure UEFIExtract
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build/UEFIExtract
|
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
|
- name: Build UEFIExtract
|
||||||
working-directory: ${{runner.workspace}}/build/UEFIExtract
|
working-directory: ${{runner.workspace}}/build/UEFIExtract
|
||||||
@ -135,7 +135,7 @@ jobs:
|
|||||||
- name: Configure UEFIFind
|
- name: Configure UEFIFind
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build/UEFIFind
|
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
|
- name: Build UEFIFind
|
||||||
working-directory: ${{runner.workspace}}/build/UEFIFind
|
working-directory: ${{runner.workspace}}/build/UEFIFind
|
||||||
@ -186,6 +186,25 @@ jobs:
|
|||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
file_glob: true
|
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:
|
analyze_coverity:
|
||||||
env:
|
env:
|
||||||
PROJECT_TYPE: TOOL
|
PROJECT_TYPE: TOOL
|
||||||
@ -262,7 +281,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
|
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
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
sarif_file: pvs-report.sarif
|
sarif_file: pvs-report.sarif
|
||||||
|
@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(_WIN32) || defined(__MINGW32__)
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
static inline bool isExistOnFs(const UString & path) {
|
static inline bool isExistOnFs(const UString & path) {
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#define __BYTE_ORDER BYTE_ORDER
|
#define __BYTE_ORDER BYTE_ORDER
|
||||||
#define __BIG_ENDIAN BIG_ENDIAN
|
#define __BIG_ENDIAN BIG_ENDIAN
|
||||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||||
// Windows with MS compiler
|
// Windows with MS or MinGW compilers
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define __LITTLE_ENDIAN 1234
|
#define __LITTLE_ENDIAN 1234
|
||||||
#define __BIG_ENDIAN 4321
|
#define __BIG_ENDIAN 4321
|
||||||
|
Loading…
Reference in New Issue
Block a user