blob: 6ea987b249a6f0d9e689d25b4fce1f80da4059a2 [file] [log] [blame]
name: CMake
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-18.04, windows-2019, macos-10.15]
os: [ubuntu-18.04, windows-2019]
# os: [ubuntu-18.04]
USE_MBEDTLS: ["ON", "OFF"]
USE_CONTEXT: ["ON", "OFF"]
CMAKE_OPTIONS:
[
"-DCOSE_C_INCLUDE_ENCRYPT=ON -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=ON -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=ON -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=ON -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=ON -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=ON",
]
steps:
- uses: actions/checkout@v1
- name: setup (linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt install cmake-data
# - name: setup (mac)
# if: startsWith(matrix.os, 'macos')
# run: |
# brew update
# brew upgrade
# brew install cmake openssl
- name: setup (windows)
if: startsWith(matrix.os, 'windows')
run: |
choco install openssl cmake
- name: Create Build directory
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE \
-DCOSE_C_USE_CONTEXT=${{matrix.USE_CONTEXT}} \
-DCOSE_C_BUILD_DOCS=OFF \
-DCOSE_C_COVERALLS=OFF \
-DCOSE_C_BUILD_TESTS=ON \
-DBUILD_SHARED_LIBS=OFF \
${{matrix.CMAKE_OPTIONS}} \
-DCOSE_C_USE_MBEDTLS=${{matrix.USE_MBEDTLS}}
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build .
clang-tidy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
USE_MBEDTLS: ["ON", "OFF"]
USE_CONTEXT: ["ON", "OFF"]
CMAKE_OPTIONS:
[
"-DCOSE_C_INCLUDE_ENCRYPT=ON -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=ON -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=ON -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=ON -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=ON -DCOSE_C_INCLUDE_SIGN1=OFF",
"-DCOSE_C_INCLUDE_ENCRYPT=OFF -DCOSE_C_INCLUDE_ENCRYPT0=OFF -DCOSE_C_INCLUDE_MAC0=OFF -DCOSE_C_INCLUDE_MAC=OFF -DCOSE_C_INCLUDE_SIGN=OFF -DCOSE_C_INCLUDE_SIGN1=ON",
]
steps:
- uses: actions/checkout@v1
- name: setup (linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt install cmake-data clang clang-tidy
- name: Create Build directory
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
export CC=clang && \
export CXX=clang++ && \
cmake $GITHUB_WORKSPACE \
-DCOSE_C_USE_CONTEXT=${{matrix.USE_CONTEXT}} \
-DCOSE_C_BUILD_DOCS=OFF \
-DCOSE_C_BUILD_TESTS=ON \
-DCOSE_C_RUN_CLANG_TIDY=ON \
${{matrix.CMAKE_OPTIONS}} \
-DCOSE_C_USE_MBEDTLS=${{matrix.USE_MBEDTLS}}
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build .