Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Kim <sean.skim21@gmail.com>
  • Loading branch information
theskim authored Dec 16, 2024
2 parents 6ff7929 + 7492360 commit bc81ca5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
rust: beta
- os: windows-latest
rust: beta
- os: macos-latest
rust: nightly

runs-on: ${{ matrix.os }}

Expand All @@ -35,12 +33,21 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: ${{ matrix.rust == 'nightly' && 'rust-src' || '' }}
# Add toolchain for no_std tests
- run: rustup toolchain install nightly
- name: Downgrade idna_adapter on Rust 1.63.0
- name: Downgrade deps on Rust 1.63.0
if: |
matrix.rust == '1.63.0'
run: cargo update -p idna_adapter --precise 1.1.0
run: |
cargo update -p idna_adapter --precise 1.1.0
- name: Downgrade deps on Rust 1.67.0
if: |
matrix.rust == '1.67.0'
run: |
cargo update -p zerofrom --precise 0.1.4
cargo update -p yoke --precise 0.7.4
cargo update -p litemap --precise 0.7.3
- name: Add `aarch64-unknown-none` toolchain for `no_std` tests
if: |
matrix.os == 'ubuntu-latest' &&
Expand Down Expand Up @@ -71,6 +78,32 @@ jobs:
run: >
cd url
&& cargo check --target aarch64-unknown-none -v --no-default-features
- name: Run tests with sanitizers
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') && matrix.rust == 'nightly'
env:
ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1
run: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt-get install -y --no-install-recommends llvm
TARGET="x86_64-unknown-linux-gnu"
SANITIZERS="address thread leak memory"
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
TARGET="aarch64-apple-darwin"
# no memory and leak sanitizer support yet
SANITIZERS="address thread"
# Suppress non-crate leaks on macOS. TODO: Check occasionally if these are still needed.
{
echo "leak:dyld4::RuntimeState"
echo "leak:fetchInitializingClassList"
} > suppressions.txt
export LSAN_OPTIONS="suppressions=$(pwd)/suppressions.txt"
fi
for sanitizer in $SANITIZERS; do
echo "Running tests with $sanitizer sanitizer..."
export RUSTFLAGS="-Z sanitizer=$sanitizer"
export RUSTDOCFLAGS="$RUSTFLAGS"
cargo +nightly test -Z build-std --target "$TARGET"
done
WASM:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions url/tests/expected_failures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@
<file://monkey/> set pathname to <\\\\>
<file:///unicorn> set pathname to <//\\/>
<file:///unicorn> set pathname to <//monkey/..//>
<non-spec:/> set pathname to </.//p>
<non-spec:/> set pathname to </..//p>
<non-spec:/> set pathname to <//p>
<non-spec:/.//> set pathname to <p>

0 comments on commit bc81ca5

Please sign in to comment.