Create cmake-errors.yml #1
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: CMake Errors | ||
| on: [push, pull_request] | ||
| jobs: | ||
| ci-cmake: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # Matrix entries as before... | ||
| steps: | ||
| # Set installation directory based on OS | ||
| - name: Set install directory | ||
| id: set-install-dir | ||
| shell: bash | ||
| run: | | ||
| if [ "$RUNNER_OS" == "Windows" ]; then | ||
| echo "INSTALL_DIR=$GITHUB_WORKSPACE/mulle-install" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "INSTALL_DIR=$GITHUB_WORKSPACE/mulle-install" >> $GITHUB_OUTPUT | ||
| fi | ||
| mkdir -p $GITHUB_WORKSPACE/mulle-install | ||
| - name: Clone mulle-core repository | ||
| run: | | ||
| git clone https://github.com/mulle-core/mulle-core.git /tmp/mulle-core | ||
| - name: Configure, build and install mulle-core with CMake | ||
| working-directory: /tmp/mulle-core | ||
| run: | | ||
| cmake -B build \ | ||
| -DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \ | ||
| -DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| cmake --build build --config Release | ||
| cmake --install build --config Release | ||
| shell: bash | ||
| - name: Clone mulle-atinit repository | ||
| run: | | ||
| git clone https://github.com/mulle-core/mulle-atinit.git /tmp/mulle-atinit | ||
| - name: Configure, build and install mulle-atinit with CMake | ||
| working-directory: /tmp/mulle-atinit | ||
| run: | | ||
| cmake -B build \ | ||
| -DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \ | ||
| -DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| cmake --build build --config Release | ||
| cmake --install build --config Release | ||
| shell: bash | ||
| - name: Clone mulle-atexit repository | ||
| run: | | ||
| git clone https://github.com/mulle-core/mulle-atexit.git /tmp/mulle-atexit | ||
| - name: Configure, build and install mulle-atexit with CMake | ||
| working-directory: /tmp/mulle-atexit | ||
| run: | | ||
| cmake -B build \ | ||
| -DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \ | ||
| -DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| cmake --build build --config Release | ||
| cmake --install build --config Release | ||
| shell: bash | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install packages (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| choco install --no-progress ninja ${{ matrix.packages }} | ||
| - name: Generate project files | ||
| run: | | ||
| cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} \ | ||
| -DCMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} \ | ||
| -DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} | ||
| env: | ||
| CC: ${{ matrix.compiler }} | ||
| CFLAGS: ${{ matrix.cflags }} | ||
| - name: Compile source code | ||
| run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }} | ||