fix(deps): update rust crate wreq to 6.0.0-rc.24 #266
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🧪 Test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # x64 tests on all platforms | |
| - os: ubuntu-latest | |
| node-version: 20 | |
| arch: x64 | |
| - os: ubuntu-latest | |
| node-version: 22 | |
| arch: x64 | |
| - os: ubuntu-latest | |
| node-version: 24 | |
| arch: x64 | |
| - os: macos-latest | |
| node-version: 20 | |
| arch: x64 | |
| - os: macos-latest | |
| node-version: 22 | |
| arch: x64 | |
| - os: macos-latest | |
| node-version: 24 | |
| arch: x64 | |
| - os: windows-latest | |
| node-version: 20 | |
| arch: x64 | |
| - os: windows-latest | |
| node-version: 22 | |
| arch: x64 | |
| - os: windows-latest | |
| node-version: 24 | |
| arch: x64 | |
| # ARM64 tests on supported platforms | |
| - os: macos-14 | |
| node-version: 24 | |
| arch: arm64 | |
| - os: ubuntu-24.04-arm | |
| node-version: 24 | |
| arch: arm64 | |
| # musl builds (cross-compiled from x86_64) | |
| - os: ubuntu-latest | |
| node-version: 24 | |
| arch: x64 | |
| target: x86_64-unknown-linux-musl | |
| name: Test on Node ${{ matrix.node-version }} (${{ matrix.arch }}) - ${{ matrix.os }}${{ matrix.target && format(' [{0}]', matrix.target) || '' }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install musl cross toolchain (x86_64) | |
| if: matrix.target == 'x86_64-unknown-linux-musl' | |
| run: | | |
| set -eux | |
| rustup target add x86_64-unknown-linux-musl | |
| TOOLCHAIN_URL="https://github.com/musl-cross/musl-cross/releases/download/20250929/x86_64-unknown-linux-musl.tar.xz" | |
| mkdir -p "$HOME/musl-cross" | |
| curl -L "$TOOLCHAIN_URL" -o /tmp/x86_64-linux-musl.tar.xz | |
| tar -xJf /tmp/x86_64-linux-musl.tar.xz -C "$HOME/musl-cross" | |
| echo "$HOME/musl-cross/x86_64-unknown-linux-musl/bin" >> "$GITHUB_PATH" | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry/ | |
| ~/.cargo/git/ | |
| key: v2-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target || 'native' }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| v2-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target || 'native' }}-cargo- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Patch boring-sys2 on Windows | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| cd rust | |
| cargo fetch | |
| FILE=$(find ~/.cargo/registry/src -name "main.rs" | grep "boring-sys2" | grep "build") | |
| if [ -z "$FILE" ]; then | |
| echo "Error: Could not find boring-sys2 build/main.rs to patch" | |
| exit 1 | |
| fi | |
| echo "Patching $FILE" | |
| sed -i 's/let bssl_dir = built_boring_source_path(config);/let bssl_dir = built_boring_source_path(config); if config.target.ends_with("-msvc") { println!("cargo:rustc-link-search=native={}\/lib", bssl_dir.display()); }/' "$FILE" | |
| sed -i 's/cfg.build_target("ssl").build();/\/\/ cfg.build_target("ssl").build();/' "$FILE" | |
| sed -i 's/cfg.build_target("crypto").build()/cfg.build_target("ALL_BUILD").build()/' "$FILE" | |
| # - name: Build Rust module (x86_64 musl target) | |
| # if: matrix.target == 'x86_64-unknown-linux-musl' | |
| # env: | |
| # CARGO_BUILD_TARGET: x86_64-unknown-linux-musl | |
| # CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-unknown-linux-musl-gcc | |
| # CC_x86_64_unknown_linux_musl: x86_64-unknown-linux-musl-gcc | |
| # CXX_x86_64_unknown_linux_musl: x86_64-unknown-linux-musl-g++ | |
| # AR_x86_64_unknown_linux_musl: x86_64-unknown-linux-musl-ar | |
| # RANLIB_x86_64_unknown_linux_musl: x86_64-unknown-linux-musl-ranlib | |
| # RUSTFLAGS: -C target-feature=-crt-static | |
| # run: npm run build:rust | |
| # - name: Build Rust module (native) | |
| # if: runner.os == 'Windows' && !matrix.target | |
| # env: | |
| # RUST_BACKTRACE: "1" | |
| # CARGO_TERM_VERBOSE: "true" | |
| # CMAKE_GENERATOR: "Visual Studio 17 2022" | |
| # CARGO_BUILD_TARGET: x86_64-pc-windows-msvc | |
| # CARGO_TARGET_DIR: rust/target | |
| # DEBUG: "false" | |
| # OPT_LEVEL: "3" | |
| # CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL: 3 | |
| # CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG: "false" | |
| # run: npm run build:rust | |
| # - name: Build Rust module (native) | |
| # if: runner.os != 'Windows' && !matrix.target | |
| # run: npm run build:rust | |
| # - name: Debug - List built files | |
| # shell: bash | |
| # run: | | |
| # echo "=== Files in rust/ ===" | |
| # ls -la rust/*.node || echo "No .node files in rust/" | |
| # echo "" | |
| # echo "=== Node platform info ===" | |
| # node -e "console.log('Platform:', process.platform, 'Arch:', process.arch)" | |
| # - name: Build TypeScript | |
| # run: npm run build:ts | |
| - name: Run tests | |
| if: "!matrix.target" | |
| run: npm test | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Check TypeScript types | |
| run: npx tsc --noEmit | |
| - name: Check code formatting | |
| run: npm run ci:biome |