Skip to content

Commit ededb63

Browse files
committed
test hip with librandomize_readdir
1 parent eecef31 commit ededb63

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

.github/workflows/integration-tests.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ jobs:
588588
ROCM_PATH: "/opt/rocm"
589589

590590
steps:
591-
- uses: actions/checkout@v4
591+
- name: Clone repository
592+
uses: actions/checkout@v4
592593

593594
# I don't want to break the cache during testing. Will turn on after I
594595
# make sure it's working.
@@ -606,44 +607,64 @@ jobs:
606607
# script: |
607608
# core.exportVariable('ROCM_PATH', process.env.ROCM_PATH || '');
608609

610+
- name: Install dependencies
611+
shell: bash
612+
run: |
613+
## Install dependencies
614+
sudo apt-get update
615+
sudo apt-get install -y cmake curl
616+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
617+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
618+
619+
- name: Install rust
620+
uses: ./.github/actions/rust-toolchain
621+
with:
622+
toolchain: "stable"
623+
624+
- name: Build & setup librandomize_readdir
625+
run: |
626+
cargo build -p randomize_readdir
627+
echo "RANDOMIZE_READDIR_LOG=$PWD/readdir.log" >> $GITHUB_ENV
628+
609629
- uses: actions/download-artifact@v4
610630
with:
611631
name: integration-tests
612632
path: /home/runner/.cargo/bin/
613633
- name: Chmod for binary
614634
run: chmod +x ${SCCACHE_PATH}
615635

616-
- name: Install dependencies
617-
shell: bash
618-
run: |
619-
## Install dependencies
620-
sudo apt-get update
621-
sudo apt-get install -y cmake
622-
623636
# Ensure that HIPCC isn't already borken
624637
- name: Sanity Check
625638
run: |
639+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
626640
hipcc -o vectoradd_hip --offload-arch=gfx900 tests/cmake-hip/vectoradd_hip.cpp
627641
628642
- name: Test
629643
run: |
644+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
645+
rm "$RANDOMIZE_READDIR_LOG"
630646
cmake -B build -S tests/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900
631647
cmake --build build
648+
grep -q bitcode "$RANDOMIZE_READDIR_LOG"
632649
633650
- name: Output
634651
run: |
652+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
635653
${SCCACHE_PATH} --show-stats
636654
637655
- name: Test Twice for Cache Read
638656
run: |
657+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
658+
rm "$RANDOMIZE_READDIR_LOG"
639659
rm -rf build
640660
cmake -B build -S tests/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900
641661
cmake --build build
662+
grep -q bitcode "$RANDOMIZE_READDIR_LOG"
642663
643664
- name: Output
644665
run: |
666+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
645667
${SCCACHE_PATH} --show-stats
646-
647668
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
648669
649670
gcc:

0 commit comments

Comments
 (0)