Skip to content

Merge branch 'master' of github.com:mulle-objc/mulle-objc-runtime int… #12

Merge branch 'master' of github.com:mulle-objc/mulle-objc-runtime int…

Merge branch 'master' of github.com:mulle-objc/mulle-objc-runtime int… #12

Workflow file for this run

name: CMake Errors
on: [push, pull_request]
jobs:
ci-cmake:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
cflags: -Werror -Wall -Wextra
# Test out of source builds
- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
cflags: -Werror -Wall -Wextra
build-dir: ../build
src-dir: ../mulle-core
- name: Ubuntu GCC -O3
os: ubuntu-latest
compiler: gcc
cflags: -O3 -Werror -Wall -Wextra
- name: Ubuntu Clang
os: ubuntu-latest
compiler: clang
cflags: -Werror -Wall -Wextra
- name: Ubuntu Clang Debug
os: ubuntu-latest
compiler: clang
cflags: -Werror -Wall -Wextra
build-config: Debug
- name: Windows MSVC Win32
os: windows-latest
compiler: cl
cflags: /WX /W3
cmake-args: -A Win32
- name: Windows MSVC Win64
os: windows-latest
compiler: cl
cflags: /WX /W3 /wd4244 # fixes some warnings in http_parser.c which is not my code
cmake-args: -A x64
- name: Windows GCC
os: windows-latest
compiler: gcc
cflags: -Werror -Wall -Wextra
cmake-args: -G Ninja
- name: macOS Clang
os: macos-latest
compiler: clang
cflags: -Werror -Wall -Wextra
- name: macOS GCC
os: macos-latest
compiler: gcc-12
cflags: -Werror -Wall -Wextra
steps:
- name: Checkout repository
uses: actions/checkout@v4
# 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: |
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
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: |
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
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: |
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
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: Install packages (Windows)
if: runner.os == 'Windows'
run: |
choco install --no-progress ninja ${{ matrix.packages }}
- name: Generate project files
run: |
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
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' }}