Skip to content

Commit

Permalink
fix: Fix Benchmarks 2024 (#1764)
Browse files Browse the repository at this point in the history
Co-authored-by: Noella Spitz <101950441+rhinoella@users.noreply.github.com>
  • Loading branch information
2 people authored and rprospero committed Apr 10, 2024
1 parent 2bce362 commit 7c82560
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 42 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Benchmarks

on:
# Trigger the workflow on push to the develop branch
push:
branches:
- develop
- '*'
paths-ignore:
- 'README.md'
- 'examples/**'
Expand All @@ -15,41 +14,42 @@ on:
- '.github/workflows/**'
- '!.github/workflows/benchmark.yml'

env:
BUILD_TYPE: Release

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Prerequisites
run: |
sudo apt-get update -q
sudo apt-get install ninja-build python3-setuptools uuid uuid-dev
- name: Install Conan
run: |
sudo pip3 install wheel
sudo pip3 install conan==1.60
- name: Retrieve ANTLR4 Java
run: |
wget https://www.antlr.org/download/antlr-4.9.3-complete.jar -O antlr4.jar
- name: Build
run: |
mkdir build
cd build
conan install ../ -s compiler.libcxx=libstdc++11
cmake ../ -G "Ninja" -DBUILD_BENCHMARKS:bool=true -DANTLR_EXECUTABLE:path=`pwd`/../antlr4.jar
ninja
- name: Run benchmark
run: ./build/bin/benchmarks --benchmark_format=json | tee benchmark_result.json
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
tool: 'googlecpp'
output-file-path: benchmark_result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
comment-on-alert: true
alert-threshold: '200%'
alert-comment-cc-users: '@disorderedmaterials/dissolve-devs'
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: "./.github/workflows/setup"
- name: Install Prerequisites
run: |
sudo apt-get update -q
sudo apt-get install ninja-build python3-setuptools uuid uuid-dev
- name: Install Conan
run: |
sudo pip3 install wheel
sudo pip3 install conan==1.*
- name: Retrieve ANTLR4 Java
run: |
wget https://www.antlr.org/download/antlr-${{ env.antlrVersion }}-complete.jar -O antlr4.jar
- name: Build
run: |
mkdir build
cd build
conan install ../ -s compiler.libcxx=libstdc++11
cmake ../ -G "Ninja" -DBUILD_BENCHMARKS:bool=true -DANTLR_EXECUTABLE:path=`pwd`/../antlr4.jar
ninja
- name: Run benchmarks
run: ./build/bin/benchmarks --benchmark_format=json | tee benchmark_result.json
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
if: ${{ github.ref_name == 'develop' }}
with:
tool: 'googlecpp'
output-file-path: benchmark_result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
comment-on-alert: true
alert-threshold: '200%'
alert-comment-cc-users: '@disorderedmaterials/dissolve-devs'
2 changes: 0 additions & 2 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ runs:
ANTLR_VERSION=$(cat conanfile.txt | sed -n -e 's%^.*antlr4-cppruntime/%%p')
echo "antlrVersion=${ANTLR_VERSION}" >> ${GITHUB_ENV}
- name: Install Dependencies (OSX)
if: ${{ runner.os == 'macos' }}
shell: bash
Expand Down
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ if(MULTI_THREADING)
if(CONAN)
include_directories(CONAN_INCLUDE_DIRS_ONETBB)
include_directories(CONAN_INCLUDE_DIRS_ONEDPL)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} CONAN_PKG::onetbb)
if(WIN32)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} CONAN_PKG::onedpl)
endif(WIN32)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} CONAN_PKG::onetbb CONAN_PKG::onedpl)
else(CONAN)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} $ENV{THREADING_LINK_LIBS})
endif(CONAN)
Expand Down

0 comments on commit 7c82560

Please sign in to comment.