Skip to content

Commit

Permalink
ci: move caching to before tests
Browse files Browse the repository at this point in the history
  • Loading branch information
morrisonlevi committed Jan 9, 2024
1 parent 88c3e63 commit 8e672c0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/prof_asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
target/
key: ${{ runner.os }}-cargo-asan-${{ hashFiles('**/Cargo.lock') }}

- name: Build profiler
- name: Build and install profiler
run: |
set -eux
switch-php nts-asan
Expand All @@ -41,9 +41,7 @@ jobs:
export RUSTC_LINKER=lld-16
triplet=$(uname -m)-unknown-linux-gnu
RUSTFLAGS='-Zsanitizer=address' cargo +nightly-2023-05-03 build -Zbuild-std --target $triplet --release
cd tests
cp -v $(php-config --prefix)/lib/php/build/run-tests.php .
php run-tests.php --asan -d extension=$CARGO_TARGET_DIR/$triplet/release/libdatadog_php_profiling.so phpt
cp -v "$CARGO_TARGET_DIR/$triplet/release/libdatadog_php_profiling.so" "$(php --extension-dir)/datadog-profiling.so"
- name: Cache build dependencies
uses: actions/cache/save@v3
Expand All @@ -56,3 +54,11 @@ jobs:
target/
key: ${{ runner.os }}-cargo-asan-${{ hashFiles('**/Cargo.lock') }}

- name: Run phpt tests
run: |
set -eux
switch-php nts-asan
cd profiling/tests
cp -v $(php-config --prefix)/lib/php/build/run-tests.php .
php run-tests.php --asan -d extension=datadog-profiling.so phpt

0 comments on commit 8e672c0

Please sign in to comment.