Skip to content

Commit

Permalink
Fix CI: ureq not supported on wasm
Browse files Browse the repository at this point in the history
ureq used to build on wasm, but apparently it never actually worked:
algesten/ureq#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`
```
  • Loading branch information
michaelkirk committed Aug 9, 2024
1 parent 1a83a0b commit ec0bff3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@ 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

- name: check build
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:
Expand Down

0 comments on commit ec0bff3

Please sign in to comment.