From 17c26790216841bced093c9c9a87bbda90313e95 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Mahato Date: Fri, 29 Nov 2024 12:04:05 +0530 Subject: [PATCH 1/5] added CI for MinGW --- .github/workflows/windows-test.yml | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index c7af6e0ee..5af13663b 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -65,6 +65,49 @@ jobs: env: METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests + windows-mingw-test: + name: Windows MinGW Test + runs-on: windows-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + update: true + install: > + base-devel + mingw-w64-x86_64-gcc + mingw-w64-x86_64-cmake + mingw-w64-x86_64-make + cache: false + - name: Wait for MSYS2 to complete setup + run: sleep 60 + - name: Add MSYS2 to PATH + run: | + echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH + echo "C:\msys64\usr\bin" >> $Env:GITHUB_PATH + - name: Create build directory + run: mkdir build + + - name: Configure with CMake + working-directory: ./build + run: | + cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF .. + - name: Build with CMake + working-directory: ./build + run: cmake --build . + + - name: Run CTest + working-directory: ./build + run: | + ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure -C Debug + shell: bash + windows-distributable: name: Windows Distributable Dispatch needs: windows-test From 3795b256f5a9ffe6242855bf51d5434d7e83bbc4 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Mahato Date: Thu, 5 Dec 2024 01:19:28 +0530 Subject: [PATCH 2/5] added Matrix for MSYS2 Env --- .github/workflows/windows-test.yml | 59 +++++++++++++++--------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 5af13663b..265d762d8 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -68,45 +68,44 @@ jobs: windows-mingw-test: name: Windows MinGW Test runs-on: windows-latest - + strategy: + fail-fast: false + matrix: + include: + - { sys: mingw32 } + - { sys: mingw64 } + - { sys: ucrt64 } + - { sys: clang64 } + + defaults: + run: + shell: msys2 {0} #default shell + steps: - - name: Check out the repository + - name: 'Checkout' uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up MSYS2 + + - name: '${{ matrix.sys }} Setup MSYS2' uses: msys2/setup-msys2@v2 with: + msystem: ${{ matrix.sys }} update: true - install: > - base-devel - mingw-w64-x86_64-gcc - mingw-w64-x86_64-cmake - mingw-w64-x86_64-make - cache: false - - name: Wait for MSYS2 to complete setup - run: sleep 60 - - name: Add MSYS2 to PATH + install: >- + git + make + pacboy: >- + toolchain:p + cmake:p + + - name: 'Configure' run: | - echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH - echo "C:\msys64\usr\bin" >> $Env:GITHUB_PATH - - name: Create build directory - run: mkdir build - - - name: Configure with CMake - working-directory: ./build - run: | - cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF .. - - name: Build with CMake - working-directory: ./build - run: cmake --build . - - - name: Run CTest - working-directory: ./build + cmake -G "MinGW Makefiles" -B build -DCMAKE_BUILD_TYPE=Release -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF + + - name: 'Build' run: | - ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure -C Debug - shell: bash + cmake --build build -- -j$(nproc) windows-distributable: name: Windows Distributable Dispatch From 7992e5754ff10ff1c8326c9fbbc15348df103dab Mon Sep 17 00:00:00 2001 From: Rohan Kumar Mahato Date: Thu, 5 Dec 2024 02:28:58 +0530 Subject: [PATCH 3/5] added Ctest and Debug and Release --- .github/workflows/windows-test.yml | 55 +++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 265d762d8..2b6768aab 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -72,40 +72,61 @@ jobs: fail-fast: false matrix: include: - - { sys: mingw32 } - - { sys: mingw64 } - - { sys: ucrt64 } - - { sys: clang64 } - - defaults: - run: - shell: msys2 {0} #default shell - + - { sys: mingw32, build_type: Debug } + - { sys: mingw32, build_type: Release } + - { sys: mingw64, build_type: Debug } + - { sys: mingw64, build_type: Release } + - { sys: ucrt64, build_type: Debug } + - { sys: ucrt64, build_type: Release } + - { sys: clang64, build_type: Debug } + - { sys: clang64, build_type: Release } + steps: - - name: 'Checkout' + - name: Check out the repository uses: actions/checkout@v4 with: fetch-depth: 0 - + - name: '${{ matrix.sys }} Setup MSYS2' uses: msys2/setup-msys2@v2 with: msystem: ${{ matrix.sys }} update: true install: >- + base-devel git + mingw-w64-x86_64-toolchain + cmake make pacboy: >- toolchain:p cmake:p - - - name: 'Configure' + + - name: Add MSYS2 to PATH run: | - cmake -G "MinGW Makefiles" -B build -DCMAKE_BUILD_TYPE=Release -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF - - - name: 'Build' + echo "C:\\msys64\\${{ matrix.sys }}\\bin" >> $Env:GITHUB_PATH + echo "C:\\msys64\\usr\\bin" >> $Env:GITHUB_PATH + + - name: Create build directory + run: mkdir build + + - name: Configure with CMake + working-directory: ./build + shell: cmd + run: | + cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF .. + + - name: Build with CMake + working-directory: ./build + shell: cmd + run: | + cmake --build . + + - name: Run CTest + working-directory: ./build run: | - cmake --build build -- -j$(nproc) + ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure -C ${{ matrix.build_type }} + shell: bash windows-distributable: name: Windows Distributable Dispatch From 7b42f79bbc0ce48ad22fdc624fa10a7600a06cdc Mon Sep 17 00:00:00 2001 From: Rohan Kumar Mahato Date: Thu, 5 Dec 2024 09:02:56 +0530 Subject: [PATCH 4/5] Added the Msys2 Default shell --- .github/workflows/windows-test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 2b6768aab..0191fd0d7 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -81,6 +81,10 @@ jobs: - { sys: clang64, build_type: Debug } - { sys: clang64, build_type: Release } + defaults: + run: + shell: msys2 {0} + steps: - name: Check out the repository uses: actions/checkout@v4 @@ -95,30 +99,23 @@ jobs: install: >- base-devel git - mingw-w64-x86_64-toolchain cmake make pacboy: >- toolchain:p cmake:p - - - name: Add MSYS2 to PATH - run: | - echo "C:\\msys64\\${{ matrix.sys }}\\bin" >> $Env:GITHUB_PATH - echo "C:\\msys64\\usr\\bin" >> $Env:GITHUB_PATH + ninja:p - name: Create build directory run: mkdir build - name: Configure with CMake working-directory: ./build - shell: cmd run: | cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF .. - name: Build with CMake working-directory: ./build - shell: cmd run: | cmake --build . @@ -126,7 +123,6 @@ jobs: working-directory: ./build run: | ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure -C ${{ matrix.build_type }} - shell: bash windows-distributable: name: Windows Distributable Dispatch From 54d77ac9a1a2c7639e58e41d978bb6d1c7b5a374 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Mahato Date: Thu, 5 Dec 2024 18:57:53 +0530 Subject: [PATCH 5/5] added the build type in matrix --- .github/workflows/windows-test.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 0191fd0d7..29e0402f2 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -71,15 +71,8 @@ jobs: strategy: fail-fast: false matrix: - include: - - { sys: mingw32, build_type: Debug } - - { sys: mingw32, build_type: Release } - - { sys: mingw64, build_type: Debug } - - { sys: mingw64, build_type: Release } - - { sys: ucrt64, build_type: Debug } - - { sys: ucrt64, build_type: Release } - - { sys: clang64, build_type: Debug } - - { sys: clang64, build_type: Release } + build_type: [Debug, Release] + sys: [mingw32, mingw64, ucrt64, clang64] defaults: run: