Commit Graph

35 Commits

Author SHA1 Message Date
Dominic Hamon
bdd6c44787
Enable various sanitizer builds in github actions (#1167)
* Enable various sanitizer builds in github actions

* try with off the shelf versions

* nope

* specific version?

* rats

* oops

* remove msan for now

* reorder so env is set before building libc++
2021-06-03 19:45:02 +01:00
Dominic Hamon
1f47b6b64c
Remove travis configs that are covered by actions (#1145) 2021-05-10 13:43:08 +01:00
Dominic Hamon
8039b40307
Upgrade bazel from 0.10.1 to 3.2.0 (#976) 2020-06-09 09:50:20 +01:00
Konstantin Khlebnikov
b23d35573b
Fix Travis-ci builds (#950)
Line "- /usr/local/bin:$PATH" is misformatted.
It must be something like "- PATH=/usr/local/bin:$PATH".

It seems something changed in tarvis-ci month ago and now this leads to:

Setting environment variables from .travis.yml
$ export PATH=

Defailt PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
so already containts /usr/local/bin.


Image "xcode8.3" contains macOS 10.12 (sierra) which has no bottles
with precompiled gcc-7 in homebrew storage.

Image "xcode9.4" is a current default with macOS 10.13 (high_sierra).

Link: https://docs.travis-ci.com/user/reference/osx/
Link: https://formulae.brew.sh/formula/gcc@7

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
2020-03-30 09:22:37 +03:00
Dominic Hamon
13b8bdc2b5
Bump required cmake version from 2.x to 3.x (#801) 2019-05-01 09:06:12 +01:00
Roman Lebedev
94115f4419
Revert "Travis-ci: more correctly pass -m32 to 32-bit jobs"
Very interesting, i was completely not expecting to see that cmake
failure from https://github.com/google/benchmark/pull/801 *here*.

This reverts commit 7da47d039d.
2019-04-30 21:07:01 +03:00
Roman Lebedev
7da47d039d
Travis-ci: more correctly pass -m32 to 32-bit jobs
Generally we can't just add -m32 in the middle of the build.
It currently just happens to work, but that is not guaranteed.
2019-04-30 20:32:03 +03:00
Roman Lebedev
5acb0f05ed
Travis-ci: fix clang+libc++ build (#783)
It broke because the libc++ is being built as part of *this*
build, with old gcc+libstdc++ (4.8?), but LLVM is preparing
to switch to C++14, and gcc+libstdc++ <5 are soft-deprecated.

Just the gcc update doesn't cut it, clang still uses old libstdc++.
2019-03-17 18:48:35 +03:00
Roman Lebedev
a7ed76ad78 Travis-ci: attempt to add 32-bit osx xcode build (#669)
Maybe will show https://github.com/google/benchmark/pull/667
or maybe this is completely wrong.
2018-09-05 12:19:54 +01:00
Dominic Hamon
c8adf4531f
Add some 'travis_wait' commands to avoid gcc@7 installation timeouts. (#605) 2018-05-29 13:12:48 +01:00
Eric
7b03df7ff7
Add tests to verify assembler output -- Fix DoNotOptimize. (#530)
* Add tests to verify assembler output -- Fix DoNotOptimize.

For things like `DoNotOptimize`, `ClobberMemory`, and even `KeepRunning()`,
it is important exactly what assembly they generate. However, we currently
have no way to test this. Instead it must be manually validated every
time a change occurs -- including a change in compiler version.

This patch attempts to introduce a way to test the assembled output automatically.
It's mirrors how LLVM verifies compiler output, and it uses LLVM FileCheck to run
the tests in a similar way.

The tests function by generating the assembly for a test in CMake, and then
using FileCheck to verify the // CHECK lines in the source file are found
in the generated assembly.

Currently, the tests only run on 64-bit x86 systems under GCC and Clang,
and when FileCheck is found on the system.

Additionally, this patch tries to improve the code gen from DoNotOptimize.
This should probably be a separate change, but I needed something to test.

* Disable assembly tests on Bazel for now

* Link FIXME to github issue

* Fix Tests on OS X

* fix strip_asm.py to work on both Linux and OS X like targets
2018-03-23 16:10:47 -06:00
jmillikin-stripe
a9beffda0b Add support for building with Bazel. (#533)
* Add myself to CONTRIBUTORS under the corp CLA for Stripe, Inc.

* Add support for building with Bazel.

Limitations compared to existing CMake rules:
* Defaults to using C++11 `<regex>`, with an override via Bazel flag
  `--define` of `google_benchmark.have_regex`. The TravisCI config sets
  the regex implementation to `posix` because it uses ancient compilers.
* Debug vs Opt mode can't be set per test. TravisCI runs all the tests
  in debug mode to satisfy `diagnostics_test`, which depends on `CHECK`
  being live.

* Set Bazel workspace name so other repos can refer to it by stable name.

This is recommended by the Bazel style guide to avoid each dependent
workspace defining its own name for the dependency.
2018-03-08 12:48:46 +00:00
Eric
37dbe80f9b
Attempt to fix travis timeouts during apt-get. (#528)
* Attempt to fix travis timeouts during apt-get.

During some builds, travis fails to update the apt-get indexes.
This causes the build to fail in different ways.

This patch attempts to avoid this issue by manually calling
apt-get update. I'm not sure if it'll work, but it's worth a try.

* Fix missing semicolons in command
2018-02-12 21:28:23 -07:00
Eric
7db02be244
Add support for GTest based unit tests. (#485)
* Add support for GTest based unit tests.

As Dominic and I have previously discussed, there is some
need/desire to improve the testing situation in Google Benchmark.

One step to fixing this problem is to make it easier to write
unit tests by adding support for GTest, which is what this patch does.

By default it looks for an installed version of GTest. However the
user can specify -DBENCHMARK_BUILD_EXTERNAL_GTEST=ON to instead
download, build, and use copy of gtest from source. This is
quite useful when Benchmark is being built in non-standard configurations,
such as against libc++ or in 32 bit mode.
2017-12-13 16:26:47 -07:00
Dominic Hamon
7f2d2cd5b9 fix xcode travis builds by skipping mkdir errors 2017-12-07 14:20:59 -08:00
Victor Costan
0bbaeeaf7a Add GCC on OSX to list of Travis CI configurations. (#492) 2017-11-30 15:21:32 -08:00
Dominic Hamon
febd0d7a7a Remove unnecessary whitespace in travis yaml 2017-05-22 09:27:28 -07:00
Tushar Maheshwari
b1f33d44ea Add macOS builds to .travis.yml (#389) 2017-05-22 09:26:05 -07:00
Eric
0dbcdf56a0 Add BENCHMARK_BUILD_32_BITS option and add builders to test it (#360)
* Add BENCHMARK_BUILD_32_BITS option and add builders to test it

* Attempt to fix travis configuration

* Make add_required_cxx_compiler_flag cause an error when the flag isn't supported

* add gcc-multilib dependancy on travis

* attempt to fix travis.yml parsing error

* Require g++-multilib instead of gcc-multilib

* Add 32 bit release configurations

* Attempt to fix libc++ travis build w/ 32 bits

* Work around CMake configuration failure on Travis
2017-03-28 00:43:42 -07:00
Eric
c6f3f0eb9c Cleanup RunBenchmark code. (#289)
* Cleanup the code for generating and running benchmarks

* Rework calculation of real/manual time

* Add back TSAN builder
2016-09-06 02:28:35 -06:00
Eric Fiselier
60e88c21e4 Remove TSAN builder for now. 2016-09-03 02:11:42 -06:00
Eric Fiselier
db376c8654 Tweak TSAN flags 2016-09-03 01:45:59 -06:00
Eric Fiselier
183999c002 Add Thread Sanitizer bot to Travis 2016-09-03 00:40:44 -06:00
Eric Fiselier
85e7ed7eea Add libc++ and MSAN builders to to travis.
This patch adds three new build configurations to the travis CI.

* Clang 3.8 w/ libc++
* Clang 3.8 w/ libc++, UBSAN, ASAN
* Clang 3.8 w/ libc++, MSAN
2016-08-07 23:44:34 -06:00
Eric Fiselier
8267117a92 Add ASAN and UBSAN builders to travis for both GCC and Clang.
This patch adds new builders that test against GCC 6 and Clang 3.8 respectivly.
They also enable both address and undefined sanitizer. MSAN currently won't work
since it requires a sanitized STL.
2016-08-07 19:25:19 -06:00
Eric
b7f8e355ee update travis, squash history (#265) 2016-08-02 14:47:29 -07:00
Billy Robert O'Neal III
fa0e7ef8c6 Mark sudo: required for Travis
Google Benchmark's Travis build currently requires "sudo" to install newer
versions of CMake and similar. See this for more details:

https://docs.travis-ci.com/user/workers/container-based-infrastructure/

Since Google Benchmark was put into Travis before 2015-01-01, it gets the
standard infrastructure implicitly, so sudo works. But anyone who forks this
repository and tries to add Travis.CI (so they can see if the build works
before creating a PR) gets broken builds before this change.
2016-05-11 12:01:03 -07:00
Matt Clarkson
ef47992125 Added coveralls support 2015-05-13 09:17:48 +01:00
Eric Fiselier
818c9fcc2f Upgrade travis to use CMake 2.8.12 and add Clang builders 2015-04-03 14:43:42 -04:00
Eric Fiselier
bf063941d4 Print information about travis enviroment 2015-04-02 13:32:18 -04:00
Eric Fiselier
e447887d16 Fix travis config by moving CTEST_OUTPUT_ON_FAILURE=1 into make test command 2015-03-09 14:40:08 -04:00
Eric Fiselier
f7602badfb add env to make ctest print on failure 2015-03-09 14:34:32 -04:00
Eric Fiselier
5b41e128b3 Step one towards merging timer changes.
This patch cleans up our use of generic macros and also merges changes in the
build system.

It adds options -DBENCHMARK_ENABLE_TESTING and -DBENCHMARK_ENABLE_SHARED.
2015-03-06 12:35:00 -05:00
Evgeny Safronov
35c29c7d2f Added c++11 support for Travis. 2014-11-12 14:30:57 +04:00
Evgeny Safronov
e4d41f8a23 Using Travis as CI. 2014-11-12 13:32:00 +04:00