Skip to content

Commit b032b73

Browse files
committed
vendor: upgrade Google Benchmark
Upgrade Google Benchmark from v1.5.1 to v1.6.1. This version includes bug fixes, such as compatibility with more compilers and CPUs.
1 parent 7dbd6d3 commit b032b73

File tree

135 files changed

+7861
-3047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+7861
-3047
lines changed

vendor/README.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ The benchmark directory contains Google Benchmark, a performance measurement
1010
framework for C++ code.
1111

1212
Copyright: Copyright 2015 Google Inc. All rights reserved.; Copyright 2016 Ismael Jimenez Martinez. All rights reserved.
13-
Download URL: https://codeload.github.com/google/benchmark/tar.gz/v1.5.1
14-
Download date: August 20, 2020
15-
Git commit: 8039b4030795b1c9b8cedb78e3a2a6fb89574b6e
13+
Download URL: https://github.com/google/benchmark/archive/refs/tags/v1.6.1.tar.gz
14+
Download date: April 18, 2022
15+
Git commit: 0d98dba29d66e93259db7daa53a9327df767a415
1616
License file: LICENSE
1717
License type: Apache-2.0
1818
Location: benchmark
1919
Project URL: https://github.com/google/benchmark
20-
Release URL: https://github.com/google/benchmark/releases/tag/v1.5.1
21-
Release date: June 9, 2020
22-
Version: v1.5.1
20+
Release URL: https://github.com/google/benchmark/releases/tag/v1.6.1
21+
Release date: January 10, 2022
22+
Version: v1.6.1
2323

2424
## boost
2525

vendor/benchmark.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
if (QUICK_LINT_JS_USE_BUNDLED_GOOGLE_BENCHMARK)
55
set(BENCHMARK_DOWNLOAD_DEPENDENCIES FALSE CACHE INTERNAL "")
66
set(BENCHMARK_ENABLE_ASSEMBLY_TEST FALSE CACHE INTERNAL "")
7+
set(BENCHMARK_ENABLE_DOXYGEN FALSE CACHE INTERNAL "")
78
set(BENCHMARK_ENABLE_GTEST_TESTS FALSE CACHE INTERNAL "")
89
set(BENCHMARK_ENABLE_INSTALL FALSE CACHE INTERNAL "")
910
set(BENCHMARK_ENABLE_LTO FALSE CACHE INTERNAL "")
1011
set(BENCHMARK_ENABLE_TESTING FALSE CACHE INTERNAL "")
12+
set(BENCHMARK_ENABLE_WERROR FALSE CACHE INTERNAL "")
1113
set(BENCHMARK_USE_LIBCXX FALSE CACHE INTERNAL "")
1214

1315
if (MSVC)

vendor/benchmark/.clang-tidy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
Checks: 'clang-analyzer-*,readability-redundant-*,performance-*'
3+
WarningsAsErrors: 'clang-analyzer-*,readability-redundant-*,performance-*'
4+
HeaderFilterRegex: '.*'
5+
AnalyzeTemporaryDtors: false
6+
FormatStyle: none
7+
User: user
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
# Checkout LLVM sources
4+
git clone --depth=1 https://github.com/llvm/llvm-project.git llvm-project
5+
6+
# Setup libc++ options
7+
if [ -z "$BUILD_32_BITS" ]; then
8+
export BUILD_32_BITS=OFF && echo disabling 32 bit build
9+
fi
10+
11+
# Build and install libc++ (Use unstable ABI for better sanitizer coverage)
12+
cd ./llvm-project
13+
cmake -DCMAKE_C_COMPILER=${C_COMPILER} \
14+
-DCMAKE_CXX_COMPILER=${COMPILER} \
15+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
16+
-DCMAKE_INSTALL_PREFIX=/usr \
17+
-DLIBCXX_ABI_UNSTABLE=OFF \
18+
-DLLVM_USE_SANITIZER=${LIBCXX_SANITIZER} \
19+
-DLLVM_BUILD_32_BITS=${BUILD_32_BITS} \
20+
-DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' \
21+
-S llvm -B llvm-build -G "Unix Makefiles"
22+
make -C llvm-build -j3 cxx cxxabi
23+
sudo make -C llvm-build install-cxx install-cxxabi
24+
cd ..
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: bazel
2+
3+
on:
4+
push: {}
5+
pull_request: {}
6+
7+
jobs:
8+
build-and-test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
14+
- name: mount bazel cache
15+
uses: actions/[email protected]
16+
env:
17+
cache-name: bazel-cache
18+
with:
19+
path: "~/.cache/bazel"
20+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.ref }}
21+
restore-keys: |
22+
${{ env.cache-name }}-${{ runner.os }}-main
23+
24+
- name: build
25+
run: |
26+
bazel build //:benchmark //:benchmark_main //test/...
27+
28+
- name: test
29+
run: |
30+
bazel test --test_output=all //test/...
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: build-and-test-perfcounters
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
job:
11+
# TODO(dominic): Extend this to include compiler and set through env: CC/CXX.
12+
name: ${{ matrix.os }}.${{ matrix.build_type }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, ubuntu-20.04]
18+
build_type: ['Release', 'Debug']
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: install libpfm
23+
run: sudo apt -y install libpfm4-dev
24+
25+
- name: setup cmake
26+
uses: jwlawson/[email protected]
27+
with:
28+
cmake-version: '3.5.1'
29+
30+
- name: create build environment
31+
run: cmake -E make_directory ${{ runner.workspace }}/_build
32+
33+
- name: configure cmake
34+
shell: bash
35+
working-directory: ${{ runner.workspace }}/_build
36+
run: >
37+
cmake $GITHUB_WORKSPACE
38+
-DBENCHMARK_ENABLE_LIBPFM=1
39+
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
40+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
41+
42+
- name: build
43+
shell: bash
44+
working-directory: ${{ runner.workspace }}/_build
45+
run: cmake --build . --config ${{ matrix.build_type }}
46+
47+
# Skip testing, for now. It seems perf_event_open does not succeed on the
48+
# hosting machine, very likely a permissions issue.
49+
# TODO(mtrofin): Enable test.
50+
# - name: test
51+
# shell: bash
52+
# working-directory: ${{ runner.workspace }}/_build
53+
# run: ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure
54+
55+
ubuntu-16_04:
56+
name: ubuntu-16.04.${{ matrix.build_type }}
57+
runs-on: [ubuntu-latest]
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
build_type: ['Release', 'Debug']
62+
container: ubuntu:16.04
63+
steps:
64+
- uses: actions/checkout@v2
65+
66+
- name: install required bits
67+
run: |
68+
apt update
69+
apt -y install clang cmake g++ git
70+
71+
- name: install libpfm
72+
run: apt -y install libpfm4-dev
73+
74+
- name: create build environment
75+
run: cmake -E make_directory $GITHUB_WORKSPACE/_build
76+
77+
- name: configure cmake
78+
shell: bash
79+
working-directory: ${{ github.workspace }}/_build
80+
run: >
81+
cmake $GITHUB_WORKSPACE
82+
-DBENCHMARK_ENABLE_LIBPFM=1
83+
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
84+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
85+
86+
- name: build
87+
shell: bash
88+
working-directory: ${{ github.workspace }}/_build
89+
run: cmake --build . --config ${{ matrix.build_type }}
90+
91+
# Skip testing, for now. It seems perf_event_open does not succeed on the
92+
# hosting machine, very likely a permissions issue.
93+
# TODO(mtrofin): Enable test.
94+
# - name: test
95+
# shell: bash
96+
# working-directory: ${{ runner.workspace }}/_build
97+
# run: ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: build-and-test
2+
3+
on:
4+
push: {}
5+
pull_request: {}
6+
7+
jobs:
8+
# TODO: add 32-bit builds (g++ and clang++) for ubuntu
9+
# (requires g++-multilib and libc6:i386)
10+
# TODO: add coverage build (requires lcov)
11+
# TODO: add clang + libc++ builds for ubuntu
12+
job:
13+
name: ${{ matrix.os }}.${{ matrix.build_type }}.${{ matrix.compiler }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, ubuntu-20.04, macos-latest]
19+
build_type: ['Release', 'Debug']
20+
compiler: [g++, clang++]
21+
include:
22+
- displayTargetName: windows-latest-release
23+
os: windows-latest
24+
build_type: 'Release'
25+
- displayTargetName: windows-latest-debug
26+
os: windows-latest
27+
build_type: 'Debug'
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: create build environment
32+
run: cmake -E make_directory ${{ runner.workspace }}/_build
33+
34+
- name: configure cmake
35+
env:
36+
CXX: ${{ matrix.compiler }}
37+
shell: bash
38+
working-directory: ${{ runner.workspace }}/_build
39+
run: >
40+
cmake $GITHUB_WORKSPACE
41+
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
42+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
43+
44+
- name: build
45+
shell: bash
46+
working-directory: ${{ runner.workspace }}/_build
47+
run: cmake --build . --config ${{ matrix.build_type }}
48+
49+
- name: test
50+
shell: bash
51+
working-directory: ${{ runner.workspace }}/_build
52+
run: ctest -C ${{ matrix.build_type }} -VV
53+
54+
ubuntu-16_04:
55+
name: ubuntu-16.04.${{ matrix.build_type }}.${{ matrix.compiler }}
56+
runs-on: [ubuntu-latest]
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
build_type: ['Release', 'Debug']
61+
compiler: [g++, clang++]
62+
container: ubuntu:16.04
63+
steps:
64+
- uses: actions/checkout@v2
65+
66+
- name: install required bits
67+
run: |
68+
apt update
69+
apt -y install clang cmake g++ git
70+
71+
- name: create build environment
72+
run: cmake -E make_directory $GITHUB_WORKSPACE/_build
73+
74+
- name: configure cmake
75+
env:
76+
CXX: ${{ matrix.compiler }}
77+
shell: bash
78+
working-directory: ${{ github.workspace }}/_build
79+
run: >
80+
cmake $GITHUB_WORKSPACE
81+
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
82+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
83+
84+
- name: build
85+
shell: bash
86+
working-directory: ${{ github.workspace }}/_build
87+
run: cmake --build . --config ${{ matrix.build_type }}
88+
89+
- name: test
90+
shell: bash
91+
working-directory: ${{ github.workspace }}/_build
92+
run: ctest -C ${{ matrix.build_type }} -VV
93+
94+
ubuntu-14_04:
95+
name: ubuntu-14.04.${{ matrix.build_type }}.${{ matrix.compiler }}
96+
runs-on: [ubuntu-latest]
97+
strategy:
98+
fail-fast: false
99+
matrix:
100+
build_type: ['Release', 'Debug']
101+
compiler: [g++-4.8, clang++-3.6]
102+
include:
103+
- compiler: g++-6
104+
build_type: 'Debug'
105+
run_tests: true
106+
- compiler: g++-6
107+
build_type: 'Release'
108+
run_tests: true
109+
container: ubuntu:14.04
110+
steps:
111+
- uses: actions/checkout@v2
112+
113+
- name: install required bits
114+
run: |
115+
sudo apt update
116+
sudo apt -y install clang-3.6 cmake3 g++-4.8 git
117+
118+
- name: install other bits
119+
if: ${{ matrix.compiler }} == g++-6
120+
run: |
121+
sudo apt -y install software-properties-common
122+
sudo add-apt-repository -y "ppa:ubuntu-toolchain-r/test"
123+
sudo apt update
124+
sudo apt -y install g++-6
125+
126+
- name: create build environment
127+
run: cmake -E make_directory $GITHUB_WORKSPACE/_build
128+
129+
- name: configure cmake
130+
env:
131+
CXX: ${{ matrix.compiler }}
132+
shell: bash
133+
working-directory: ${{ github.workspace }}/_build
134+
run: >
135+
cmake $GITHUB_WORKSPACE
136+
-DBENCHMARK_ENABLE_TESTING=${{ matrix.run_tests }}
137+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
138+
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=${{ matrix.run_tests }}
139+
140+
- name: build
141+
shell: bash
142+
working-directory: ${{ github.workspace }}/_build
143+
run: cmake --build . --config ${{ matrix.build_type }}
144+
145+
- name: test
146+
if: ${{ matrix.run_tests }}
147+
shell: bash
148+
working-directory: ${{ github.workspace }}/_build
149+
run: ctest -C ${{ matrix.build_type }} -VV
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: clang-format-lint
2+
on:
3+
push: {}
4+
pull_request: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: DoozyX/[email protected]
13+
with:
14+
source: './include/benchmark ./src ./test'
15+
extensions: 'h,cc'
16+
clangFormatVersion: 12
17+
style: Google

0 commit comments

Comments
 (0)