Skip to content

Commit

Permalink
Add jemalloc to test -sys style dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jul 31, 2023
1 parent fd201ad commit 9de8f90
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo check/test` on ${{ matrix.os }}
name: Test `cargo check/test/build` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
Expand All @@ -27,4 +27,5 @@ jobs:
- run: |
cargo check
cargo test
cargo build --release
working-directory: tests
21 changes: 21 additions & 0 deletions tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ edition = "2021"
[dependencies]
reqwest = "0.11.11"
watto = { git = "https://github.com/getsentry/watto", rev = "d71c8218506bddba102a124a460d64da25e303dc", features = ["strings"] }

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5"
7 changes: 7 additions & 0 deletions tests/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#[cfg(not(target_env = "msvc"))]
use tikv_jemallocator::Jemalloc;

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;

fn main() {
println!("Hello, world!");
}
Expand Down

0 comments on commit 9de8f90

Please sign in to comment.