mirror of https://github.com/WerWolv/ImHex
git: Added MSVC build CI (#2115)
This commit is contained in:
parent
b70120a248
commit
b46deb3fa0
|
|
@ -15,8 +15,8 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# Windows build
|
# Windows MINGW build
|
||||||
win:
|
win_mingw:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
name: 🪟 Windows MINGW64
|
name: 🪟 Windows MINGW64
|
||||||
|
|
||||||
|
|
@ -41,8 +41,8 @@ jobs:
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
id: cache-ccache
|
id: cache-ccache
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-ccache-${{ github.run_id }}
|
key: ${{ runner.os }}-mingw-ccache-${{ github.run_id }}
|
||||||
restore-keys: ${{ runner.os }}-ccache
|
restore-keys: ${{ runner.os }}-mingw-ccache
|
||||||
max-size: 1G
|
max-size: 1G
|
||||||
|
|
||||||
- name: 🟦 Install msys2
|
- name: 🟦 Install msys2
|
||||||
|
|
@ -178,6 +178,80 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
build/install/*
|
build/install/*
|
||||||
|
|
||||||
|
win_msvc:
|
||||||
|
runs-on: windows-2022
|
||||||
|
name: 🪟 Windows MSVC
|
||||||
|
|
||||||
|
env:
|
||||||
|
CCACHE_DIR: "${{ github.workspace }}/.ccache"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 🧰 Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: 🫧 Setup Visual Studio Dev Environment
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
with:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
- name: 📜 Setup ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
id: cache-ccache
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-msvc-ccache-${{ github.run_id }}
|
||||||
|
restore-keys: ${{ runner.os }}-msvc-ccache
|
||||||
|
max-size: 1G
|
||||||
|
|
||||||
|
- name: 📦 Install vcpkg
|
||||||
|
uses: friendlyanon/setup-vcpkg@v1
|
||||||
|
with: { committish: 7e21420f775f72ae938bdeb5e6068f722088f06a }
|
||||||
|
|
||||||
|
- name: ⬇️ Install dependencies
|
||||||
|
run: |
|
||||||
|
cp dist/vcpkg.json vcpkg.json
|
||||||
|
|
||||||
|
- name: ⬇️ Install CMake and Ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
|
|
||||||
|
- name: ⬇️ Install .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.100'
|
||||||
|
|
||||||
|
- name: 📜 Set version variable
|
||||||
|
run: |
|
||||||
|
"IMHEX_VERSION=$(Get-Content VERSION -Raw)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
|
# Windows cmake build
|
||||||
|
- name: 🛠️ Configure CMake
|
||||||
|
run: |
|
||||||
|
mkdir -p build
|
||||||
|
|
||||||
|
cmake -G "Ninja" -B build `
|
||||||
|
--preset vs2022 `
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
|
||||||
|
-DCMAKE_C_COMPILER="$($(Get-Command cl.exe).Path)" `
|
||||||
|
-DCMAKE_CXX_COMPILER="$($(Get-Command cl.exe).Path)" `
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache `
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache `
|
||||||
|
-DCMAKE_BUILD_TYPE="$env:BUILD_TYPE" `
|
||||||
|
-DIMHEX_PATTERNS_PULL_MASTER=ON `
|
||||||
|
-DIMHEX_COMMIT_HASH_LONG="$env:GITHUB_SHA" `
|
||||||
|
-DIMHEX_COMMIT_BRANCH="$($env:GITHUB_REF -replace '.*/', '')" `
|
||||||
|
-DDOTNET_EXECUTABLE="C:/Program Files/dotnet/dotnet.exe" `
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: 🛠️ Build
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ninja
|
||||||
|
|
||||||
win-plugin-template-test:
|
win-plugin-template-test:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
name: 🧪 Plugin Template Test
|
name: 🧪 Plugin Template Test
|
||||||
|
|
@ -186,7 +260,7 @@ jobs:
|
||||||
run:
|
run:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
|
||||||
needs: win
|
needs: win_mingw
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMHEX_SDK_PATH: "${{ github.workspace }}/out/sdk"
|
IMHEX_SDK_PATH: "${{ github.workspace }}/out/sdk"
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,4 @@ CMakeUserPresets.json
|
||||||
Brewfile.lock.json
|
Brewfile.lock.json
|
||||||
|
|
||||||
.vs/
|
.vs/
|
||||||
|
vcpkg.json
|
||||||
|
|
|
||||||
|
|
@ -1425,7 +1425,7 @@ namespace hex::plugin::builtin {
|
||||||
const auto &currScope = evaluator->getScope(-m_debuggerScopeIndex);
|
const auto &currScope = evaluator->getScope(-m_debuggerScopeIndex);
|
||||||
if (ImGui::BeginCombo("##scope", displayValue(currScope.parent, m_debuggerScopeIndex).c_str())) {
|
if (ImGui::BeginCombo("##scope", displayValue(currScope.parent, m_debuggerScopeIndex).c_str())) {
|
||||||
for (size_t i = 0; i < evaluator->getScopeCount(); i++) {
|
for (size_t i = 0; i < evaluator->getScopeCount(); i++) {
|
||||||
auto &scope = evaluator->getScope(-i);
|
auto &scope = evaluator->getScope(-i32(i));
|
||||||
|
|
||||||
if (ImGui::Selectable(displayValue(scope.parent, i).c_str(), i == size_t(m_debuggerScopeIndex))) {
|
if (ImGui::Selectable(displayValue(scope.parent, i).c_str(), i == size_t(m_debuggerScopeIndex))) {
|
||||||
m_debuggerScopeIndex = i;
|
m_debuggerScopeIndex = i;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue