Disable 64-bit tests on MinGW #60
This file contains 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: CI | |
on: [push, pull_request] | |
env: | |
cpm-path: .cpm | |
cpm-key: zlib-1.3-cpm | |
jobs: | |
build: | |
name: ${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.sanitize }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [linux-clang, linux-gcc, macos, windows] | |
config: [Debug, Release] | |
sanitize: [address, thread, undefined, leak, memory] | |
exclude: | |
- { preset: linux-gcc, sanitize: memory } | |
- { preset: macos, sanitize: leak } | |
- { preset: macos, sanitize: memory } | |
- { preset: windows, sanitize: thread } | |
- { preset: windows, sanitize: undefined } | |
- { preset: windows, sanitize: leak } | |
- { preset: windows, sanitize: memory } | |
include: | |
- { preset: linux-clang, os: ubuntu-latest } | |
- { preset: linux-gcc, os: ubuntu-latest } | |
- { preset: macos, os: macos-latest } | |
- { preset: windows, os: windows-latest } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.cpm-path }} | |
key: ${{ env.cpm-key }} | |
enableCrossOsArchive: true | |
- name: Install dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build | |
- name: Configure | |
run: > | |
cmake --preset ${{ matrix.preset }} | |
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO | |
-DCPM_SOURCE_CACHE="${{ env.cpm-path }}" | |
-DZLIB_SANITIZE=${{ matrix.sanitize }} | |
- name: Build | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} | |
- name: Test | |
run: ctest --preset ${{ matrix.preset }} -C ${{ matrix.config }} | |
- name: Install | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} -t install | |
build-mobile: | |
name: ${{ matrix.preset }}-${{ matrix.config }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [android, ios] | |
config: [Debug, Release] | |
include: | |
- { preset: android, os: ubuntu-latest } | |
- { preset: ios, os: macos-latest } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.cpm-path }} | |
key: ${{ env.cpm-key }} | |
enableCrossOsArchive: true | |
- name: Install dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build | |
- name: Configure | |
run: > | |
cmake --preset ${{ matrix.preset }} | |
-DCPM_SOURCE_CACHE=${{ env.cpm-path }} | |
- name: Build | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} | |
- name: Install | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} -t install | |
build-bsd: | |
name: ${{ matrix.preset }}-${{ matrix.arch }}-${{ matrix.config }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [freebsd, netbsd, openbsd] | |
arch: [arm64, x86_64] | |
config: [Debug, Release] | |
exclude: | |
- { preset: netbsd, arch: arm64 } | |
include: | |
- { preset: freebsd, version: "13.2", pkg: pkg install -y } | |
- { preset: netbsd, version: "9.3", pkg: pkgin -y install } | |
- { preset: openbsd, version: "7.4", pkg: pkg_add } | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.cpm-path }} | |
key: ${{ env.cpm-key }} | |
enableCrossOsArchive: true | |
- uses: cross-platform-actions/action@master | |
with: | |
operating_system: ${{ matrix.preset }} | |
architecture: ${{ matrix.arch }} | |
version: ${{ matrix.version }} | |
run: | | |
sudo ${{ matrix.pkg }} cmake | |
cmake -B build \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \ | |
-DCPM_SOURCE_CACHE=${{ env.cpm-path }} \ | |
-DZLIB_INSTALL=ON \ | |
-DZLIB_TEST=ON | |
cmake --build build | |
cd build | |
ctest -V -C ${{ matrix.config }} | |
cd .. | |
cmake --install build | |
build-msys2: | |
name: msys2-${{ matrix.preset }}-${{ matrix.config }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [mingw64, mingw32, ucrt64, clang64] | |
config: [Debug, Release] | |
include: | |
- { preset: mingw64, env: x86_64 } | |
- { preset: mingw32, env: i686 } | |
- { preset: ucrt64, env: ucrt-x86_64 } | |
- { preset: clang64, env: clang-x86_64 } | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.cpm-path }} | |
key: ${{ env.cpm-key }} | |
enableCrossOsArchive: true | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.preset }} | |
update: true | |
install: >- | |
mingw-w64-${{ matrix.env }}-cmake | |
mingw-w64-${{ matrix.env }}-gcc | |
mingw-w64-${{ matrix.env }}-make | |
- name: Configure | |
run: > | |
cmake -B Build -G "MinGW Makefiles" | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | |
-DCPM_SOURCE_CACHE=${{ env.cpm-path }} | |
-DZLIB_INSTALL=ON | |
-DZLIB_TEST=ON | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
working-directory: build | |
run: ctest -V -C ${{ matrix.config }} | |
- name: Install | |
run: cmake --install build |