coz/.travis.yml

44 lines
924 B
YAML
Raw Normal View History

# Build on Ubuntu 18.04
dist: bionic
2019-08-18 20:44:26 +03:00
# Specify language
language: cpp
# Build with both clang and gcc
compiler:
- clang
- g++
# Build all branches except gh-pages
2019-08-18 20:37:49 +03:00
branches:
except:
- gh-pages
2019-08-18 21:02:35 +03:00
# Install dependencies
before_install:
- sudo apt-get update
- sudo apt-get install -y --install-recommends build-essential cmake ninja-build docutils-common nodejs npm
- sudo pip install conan
2019-08-18 21:02:35 +03:00
# Make and install
2019-08-18 20:37:49 +03:00
install:
- mkdir build && cd build
2021-01-09 04:50:13 +03:00
- conan install .. -s compiler.libcxx=libstdc++11 -s compiler.cppstd=11 --build=outdated
- cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_BENCHMARKS=ON -G Ninja
- ninja
- sudo ninja install
Add a Rust implementation of `coz.h` After seeing a recording of Emery's recent talk at Strange Loop I was super impressed with `coz` and immediately wanted to try it out with Rust code! I was curious to see if `coz` could help us out with profiling either Cargo, Rust's build system, or perhaps the compiler itself, `rustc`. In any case I ended up creating https://github.com/alexcrichton/coz-rs as a repository to house an implementation of `coz.h` for Rust so `coz` could be used to easily work with Rust executables. I toyed around a bit and Emery [mentioned] that this would be good support to have upstream once it's working, and I think it's working now! I haven't been able to get a ton of useful results myself yet, but I'm still figuring out the best way to ask `coz` questions and the best way to instrument programs myself. Nonetheless I think that the Rust support here is correct in the sense that it's a faithful translation of `coz.h`, and now it's just a problem with me learning how best to instrument programs. This commit adds a new `rust` directory with a crate (Rust parlance for "library") which provides macros that allow using `coz` instrumentation similar as you would in C, except in idiomatic Rust style. I've published the crate on Rust's package registry, crates.io, as [`coz`][crate], and I don't mind keeping it there or transferring it to y'all, whichever you'd prefer! I also don't mind being on the hook for reviewing any Rust-related changes, or if y'all need to jettison the Rust support in the future I don't mind that either and can give it a home! [mentioned]: https://github.com/alexcrichton/coz-rs/issues/2 [crate]: https://crates.io/crates/coz
2019-09-23 19:07:51 +03:00
2021-01-09 05:23:23 +03:00
# Run tests
script:
- CTEST_OUTPUT_ON_FAILURE=1 ninja test
Add a Rust implementation of `coz.h` After seeing a recording of Emery's recent talk at Strange Loop I was super impressed with `coz` and immediately wanted to try it out with Rust code! I was curious to see if `coz` could help us out with profiling either Cargo, Rust's build system, or perhaps the compiler itself, `rustc`. In any case I ended up creating https://github.com/alexcrichton/coz-rs as a repository to house an implementation of `coz.h` for Rust so `coz` could be used to easily work with Rust executables. I toyed around a bit and Emery [mentioned] that this would be good support to have upstream once it's working, and I think it's working now! I haven't been able to get a ton of useful results myself yet, but I'm still figuring out the best way to ask `coz` questions and the best way to instrument programs myself. Nonetheless I think that the Rust support here is correct in the sense that it's a faithful translation of `coz.h`, and now it's just a problem with me learning how best to instrument programs. This commit adds a new `rust` directory with a crate (Rust parlance for "library") which provides macros that allow using `coz` instrumentation similar as you would in C, except in idiomatic Rust style. I've published the crate on Rust's package registry, crates.io, as [`coz`][crate], and I don't mind keeping it there or transferring it to y'all, whichever you'd prefer! I also don't mind being on the hook for reviewing any Rust-related changes, or if y'all need to jettison the Rust support in the future I don't mind that either and can give it a home! [mentioned]: https://github.com/alexcrichton/coz-rs/issues/2 [crate]: https://crates.io/crates/coz
2019-09-23 19:07:51 +03:00
# Test the Rust support as well
matrix:
include:
- language: rust
rust: stable
before_install: true
install: true
script: cargo test --manifest-path rust/Cargo.toml