From 681050e6bb1c0a2ba1bd1dcccdde4e01cbbdb132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammet=20=C5=9E=C3=BCkr=C3=BC=20Demir?= <41967334+dsm@users.noreply.github.com> Date: Tue, 7 May 2024 16:17:14 +0300 Subject: [PATCH] added windows.yml --- .github/workflows/windows.yml | 37 +++++++++++++++++++++++------------ src/CMakeLists.txt | 7 +++++-- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f45695f2..5eb6a0ad 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 @@ -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}} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa38cb65..b2ad4ee6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 #