Files
mars-libsodium/.github/workflows/ci.yaml
2022-05-29 19:27:20 +02:00

86 lines
2.2 KiB
YAML

name: ci
on: [push, pull_request]
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
strategy:
fail-fast: false
matrix:
include:
- name: gcc-static
os: ubuntu-22.04
compiler: gcc
generator: Ninja
cmake-args: "-DBUILD_SHARED_LIBS=OFF"
- name: gcc-dynamic
os: ubuntu-22.04
compiler: gcc
generator: Ninja
cmake-args: "-DBUILD_SHARED_LIBS=ON"
- name: gcc-minimal
os: ubuntu-22.04
compiler: gcc
generator: Ninja
cmake-args: "-DSODIUM_MINIMAL=ON"
- name: clang-static
os: ubuntu-22.04
compiler: clang
generator: Ninja
cmake-args: "-DBUILD_SHARED_LIBS=OFF"
- name: clang-dynamic
os: ubuntu-22.04
compiler: clang
generator: Ninja
cmake-args: "-DBUILD_SHARED_LIBS=ON"
- name: clang-minimal
os: ubuntu-22.04
compiler: clang
generator: Ninja
cmake-args: "-DSODIUM_MINIMAL=ON"
- name: windows-2022-cl-x86
os: windows-2022
generator: Visual Studio 17 2022
cmake-args: -A Win32
- name: windows-2022-cl-x64
os: windows-2022
generator: Visual Studio 17 2022
cmake-args: -A x64
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install
run: pip install cmake==3.22.4 ninja==1.10.2.3 --upgrade
- name: Setup
run: echo "CC=${{ matrix.compiler }}" >> $GITHUB_ENV
if: startsWith(matrix.os, 'ubuntu')
- name: CMake
run: cmake -S . -B build -G "${{ matrix.generator }}" ${{ matrix.cmake-args }}
- name: Build
run: cmake --build build
- name: Test
run: (cd build && ctest)
if: startsWith(matrix.os, 'ubuntu')
- name: Test
run: (cd build && ctest -C Debug )
if: startsWith(matrix.os, 'windows')