Skip to content

Commit

Permalink
only one inlining check job
Browse files Browse the repository at this point in the history
  • Loading branch information
hkratz committed Oct 19, 2024
1 parent 4a6f527 commit 58715ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
shell: bash
if: ${{ matrix.toolchain == 'nightly' }}

test-inlining-x86:
test-inlining:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -122,38 +122,20 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: "x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, aarch64-apple-darwin"
components: "llvm-tools-preview"
- name: Install stable toolchain
run: rustup toolchain add stable
- name: Install rustfilt
run: cargo +stable install rustfilt
- name: Check if the expected fns are inlined
- name: Check x86_64 inlining
run: |
./check-inlining.sh x86_64-unknown-linux-gnu expected-methods-x86-std.txt
./check-inlining.sh x86_64-unknown-linux-gnu expected-methods-x86-std.txt "--features public_imp"
RUSTFLAGS="-C target-feature=+avx2" ./check-inlining.sh x86_64-unknown-linux-gnu expected-methods-x86-std-avx2.txt
RUSTFLAGS="-C target-feature=+avx2" ./check-inlining.sh x86_64-unknown-linux-gnu expected-methods-x86-nostd-avx2.txt --no-default-features
RUSTFLAGS="-C target-feature=+sse4.2" ./check-inlining.sh x86_64-unknown-linux-gnu expected-methods-x86-nostd-sse42.txt --no-default-features
test-inlining-aarch64:
runs-on: macos-latest
strategy:
matrix:
# the neon target feature was unconditionally enabled for aarch64 in 1.61.0
toolchain: [nightly, beta, stable, 1.61.0]
defaults:
run:
working-directory: inlining
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: aarch64-unknown-linux-gnu, aarch64-apple-darwin
- name: Install stable toolchain
run: rustup toolchain add stable
- name: Install rustfilt
run: cargo +stable install rustfilt
- name: Check if the expected fns are inlined
- name: Check aarch64 inlining
run: |
for target in aarch64-unknown-linux-gnu aarch64-apple-darwin
do
Expand Down
3 changes: 2 additions & 1 deletion inlining/check-inlining.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ expected_fns="$2"
build_args="${3:-}"
cargo clean --quiet
cargo build --quiet --release --target $target $build_args
nm_output=$(nm --defined-only ../target/$target/release/libsimdutf8.rlib)
LLVM_NM=$(rustc --print sysroot)/lib/rustlib/$(rustc -vV | sed -n 's|host: ||p')/bin/llvm-nm
nm_output=$($LLVM_NM --defined-only ../target/$target/release/libsimdutf8.rlib)
if [[ $target == *darwin* ]]; then
pattern=" (t|T) _"
cut_arg=21
Expand Down

0 comments on commit 58715ad

Please sign in to comment.