CMake: Version compatibility fixes #171
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Checks | |
| on: [push, pull_request] | |
| jobs: | |
| Unix: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CXXFLAGS: -Werror | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Dependencies | |
| run: | | |
| if [ "$RUNNER_OS" == "macOS" ]; then | |
| brew install automake libtool | |
| fi | |
| - name: Configure | |
| run: | | |
| cd Project/GNU/Library | |
| autoreconf -if | |
| ./configure | |
| - name: Build | |
| run: | | |
| cd Project/GNU/Library | |
| make -j4 | |
| - name: Check | |
| run: | | |
| cd Project/GNU/Library | |
| make check | |
| - name: CMake Build | |
| run: | | |
| mkdir Project/CMake/Build | |
| cd Project/CMake/Build | |
| cmake -DBUILD_ZENLIB=1 .. | |
| make -j4 | |
| Windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| architecture: [ Win32, x64, ARM64 ] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout ZenLib | |
| uses: actions/checkout@v6 | |
| with: | |
| path: ZenLib | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x64 | |
| - name: Build | |
| run: msbuild -p:Configuration=Release -p:Platform=${{ matrix.architecture }} ${{ github.workspace }}\ZenLib\Project\MSVC2022\ZenLib_MSVC.sln -verbosity:quiet -warnaserror | |
| CMake: | |
| strategy: | |
| matrix: | |
| include: | |
| - runner: windows-latest | |
| CXXFLAGS: "/WX" | |
| - runner: ubuntu-latest | |
| CXXFLAGS: "-Werror" | |
| - runner: macos-latest | |
| CXXFLAGS: "-Werror" | |
| fail-fast: false | |
| name: CMake (${{ matrix.runner }}) | |
| runs-on: ${{ matrix.runner }} | |
| env: | |
| CXXFLAGS: ${{ matrix.CXXFLAGS }} | |
| steps: | |
| - name: Checkout ZenLib | |
| uses: actions/checkout@v6 | |
| - name: Configure CMake project | |
| run: cmake -S Project/CMake -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build CMake project | |
| run: cmake --build build ${{ runner.os == 'Windows' && '--config Release' || '-j4' }} | |
| MinGW: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: Win32 | |
| msystem: MINGW32 | |
| - platform: x64 | |
| msystem: UCRT64 | |
| fail-fast: false | |
| env: | |
| GENERATOR: "Unix Makefiles" | |
| CONFIGURATION: "Release" | |
| CXXFLAGS: -Werror | |
| steps: | |
| - name: Checkout ZenLib | |
| uses: actions/checkout@v6 | |
| - name: Setup MSYS2 environment | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| release: false | |
| msystem: ${{ matrix.msystem }} | |
| install: make | |
| - name: Configure CMake project | |
| shell: bash | |
| run: | | |
| # Set the build configuration flag for CMake | |
| cmake -S Project/CMake -B build -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$CONFIGURATION | |
| - name: Build project using make | |
| shell: bash | |
| run: make -C build -j4 |