Skip to content

Commit

Permalink
added windows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dsm committed May 7, 2024
1 parent 9fcc3eb commit 681050e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: windows

on:
push:
branches: [ "master", "current", "release/*" ]
branches: [ "develop", "release/*" ]
pull_request:
branches: [ "master", "current", "release/*" ]
branches: [ "develop", "release/*" ]

env:
BUILD_TYPE: Release
Expand All @@ -19,25 +19,36 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msys2-root: ${{ runner.workspace }}/msys2
msystem: UCRT64
cache: true
update: true

- name: Install required packages
shell: msys2 {0}
install: >-
git
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-qt6-base
mingw-w64-ucrt-x86_64-qt6-tools
mingw-w64-ucrt-x86_64-qt6-svg
mingw-w64-ucrt-x86_64-make
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-python
bison
flex
dos2unix
mingw-w64-ucrt-x86_64-gperf
- name: Build with cmake
run: |
pacman -Syu --noconfirm mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-qt6-base mingw-w64-ucrt-x86_64-qt6-tools mingw-w64-ucrt-x86_64-qt6-svg mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-python bison flex dos2unix mingw-w64-ucrt-x86_64-gperf -v
ls -la
cmake.exe -B build/ -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake.exe --build build/ -j`nproc` --config ${{env.BUILD_TYPE}}
- name: Build CMake project
if: ${{ env.ENABLE_BUILD == 'true' }}
run: |
cmake -B ${{github.workspace}}/build -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build -j`nproc` --config ${{env.BUILD_TYPE}}
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,11 @@ add_custom_command(
#
set(gperf_SRC gperfappgen.cpp gperfappgen.h)

add_executable(gperfappgen ${gperf_SRC})

IF(WIN32)
add_executable(gperfappgen.exe ${gperf_SRC})
ELSE() # Unix
add_executable(gperfappgen ${gperf_SRC})
ENDIF()
#
# Run gperfappgen, pipe to gperf input to gperfapphash.gph
#
Expand Down

0 comments on commit 681050e

Please sign in to comment.