From 39e631039252c5f250dc9a09f3850e1f3ee020d8 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 9 Apr 2024 03:39:07 -0700 Subject: [PATCH 1/4] ci: add Rust integration tests On some GitHub runners (`ubuntu-latest` at least), we can now install VTune. This allows us to run integration tests that show some usage of the API working. The checks are very primitive at the moment but this provides a foundation for future improvement. --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 598b43e4..b5412454 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,3 +82,19 @@ jobs: # The Windows CI transforms the `c-library` symlink into a real directory, modifying the Git # state, so we ignore these changes with `--allow-dirty` here. run: scripts/verify-publish.sh --allow-dirty + + rust_test: + name: Run Rust integration tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: rust/integration-tests + shell: bash + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: recursive + - name: Install VTune + uses: abrown/install-vtune-action + - name: Run integration tests + run: cargo test From 8a9ef866478a9b5d7fd7798149b7ee5862ba8f31 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 9 Apr 2024 03:46:15 -0700 Subject: [PATCH 2/4] WIP: remove code to trigger CI --- rust/ittapi-sys/src/lib.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/rust/ittapi-sys/src/lib.rs b/rust/ittapi-sys/src/lib.rs index ac7b2fd1..e11b4fb0 100644 --- a/rust/ittapi-sys/src/lib.rs +++ b/rust/ittapi-sys/src/lib.rs @@ -32,11 +32,3 @@ include!("windows/jitprofiling_bindings.rs"); include!("freebsd/jitprofiling_bindings.rs"); #[cfg(target_os = "openbsd")] include!("openbsd/jitprofiling_bindings.rs"); - -// #[link(name = "ittnotify", kind = "static")] -// extern "C" { -// #[link_name = "__itt_domain_create_init_3_0"] -// pub fn __itt_domain_create_init_3_0(name: *const std::os::raw::c_char) -> *mut __itt_domain; -// // #[link_name = "__itt_domain_create_init_3_0"] -// // pub fn __itt_domain_create(name: *const std::os::raw::c_char) -> *mut __itt_domain; -// } From 53af541ad402e6ea2e986ecbf6db17988aa071eb Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 9 Apr 2024 03:47:51 -0700 Subject: [PATCH 3/4] Add action version --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5412454..ffd4e5c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,6 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - name: Install VTune - uses: abrown/install-vtune-action + - uses: abrown/install-vtune-action@v1 - name: Run integration tests run: cargo test From 4a9e35cf3aafd469b2d1b4bc733a6de68571d16e Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 9 Apr 2024 04:10:09 -0700 Subject: [PATCH 4/4] Remove HW knob --- rust/integration-tests/tests/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/rust/integration-tests/tests/main.rs b/rust/integration-tests/tests/main.rs index 53a50564..06a4bd89 100644 --- a/rust/integration-tests/tests/main.rs +++ b/rust/integration-tests/tests/main.rs @@ -31,8 +31,6 @@ fn run_with_collector() { "-collect", "hotspots", result_dir_flag, - "-knob", - "sampling-mode=hw", "cargo", "run", ]);