Skip to content

macos-14

macos-14 #1500

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
Windows:
name: windows-${{ matrix.os-version }}-${{ matrix.build-config }}-${{ matrix.build-arch }}${{ matrix.build-tool }}
runs-on: windows-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
os-version: [2022]
build-config: [debug, release, relwithdebinfo]
build-arch: [Win32, x64]
build-tool: ["", "-T ClangCL"]
exclude:
- build-arch: Win32
build-tool: "-T ClangCL"
steps:
- name: Versions
shell: bash
run: |
cmake --version
git --version
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
shell: bash
run: |
mkdir build
cd build
# cage_use_steam_sockets causes issues on win32
cmake -A${{ matrix.build-arch }} ${{ matrix.build-tool }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -Dcage_use_steam_sockets=${{ matrix.build-arch == 'x64' && 'ON' || 'OFF' }} ..
- name: Build
shell: bash
run: |
cd build
cmake --build . --config ${{ matrix.build-config }}
- name: Tests
shell: bash
run: |
cd build/result/${{ matrix.build-config }}
./cage-test-core
- name: Assets
shell: bash
run: |
cd build/result/${{ matrix.build-config }}
./cage-asset-database
- name: Install
shell: bash
run: |
cd build
cmake --install . --config ${{ matrix.build-config }} --prefix "C:/cage"
cd ../sources/test-install
mkdir build
cd build
cmake -A${{ matrix.build-arch }} ${{ matrix.build-tool }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -DCage_DIR="C:/cage/cmake" ..
cmake --build . --config ${{ matrix.build-config }}
Ubuntu:
name: ubuntu-${{ matrix.os-version }}-${{ matrix.build-config }}-${{ matrix.compiler.cc }}
runs-on: ubuntu-${{ matrix.os-version }}.04
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
strategy:
fail-fast: false
matrix:
os-version: [22]
build-config: [debug, release, relwithdebinfo]
compiler:
- {
cc: gcc-12,
cxx: g++-12,
install: gcc-12 g++-12
}
- {
cc: gcc-13,
cxx: g++-13,
install: gcc-13 g++-13
}
- {
cc: clang-15,
cxx: clang++-15,
install: clang-15
}
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev nasm libssl-dev ${{ matrix.compiler.install }}
- name: Versions
run: |
cmake --version
git --version
${{ matrix.compiler.cc }} --version
${{ matrix.compiler.cxx }} --version
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -Dcage_use_steam_sockets=1 ..
- name: Build
run: |
cd build
cmake --build . -- -j3
- name: Tests
run: |
cd build/result/${{ matrix.build-config }}
./cage-test-core
- name: Assets
run: |
cd build/result/${{ matrix.build-config }}
./cage-asset-database
- name: Install
run: |
cd build
sudo cmake --install .
cd ../sources/test-install
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} ..
cmake --build . -- -j3
- name: List dependencies
run: |
cd build/result/${{ matrix.build-config }}
echo "cage-core:"
ldd libcage-core.so
echo "cage-engine:"
ldd libcage-engine.so
Sanitizers:
name: sanitizer-${{ matrix.sanitizer.name }}-${{ matrix.build-config }}
needs: Ubuntu
runs-on: ubuntu-latest
env:
CFLAGS: ${{ matrix.sanitizer.flags }}
CXXFLAGS: ${{ matrix.sanitizer.flags }}
LDFLAGS: ${{ matrix.sanitizer.flags }}
CC: clang-15
CXX: clang++-15
strategy:
fail-fast: false
matrix:
build-config: [debug, release]
sanitizer:
- {
name: undefined,
flags: -fsanitize=undefined -fno-omit-frame-pointer
}
- {
name: address,
flags: -fsanitize=address -fno-omit-frame-pointer
}
- {
name: thread,
flags: -fsanitize=thread -fno-omit-frame-pointer
}
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev nasm libssl-dev clang-15
- name: Versions
run: |
cmake --version
clang --version
clang++ --version
git --version
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} ..
- name: Build
run: |
cd build
cmake --build . --target cage-test-core -- -j3
- name: Tests
run: |
cd build/result/${{ matrix.build-config }}
./cage-test-core
NoProfiler:
name: no-profiler
needs: Ubuntu
runs-on: ubuntu-latest
env:
CC: clang-15
CXX: clang++-15
strategy:
fail-fast: false
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev nasm libssl-dev clang-15
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=DEBUG -Dcage_profiling_enabled=OFF ..
- name: Build
run: |
cd build
cmake --build . --target cage-test-core -- -j3
- name: Tests
run: |
cd build/result/debug
./cage-test-core
Valgrind:
name: valgrind-${{ matrix.options.tool }}
needs: Ubuntu
runs-on: ubuntu-latest
env:
CC: gcc-13
CXX: g++-13
strategy:
fail-fast: false
matrix:
options:
- {
tool: memcheck,
flags: --exit-on-first-error=yes --error-exitcode=1
}
- {
tool: helgrind,
flags: # helgrind produces some false-positives so lets not fail on them
}
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev nasm valgrind libssl-dev g++-13
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO ..
- name: Build
run: |
cd build
cmake --build . --target cage-test-core -- -j3
- name: Tests
run: |
cd build/result/relwithdebinfo
valgrind ${{ matrix.options.flags }} --tool=${{ matrix.options.tool }} ./cage-test-core
Macos:
name: macos-${{ matrix.os-version }}-${{ matrix.build-config }}
runs-on: macos-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
os-version: [14]
build-config: [debug, release]
steps:
- name: Versions
run: |
cmake --version
git --version
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} ..
- name: Build
run: |
cd build
cmake --build . -- -j3
- name: Tests
run: |
cd build/result/${{ matrix.build-config }}
ls -la
./cage-test-core