Skip to content

Improve highlighting in hex editor widget #423

Improve highlighting in hex editor widget

Improve highlighting in hex editor widget #423

name: Build Windows
permissions:
contents: read
packages: write
on:
push:
branches: [ master, test-ci ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: "Build: Windows ${{ matrix.arch }}-${{ matrix.config }}"
runs-on: windows-latest
env:
VCPKG_FEATURE_FLAGS: manifests,binarycaching
VCPKG_BINARY_SOURCES: ${{ format('clear;nuget,https://nuget.pkg.github.com/{0}/index.json,{1}', github.repository_owner, github.event_name == 'pull_request' && 'read' || 'readwrite') }}
VCPKG_NUGET_REPOSITORY: https://github.com/${{ github.repository }}.git
VCPKG_DOWNLOADS: ${{ github.workspace }}\.vcpkg-downloads
SCCACHE_GHA_ENABLED: "true"
strategy:
fail-fast: false
matrix:
arch: [x64]
config: [Release]
include:
- arch: x64
arch_name: 64-bit
arch_suffix: "64"
steps:
- name: Remove Perl Strawberry installation
# Removes conflicting headers from include paths
run: |
Remove-Item -Recurse -Force C:/Strawberry
- name: Checkout Git Repo
uses: actions/checkout@v5
with:
submodules: 'recursive'
- name: Install latest CMake
uses: lukka/get-cmake@628dd514bed37cb0a609e84a6186cbbaa2fc0140 # latest as of 2025-10-04
- name: Ensure vcpkg downloads directory exists
shell: pwsh
run: |
New-Item -ItemType Directory -Path "$env:VCPKG_DOWNLOADS" -Force | Out-Null
- name: Cache vcpkg downloads
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DOWNLOADS }}
key: ${{ runner.os }}-vcpkg-downloads-${{ hashFiles('gui/qt/vcpkg.json', 'gui/qt/vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-downloads-
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@b3dd708d38df5c856fe1c18dc0d59ab771f93921 # latest as of 2025-10-04
with:
vcpkgJsonGlob: '**/gui/qt/vcpkg.json'
- name: Configure vcpkg NuGet source
shell: pwsh
run: |
$nugetExe = (& "$env:VCPKG_ROOT\vcpkg.exe" fetch nuget | Select-Object -Last 1)
& $nugetExe sources remove -Name GitHub -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" 2>$null
& $nugetExe sources add -Name GitHub -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -Username "${{ github.repository_owner }}" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText
& $nugetExe setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Start sccache
uses: mozilla-actions/[email protected]
- name: Build CEmu ${{ matrix.config }} on Windows ${{ matrix.arch_name }}
uses: lukka/run-cmake@67c73a83a46f86c4e0b96b741ac37ff495478c38 # latest as of 2025-10-04
with:
cmakeListsTxtPath: '${{ github.workspace }}/gui/qt/CMakeLists.txt'
configurePreset: 'Win-${{ matrix.arch }}'
configurePresetAdditionalArgs: "['-DDEPS_RELEASE_ONLY=ON', '-DSHORT_VERSION=v3.0', '-DCMAKE_C_COMPILER_LAUNCHER=sccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=sccache']"
buildPreset: 'Win-${{ matrix.arch }}-${{ matrix.config }}'
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.arch }}-windows
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-release
VCPKG_FORCE_SYSTEM_BINARIES: 1
- name: Upload ${{ matrix.arch_name }} ${{ matrix.config }} EXE
uses: actions/upload-artifact@v4
with:
name: CEmu_win${{ matrix.arch_suffix }}_master
path: ${{ github.workspace }}/gui/qt/CEmu.build/Win-${{ matrix.arch }}/${{ matrix.config }}/CEmu.exe
- name: Prepare binary for release upload
if: ${{ matrix.config == 'Release' }}
run: |
$ReleaseName = "CEmu-nightly_win${{ matrix.arch_suffix }}-msvc.exe"
Rename-Item -Path "${{ github.workspace }}/gui/qt/CEmu.build/Win-${{ matrix.arch }}/${{ matrix.config }}/CEmu.exe" -NewName $ReleaseName
echo "RELEASE_NAME=$ReleaseName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Update nightly release
if: ${{ matrix.config == 'Release' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
uses: softprops/action-gh-release@62c96d0c4e8a889135c1f3a25910db8dbe0e85f7 # latest as of 2025-10-04
with:
tag_name: nightly
prerelease: true
token: ${{secrets.GITHUB_TOKEN}}
files: |
./gui/qt/CEmu.build/Win-${{ matrix.arch }}/${{ matrix.config }}/${{ env.RELEASE_NAME }}