From e36c966f4c8b0c1ca018c2932ba743c8051320d4 Mon Sep 17 00:00:00 2001 From: mrdcvlsc Date: Sun, 10 Sep 2023 14:12:58 +0800 Subject: [PATCH] add cmake test build for github workflow --- .github/workflows/tests.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ab6774..c1a0f21 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,36 @@ on: branches: [ main ] jobs: + cmake-build: + name: ${{ matrix.platform.name }} + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + aes: + - { name: Pure 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: MacOS XCode, os: macos-latest, outpath: './' } + # - { name: Linux GCC, os: ubuntu-latest, outpath: './' } + + steps: + - uses: actions/checkout@v3 + + - name: System Info + run: cmake cmake -S . -B . -D AES_IMPL=${{matrix.aes.flag}} + + - name: Build + run: cmake --build tests --config Release + + - name: Run Tests + run: "${{matrix.platform.outpath}}tests${{matrix.platform.fext}}" + aarch64-gcc: runs-on: ubuntu-latest