mirror of
https://github.com/boostorg/boost_unordered_benchmarks.git
synced 2026-01-27 18:52:12 +00:00
178 lines
6.2 KiB
YAML
178 lines
6.2 KiB
YAML
name: benchmarks
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- perfect_set
|
|
|
|
jobs:
|
|
posix:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: gcc-x64
|
|
compiler: g++-12
|
|
architecture: -m64
|
|
sourcefile: lookup.cpp
|
|
compileroptions: -std=c++20 -O3 -DNDEBUG
|
|
os: [self-hosted, linux, x64]
|
|
install: g++-12
|
|
command: sudo cgexec -g memory,cpu:shield sudo -u gha ./benchmark
|
|
outputfile: benchmark
|
|
|
|
- name: clang-x64
|
|
compiler: clang++-15
|
|
architecture: -m64
|
|
sourcefile: lookup.cpp
|
|
compileroptions: -std=c++20 -O3 -DNDEBUG
|
|
os: [self-hosted, linux, x64]
|
|
command: sudo cgexec -g memory,cpu:shield sudo -u gha ./benchmark
|
|
outputfile: benchmark
|
|
|
|
- name: clang-arm64
|
|
compiler: clang++
|
|
architecture: -m64
|
|
sourcefile: lookup.cpp
|
|
compileroptions: -std=c++20 -O3 -DNDEBUG
|
|
outputfile: benchmark
|
|
os: [self-hosted, macOS, ARM64]
|
|
command: ./benchmark
|
|
xcode_version: 13.4.1
|
|
|
|
# - name: gcc-x64
|
|
# compiler: g++-12
|
|
# architecture: -m64
|
|
# sourcefile: frozen_vs_perfect.cpp
|
|
# compileroptions: -std=c++20 -O3 -DNDEBUG -fconstexpr-loop-limit=100000000
|
|
# os: [self-hosted, linux, x64]
|
|
# install: g++-12
|
|
# command: sudo cgexec -g memory,cpu:shield sudo -u gha ./benchmark
|
|
# outputfile: benchmark
|
|
#
|
|
# - name: clang-x64
|
|
# compiler: clang++-15
|
|
# architecture: -m64
|
|
# sourcefile: frozen_vs_perfect.cpp -fconstexpr-steps=100000000
|
|
# compileroptions: -std=c++20 -O3 -DNDEBUG
|
|
# os: [self-hosted, linux, x64]
|
|
# command: sudo cgexec -g memory,cpu:shield sudo -u gha ./benchmark
|
|
# outputfile: benchmark
|
|
#
|
|
# - name: clang-arm64
|
|
# compiler: clang++
|
|
# architecture: -m64
|
|
# sourcefile: frozen_vs_perfect.cpp
|
|
# compileroptions: -std=c++20 -O3 -DNDEBUG -fconstexpr-steps=100000000
|
|
# outputfile: benchmark
|
|
# os: [self-hosted, macOS, ARM64]
|
|
# command: ./benchmark
|
|
# xcode_version: 13.4.1
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install packages
|
|
if: matrix.install
|
|
run: |
|
|
# sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test
|
|
if uname -p | grep -q 'x86_64'; then sudo dpkg --add-architecture i386 ; fi
|
|
sudo apt-get update
|
|
sudo apt-get install -y ${{matrix.install}}
|
|
- name: Install Boost
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
git clone https://github.com/boostorg/boost.git boost-root
|
|
cd boost-root
|
|
git checkout develop
|
|
git submodule update --init
|
|
./bootstrap.sh
|
|
./b2 -d0 headers
|
|
- name: Install perfect_set
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
git clone https://github.com/joaquintides/perfect_set.git perfect_set-root
|
|
# - name: Install frozen
|
|
# run: |
|
|
# cd $GITHUB_WORKSPACE
|
|
# git clone https://github.com/serge-sans-paille/frozen.git frozen-root
|
|
- name: Compile
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
${{matrix.compiler}} --version
|
|
${{matrix.compiler}} $GITHUB_WORKSPACE/perfect_set-root/${{matrix.sourcefile}} ${{matrix.architecture}} ${{matrix.compileroptions}} -o ${{matrix.outputfile}} -I$GITHUB_WORKSPACE/boost-root -I$GITHUB_WORKSPACE/frozen-root/include
|
|
- name: Run benchmarks
|
|
run: |
|
|
if [ -n "${{matrix.xcode_version}}" ]; then
|
|
DEVELOPER_DIR=/Applications/Xcode-${{matrix.xcode_version}}.app/Contents/Developer
|
|
fi
|
|
if [ -n "${{matrix.command}}" ]; then
|
|
echo "running benchmarks"
|
|
${{matrix.command}}
|
|
else
|
|
echo "running benchmarks"
|
|
./${{matrix.outputfile}}
|
|
fi
|
|
|
|
windows:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: vs-x64
|
|
compiler: cl
|
|
architecture: x64
|
|
sourcefile: lookup.cpp
|
|
compileroptions: /std:c++20 /O2 /GL /D "NDEBUG" /EHsc /MD /Fe:benchmark.exe
|
|
outputfile: benchmark.exe
|
|
os: [self-hosted, Windows, X64]
|
|
|
|
# - name: vs-x64
|
|
# compiler: cl
|
|
# architecture: x64
|
|
# sourcefile: frozen_vs_perfect.cpp
|
|
# compileroptions: /std:c++20 /O2 /GL /D "NDEBUG" /EHsc /MD /constexpr:steps100000000 /Fe:benchmark.exe
|
|
# outputfile: benchmark.exe
|
|
# os: [self-hosted, Windows, X64]
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Boost
|
|
shell: cmd
|
|
run: |
|
|
cd %GITHUB_WORKSPACE%
|
|
git clone https://github.com/boostorg/boost.git boost-root
|
|
cd boost-root
|
|
git checkout develop
|
|
git submodule update --init
|
|
cmd /c bootstrap.bat
|
|
.\b2.exe -d0 headers
|
|
- name: Install perfect_set
|
|
shell: cmd
|
|
run: |
|
|
cd %GITHUB_WORKSPACE%
|
|
git clone https://github.com/joaquintides/perfect_set.git perfect_set-root
|
|
# - name: Install frozen
|
|
# shell: cmd
|
|
# run: |
|
|
# cd %GITHUB_WORKSPACE%
|
|
# git clone https://github.com/serge-sans-paille/frozen.git frozen-root
|
|
- name: Compile
|
|
shell: cmd
|
|
run: |
|
|
cd %GITHUB_WORKSPACE%
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.architecture}}
|
|
set INCLUDE=%INCLUDE%;%GITHUB_WORKSPACE%\boost-root;%GITHUB_WORKSPACE%\frozen-root\include
|
|
echo %INCLUDE%
|
|
${{matrix.compiler}} %GITHUB_WORKSPACE%\perfect_set-root\${{matrix.sourcefile}} ${{matrix.compileroptions}}
|
|
- name: Run benchmark
|
|
shell: powershell
|
|
run: |
|
|
echo "running benchmarks"
|
|
./${{matrix.outputfile}}
|