Skip to content

Support for cmake to build with MSVC and AppleClang #42

Support for cmake to build with MSVC and AppleClang

Support for cmake to build with MSVC and AppleClang #42

Workflow file for this run

name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
cmake-build:
name: ${{ matrix.platform.name }} ${{ matrix.aes.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
aes:
- { name: C++ Implementation, flag: portable}
- { name: Intel x86_64 AES NI, flag: aesni}
# - { name: ARMv8 aarch64 NEON, flag: neon}
platform:
# - { name: Linux Clang, os: ubuntu-latest, outpath: './', flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++}
- { name: Windows VS2019, os: windows-2019, outpath: 'Release\', fext: .exe, }
- { name: Windows VS2022, os: windows-2022, outpath: 'Release\', fext: .exe, }
# - { name: Clang VS2022, os: windows-2022, outpath: 'Release\', fext: .exe, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++}
- { name: MacOS XCode, os: macos-latest, outpath: './' }
# - { name: Linux GCC, os: ubuntu-latest, outpath: './' }
steps:
- uses: actions/checkout@v3
- run: cmake --version
- name: Configure
run: cmake -S . -B . -D AES_IMPL=${{matrix.aes.flag}}
- name: Build
run: cmake --build . --config Release
- name: Run Tests
run: "${{matrix.platform.outpath}}tests${{matrix.platform.fext}}"
aarch64-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: update and upgrade env
run: sudo apt-get update && sudo apt-get upgrade
- name: Install essentials
run: sudo apt-get install qemu-user qemu-user-static gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu binutils-aarch64-linux-gnu-dbg build-essential
- name: create test output directory
run: mkdir bin
- name: Test - portable C++ code
run: make test CXX=aarch64-linux-gnu-g++ LINK=static TYPE=debug VERSION=portable
- name: Test - aarch64/armv8 - ARM-NEON-AES
run: make test CXX=aarch64-linux-gnu-g++ LINK=static TYPE=debug VERSION=neon
clang:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-latest]
steps:
- uses: actions/checkout@v3
- name: create test output directory
run: mkdir bin
- name: Test - portable C++ code
run: make test CXX=clang++ TYPE=debug VERSION=portable
- name: Test - x86-64 - AES-NI
run: make test CXX=clang++ TYPE=debug VERSION=aesni
gcc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-latest]
steps:
- uses: actions/checkout@v3
- name: create test output directory
run: mkdir bin
- name: Test - portable C++ code
run: make test CXX=g++ TYPE=debug VERSION=portable
- name: Test - x86-64 - AES-NI
run: make test CXX=g++ TYPE=debug VERSION=aesni