Add automatic speed comparison with similar libraries #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Speed comparison | ||
on: | ||
push: | ||
branches: [ "main", "test" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install GTest | ||
run: sudo apt-get install libgtest-dev | ||
- name: Set reusable strings | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "working_wirectory=${{ github.workspace }}/test/speed_comparison" >> "$GITHUB_OUTPUT" | ||
- name: Configure | ||
run: > | ||
cmake -B ${{ steps.strings.outputs.working_wirectory }}/cmake-build-release | ||
-DCMAKE_CXX_COMPILER=g++ | ||
-DCMAKE_C_COMPILER=gcc | ||
-DCMAKE_BUILD_TYPE=Release | ||
-S ${{ github.workspace }}/test/speed_comparison | ||
- name: Build | ||
run: cmake --build ${{ steps.strings.outputs.working_wirectory }}/cmake-build-release --target SpeedComparison -j 8 | ||
- name: Run generated tests | ||
working-directory: ${{ steps.strings.outputs.working_wirectory }}/cmake-build-release | ||
run: /SpeedComparison --gtest_filter=* --gtest_color=yes --gtest_output=xml:tests.xml | ||
- name: Set up Python | ||
with: | ||
python-version: '3.10' | ||
run: | ||
Check failure on line 43 in .github/workflows/speed_comparison.yml GitHub Actions / Speed comparisonInvalid workflow file
|
||
pip install matplotlib numpy | ||
- name: Run Python script | ||
working-directory: ${{ steps.strings.outputs.working_wirectory }} | ||
run: python plot.py cmake-build-release/tests.xml output.png v1.0.0 | ||