Commit Graph

57 Commits

Author SHA1 Message Date
daxpedda
00ab174fcc
Update Rust version for UI tests (#3850) 2024-02-21 23:17:19 +01:00
Dirk Stolle
12889ef666
Update JamesIves/github-pages-deploy-action in GHA workflow to newest v4 (#3841) 2024-02-10 23:43:24 +01:00
Dirk Stolle
9f1d1188ca
Update actions/upload-artifact + actions/download-artifact to v4 (#3842) 2024-02-09 12:30:25 +01:00
Dirk Stolle
1f12124a60
Update setup-geckodriver action to use Node.js 20 (#3839) 2024-02-08 11:19:01 +01:00
Dirk Stolle
6eecd5b624
Update actions/setup-node in GitHub Actions workflows to v4 (#3838) 2024-02-08 11:18:17 +01:00
Dirk Stolle
0d2d56cc5e
Update actions/checkout in GitHub Actions workflows to v4 (#3837) 2024-02-08 11:17:33 +01:00
daxpedda
8198d2d259
Fix crates.io secret 2024-02-06 20:21:27 +01:00
daxpedda
4b6ef26f8a
Fixed nighly build of wasm-bindgen-futures (#3827) 2024-02-06 11:20:08 +01:00
daxpedda
3e469b2654
Deprecate --weak-refs in favor of run-time detection (#3822)
* Deprecate `--weak-refs` in favor of run-time detection

* Generate empty functions instead

* Fix integration tests

* Improve `Closure::into_js_value()` docs
2024-02-05 09:01:50 +01:00
daxpedda
c1945151e3
Run cargo publich on deployment (#3811) 2024-01-26 02:04:55 +01:00
daxpedda
a4af50b80d
Fix publish workflow 2023-11-27 16:24:01 +01:00
daxpedda
9344ac01de
Fix bump workflow permissions 2023-11-27 16:18:43 +01:00
daxpedda
e11514ff38
Fix bump workflow permissions 2023-11-27 16:15:23 +01:00
Muhammad Hamza
bd596dcef1
Configure git in bump workflow (#3675) 2023-10-31 17:21:41 +05:00
Muhammad Hamza
ef7ad00cbe
Add workflow to bump versions and create releases (#3674)
* Add action to bump versions

* Add action to release from bumped branch
2023-10-31 17:14:12 +05:00
Thomas Etter
561d3c0584
Update node from 16 to 20 (#3666) 2023-10-24 11:15:10 +02:00
Jeff Hemphill
2e9ff5dfa3
Add rust-toolchain.toml to raytracing example (#3607) 2023-10-18 16:09:10 +02:00
Liam Murphy
8d063a4908
Fix example tests (#3614)
* Fix example tests

I went to enable testing for the `synchronous-instantiation` example now
that Firefox supports module workers, but then found that the
`wasm-audio-worklet` example was failing because the test server doesn't
set the headers needed to enable `SharedArrayBuffer`.

It turns out that CI wasn't failing because it's been broken this whole
whole time: it specifies the path to the built examples as simply
`exbuild`, which doesn't work because the tests are run with their
working directory set to `crates/example-tests`, not the root of the
repo. This means that any requests that the examples try to make will
404. So this PR specifies it as an absolute path instead.

At the moment, Firefox doesn't directly indicate any kind of error when
navigation fails, which meant that the tests would just silently fail
without actually testing anything. According to the spec,
`browsingContext.navigate` is supposed to wait for the navigation to
complete, and result in an error if something goes wrong; but I think
Firefox is behind, because it seems to instead immediately return.

To work around this, I've made it so that the tests manually wait for
the `network.responseCompleted` event to check if fetching the page
suceeded, and so this shouldn't happen again.

I've left the actual fix for the `wasm-audio-worklet` example commented
out to make sure that CI actually catches the issue now; that's why this
PR is a draft.

* properly interpolate repo root

* use correct variable

It looks like `env` is specifically for variables that you set manually,
not arbitrary environment variables.

* Fix wasm_audio_worklet

* tweak doc comment
2023-09-15 12:50:01 +10:00
Cormac Relf
26e83779c8
add .sha256 checksums to binary distribution tarballs (#3605) 2023-09-14 16:16:47 +02:00
Liam Murphy
ac480862a3
Fix pkg not being uploaded for non-Webpack examples (#3520)
I noticed that none of the examples that compile using `wasm-pack` were working properly in https://rustwasm.github.io/wasm-bindgen/exbuild. I think this is happening because `wasm-pack` generates a `.gitignore` for the `pkg` folder, which the GitHub Pages uploader is interpreting to mean 'don't upload this'.

This PR makes CI delete those `.gitignore`s to try and fix that. It's still a draft because I don't know if it's actually going to work.

This isn't _that_ severe, since the only broken example which is actually linked to from the guide is the WebSockets example. Once I've seen whether this has worked I might go ahead and add links for the rest of the `wasm-pack`-built examples as well.
2023-07-22 17:32:34 +10:00
Lukas Lihotzki
d21495b528
Clippy: Fixes and CI for examples and tests (#3442) 2023-05-21 16:01:35 +02:00
Lukas Lihotzki
85f72c9125
Clippy: Fixes and CI (#3300) 2023-05-17 12:02:02 +02:00
Alex Crichton
562160363a
Try to fix CI (#3414)
* Update UI errors to current stable Rust

* Update nightlies used in CI
2023-05-08 17:28:24 -05:00
Lukas Lihotzki
e76fcfd802
Update mdbook (#3353) 2023-05-08 10:20:28 -05:00
daxpedda
8994cb94da
Update cargo dependency resolver to v2 (#3358) 2023-05-08 10:19:24 -05:00
Melanie Riise
5aad55a6a3
update rust ver for UI tests in CI to 1.60.0 (#3409) 2023-05-08 10:14:32 -05:00
Liam Murphy
8481b4f812
Remove experimental interface types support (#3372)
* Change the bare minimum to be able to remove the wit-* deps

* Remove some holdovers

Namely `Generated` being an enum and the `trap` fields of `Instruction::IntToWasm` and `Instruction::WasmToInt`.

* remove tests for interface types

* update reference tests

* fix reference tests (again)

* Allow enabling multi-value

For some reason wasm-bindgen would only allow enabling multi-value if interface types were enabled, throwing an error otherwise. I couldn't see any reason why, so I changed that.

Since that also meant that multi-value + JS bindings wasn't being tested, allowing it exposed some bugs that I fixed.

* update test expectations
2023-04-10 09:34:12 -05:00
Liam Murphy
2a28cfb1ff
Don't install wasm-opt in CI (#3366)
* Don't install binaryen in CI

This is a workaround for rustwasm/wasm-pack#1247, which causes `wasm-pack` to fail to run if a local version of `wasm-opt` is installed. That in turn caused the `build_examples` CI job to break.

This PR fixes that by not having it download binaryen, instead letting `wasm-pack` install it itself, which still works.

* Put back the binaryen-installing step, but only install wasm2js instead of the whole thing.

I also updated to binaryen 112 while I was at it.
2023-03-24 10:21:39 -05:00
Nam Se Hyun
5d22f5b9d6
Append features to web-sys Cargo.toml by wasm-bindgen-webidl (#3343) 2023-03-08 18:40:02 +11:00
daxpedda
d9e113b735
Implement #[should_panic(expected = "...")] handling (#3293) 2023-02-14 08:53:17 +11:00
Lukas Lihotzki
d090e94512
Refactor try_unescape in macro-support (#3292)
* Add unit test for fix_unescape

* Refactor try_unescape in macro-support
2023-02-10 15:16:53 +11:00
Dirk Stolle
312e6e5871
Update JamesIves/github-pages-deploy-action in GHA workflow to v4.4.1 (#3287) 2023-02-06 11:29:53 +11:00
Dirk Stolle
8a263d01f9
Update setup-geckodriver action to use Node 16 (#3286)
Actions using Node.js 12 are deprecated, so let's move on.
2023-02-03 17:25:26 -06:00
Dirk Stolle
6c04512737
Update actions/download-artifact in GitHub Actions workflows to v3 (#3285) 2023-02-03 17:25:15 -06:00
Dirk Stolle
7ea5fb0912
Update actions/setup-node in GitHub Actions workflows to v3 (#3284) 2023-02-03 15:58:39 -06:00
Dirk Stolle
5550e767f5
Update actions/upload-artifact in GitHub Actions workflows to v3 (#3283) 2023-02-03 15:25:33 -06:00
Dirk Stolle
ff079ae196
Update actions/checkout in GitHub Actions workflows to v3 (#3282) 2023-02-03 15:25:14 -06:00
daxpedda
3a939c4047
Remove faulty location.href fallback and disable --split-linked-modules by default (#3279)
* Remove faulty `location.href` fallback

* Disable `--split-linked-modules` in cli-support
2023-02-02 23:26:51 +11:00
Alex
b57eb8d8db
build: harden main.yml permissions (#3187)
Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-12-08 16:55:50 -06:00
printfn
8ae0f7ff4c
add aarch64-apple-darwin binary to releases (#3129)
Co-authored-by: printfn <printfn@users.noreply.github.com>
2022-11-01 08:51:37 -05:00
morenol
fa43337531
build: add aarch64-linux-gnu binary to releases (#3118)
* build: add aarch64-linux-gnu binary to releases

* set linker

* Address feedback

* Address feedback

* FIX

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
2022-10-19 08:44:59 -05:00
Lukas Lihotzki
5c3f6ed46a
Fix links to WASM audio worklet example (#3030) 2022-08-14 09:17:45 +10:00
Lukas Lihotzki
d881d9da64
Add example with WASM audio worklet (#3017) 2022-08-13 20:12:17 +10:00
Liam Murphy
643a773429
Test examples in CI (#3015)
* Add a test that examples don't throw any errors

TODO:
- run all the tests, not just the ones which use webpack (also an issue with CI)
- fix webxr test
- run in CI
- share WebDriver instance between tests
- maybe ditch async, since we don't really need it here and it adds a bunch of dependencies and build time.

* Disable testing WebXR example

It isn't supported in Firefox yet, which is where we're running our tests.

* Test examples that aren't built with webpack

* Remove `WEBDRIVER` environment variable

It wouldn't have worked anyway because at least for the moment, I'm using one WebDriver session per test, and Firefox at least only allows one session to be connected.

I would like to make them share a session, in which case I could add this back, but I can't right now because Firefox hasn't implemented `LogEntry.source` yet, which is needed to figure out which log entries should fail which tests.

* Run in CI

* Use `Once` instead of `Mutex`

* Build `webxr` and `synchronous-instantiation` in CI

Although we can't test them, we can still build them.

* Add missing '`'

* Fix running of tests

* Only include dev deps when not compiling for wasm

* oops, those are the native tests

* Create build dirs before copying to them

* Install binaryen

* decompress

* Follow redirects

* Set `PATH` properly

* Use an absolute path

* Don't symlink `node_modules` and fix artifact download

* Enable `web_sys_unstable_apis`

This is needed for the `webxr` example.

* Increase timeout to 10s

* Increase timeout to 20s

This seems excessive but 10s is still sometimes failing.

* Disable testing the webgl example

* Add binaryen to PATH directly after installing

* Properly download the raytrace example artifacts

* Disable example tests instead of enabling everything else

* Move to a separate `example-tests` crate
2022-08-05 10:51:41 -05:00
Liam Murphy
0aa23f0897
Don't attempt to update rustup in CI (#2998)
For whatever reason, updating rustup sometimes fails on Windows (such as https://github.com/rustwasm/wasm-bindgen/runs/7375883557?check_suite_focus=true), so disable that since the version of rustup used has no effect on us anyway.
2022-07-18 08:21:45 -05:00
João Freires
321595803c
update nightly version (#2960) 2022-06-21 13:07:47 -05:00
Dominic Elm
3822e67149
Expose helpers to allow synchronous initialization (#2924)
* Expose helpers to allow synchronous initialization

* fixup: fix tests
2022-06-08 14:18:05 -05:00
Ivan Enderlin
6ec0ce1b3f
test(ci) Remove duplicate actions. (#2918)
I was wondering if running `cargo test --target wasm32-unknown-unknown`
_twice_ is necessary. If not, please discard this commit.
2022-05-31 09:23:38 -05:00
Liam Murphy
bea87f04de
Fix memory getter checks when using shared memory (#2899)
* Fix memory getter check for shared memory

* Run tests with multithreading enabled in CI
2022-05-18 09:50:58 -05:00
Liam Murphy
152816c101
Make Closure::new work on stable (#2891)
* Make `Closure::new` work on stable

I've removed the nightly requirement by replacing `Unsize<T>` with a custom `IntoWasmClosure<T>` trait, implemented for `Fn` and `FnMut`.

I don't think this is a breaking change, since I don't think any stability guarantees are provided for nightly.

* Update docs

I also removed an outdated note about closures only being able to take WASM primitive types.

* Remove nightly CI

* Don't attempt to enable the removed nightly feature in doc generation
2022-05-09 09:17:13 -05:00