Skip to content

Commit

Permalink
fix workflow and update readme to explain cmake use
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdcvlsc committed Sep 14, 2023
1 parent e36c966 commit 00eb222
Show file tree
Hide file tree
Showing 8 changed files with 409 additions and 292 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
workflows: [tests]
types: [completed]

jobs:
run-benchmark:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,11 +34,26 @@ jobs:
- name: Stash Benchmark Results
run: git add micro-benchmark.md

- name: Commit Changes
run: git commit -m "..."

- name: Remove Other Changes
run: git checkout .

- name: Clean Artifacts
run: git clean -f -d

- name: Checkout Benchmark Branch
run: git checkout benchmarks

- name: Checkout Benchmark Markdown Results
run: git checkout main micro-benchmark.md

- name: Save Changes
run: git commit -m "run::$(date)"

- name: Push Changes To Benchmark Branch
run: git push
run: git push --force

run-benchmark-failed:
runs-on: ubuntu-latest
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,40 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }} @ ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
cmake-build:
name: ${{ matrix.platform.name }}
name: ${{ matrix.platform.name }} ${{ matrix.aes.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 }
- { 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: MacOS XCode, os: macos-latest, outpath: './' }
# - { name: Linux GCC, os: ubuntu-latest, outpath: './' }
# - { 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

- name: System Info
run: cmake cmake -S . -B . -D AES_IMPL=${{matrix.aes.flag}}
- run: cmake --version

- name: Configure
run: cmake -S . -B . -D AES_IMPL=${{matrix.aes.flag}}

- name: Build
run: cmake --build tests --config Release
run: cmake --build . --config Release

- name: Run Tests
run: "${{matrix.platform.outpath}}tests${{matrix.platform.fext}}"
Expand Down
Loading

0 comments on commit 00eb222

Please sign in to comment.