From ec0bff3466bfb25158f55385e406a496f1653597 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 9 Aug 2024 13:07:23 -0700 Subject: [PATCH] Fix CI: ureq not supported on wasm ureq used to build on wasm, but apparently it never actually worked: https://github.com/algesten/ureq/issues/667 Now it no longer builds, so I've removed it from CI. ``` error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support Error: --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.15/src/lib.rs:342:9 | 342 | / compile_error!("the wasm*-unknown-unknown targets are not supported by \ 343 | | default, you may need to enable the \"js\" feature. \ 344 | | For more information see: \ 345 | | https://docs.rs/getrandom/#webassembly-support"); | |________________________________________________________________________^ error[E0433]: failed to resolve: use of undeclared crate or module `imp` Error: --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.15/src/lib.rs:398:9 | 398 | imp::getrandom_inner(dest)?; | ^^^ use of undeclared crate or module `imp` ``` --- .github/workflows/test.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0607261..c79f942 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,23 +4,17 @@ on: [push, pull_request] jobs: build_and_check: - strategy: - matrix: - target: - - x86_64-unknown-linux-gnu - - wasm32-unknown-unknown - - name: Build Check ${{ matrix.target }} + name: Build Check runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - - name: Install ${{ matrix.target }} + - name: Install rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable - target: ${{ matrix.target }} + targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown profile: minimal override: true @@ -28,7 +22,14 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --target ${{matrix.target}} --no-default-features --features=reqwest-async,ureq-sync + args: --target x86_64-unknown-linux-gnu --no-default-features --features=reqwest-async,ureq-sync + + - name: check wasm build + uses: actions-rs/cargo@v1 + with: + command: check + # Not all features are supported on wasm + args: --target wasm32-unknown-unknown --no-default-features --features=reqwest-async test: strategy: