30 Commits

Author SHA1 Message Date
Joe Richey
f84a061151 Add additional Web Tests
Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-25 23:05:32 -07:00
Thom Chiovoloni
e32ea822c3
Add tvOS and watchOS to CI 2022-10-24 23:24:56 -07:00
Joe Richey
4917673cd2 Break up Tier 3 builds
Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-24 01:56:17 -07:00
Joe Richey
b35add2bb7 Uptade to Swatinem/rust-cache@v2
Also move the cache step to be right before we start running cargo
commands.

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-24 01:56:17 -07:00
Joe Richey
a91ad48d8c Update to actions/checkout@v3
Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-24 01:56:17 -07:00
Joe Richey
b1da11b850 Run iOS Simulator Tests
This builds, links, and runs the tests on `x86_64-apple-ios` using
[`dinghy`](https://github.com/sonos/dinghy). It moves the targets
which only Build/Link to their own job.

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-24 01:56:10 -07:00
Joe Richey
14b461fa39 Make job names consistent
This makes it easier to tell on which targets we:
  - Build
  - Link
  - Run

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-24 01:50:03 -07:00
Joe Richey
762c95dd7a Move from actions-rs/toolchain to dtolnay/rust-toolchain
The current action we are using is unmantained:
https://github.com/actions-rs/toolchain/issues/216

This replacement is faster, smaller, and more cachable.

We can also completely remove the toolchain step when testing with
cross, as cross handles configuration of its own toolchain.

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-23 21:32:21 -07:00
Joe Richey
1d371ef5e2 Add wasm64-unknown-unknown support
We can build and link just fine, but we cannot actually run the tests as
`wasm-bindgen-test-runner` hasn't yet added support.

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-23 13:47:00 -07:00
Brian Smith
84883207b9 CI: On Nightly toolchains, test the benchmarks instead of just building them.
`cargo test` will run one iteration of each benchmark to provide evidence
that they don't fail in an obvious way (e.g. unintended panics).
2022-10-22 23:16:50 -07:00
Joseph Richey
ce5c2d96ac
Test emscripten via Cross (#302)
Part of addressing #275 

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-22 13:23:49 -07:00
Joseph Richey
d2ca7695e3
Fix Solaris/OpenBSD/Dragonfly build and re-enable CI (#301)
Fixes #216 

This also adds two minor CI improvements:
  - Do a full link on `freebsd`
  - Build, Link, but don't run on `illumos`
  - Use the stable toolchain for our Tier 2 Build-only targets
  - Build (via `build-std`) for Tier 3 targets: `openbsd`, `dragonfly`, `haiku`

Signed-off-by: Joe Richey <joerichey@google.com>
2022-10-22 13:22:38 -07:00
Brian Smith
47a59dda25
Add getrandom_uninit_slice(dest: &mut [MaybeUninit<u8>]) -> .... (#291)
* Add `getrandom_uninit(dest: &mut [MaybeUninit<u8>]) -> ...`.

Add a public API for filling an `&mut [MaybeUninit<u8>]`. This will primarily
serve as the building block for more typeful APIs for constructing random
arrays.

Increase the MSRV to 1.36, as `MaybeUninit` was added in that release.

Fixes #226.

* Revert testing changes

Signed-off-by: Joe Richey <joerichey@google.com>

* Allow rdrand tests to work with new implementation

Signed-off-by: Joe Richey <joerichey@google.com>

* Add Additional benchmarks and buffer size

Signed-off-by: Joe Richey <joerichey@google.com>

* Use pointer casts instead of transmute

Signed-off-by: Joe Richey <joerichey@google.com>

* Avoid initializing the buffer in `getrandom_uninit` benchmarks.

* Benchmarks: Consume the result in `black_box`.

Signed-off-by: Joe Richey <joerichey@google.com>
Co-authored-by: Joe Richey <joerichey@google.com>
2022-10-20 19:09:20 -07:00
Артём Павлов [Artyom Pavlov]
0830ba66be Disable Solaris CI job 2022-03-26 01:19:56 +03:00
Mark Drobnak
d40ec2c7e4
Add support for the Nintendo 3DS (armv6k-nintendo-3ds) (#248) 2022-03-25 16:26:05 +00:00
Артём Павлов [Artyom Pavlov]
f49f083412 fix cross tests 2022-01-29 18:48:38 +03:00
Stewart Mackenzie
ec445bb0ac
Added x86_64-unknown-hermit support (#236) 2021-12-07 14:48:30 +00:00
Tomoaki Kawada
f5e33009ed
Add SOLID target support (#235) 2021-11-30 00:21:36 +00:00
Joseph Richey
922d1de82d
Fix Solaris CI (#216)
The new target is called `x86_64-pc-solaris`, but `cross` doesn't
support that yet, so just use `sparcv9-sun-solaris`.

See the following issues for more info:
  https://github.com/rust-lang/rust/issues/85098
  https://github.com/rust-lang/rust/pull/82216

Signed-off-by: Joe Richey <joerichey@google.com>
2021-05-14 12:04:30 +03:00
Joe Richey
2cfbd8ee60
Modify doc tests to set docsrs
Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-19 02:46:38 -08:00
Joe Richey
03cc4f704d Cache Cargo index and Rust build directory
Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-17 00:28:30 -08:00
Joseph Richey
347a300215
Add test for custom RNG handler (#197)
See #194

This uses the fact that `wasm32-unknown-unknown` is an "unsupported" target. This means we can use the `"custom"` feature to define a custom handler, and then write tests to make sure that function is called.
2021-01-05 02:00:21 -08:00
Joseph Richey
9d7a76c19e
Add Emscripten tests (#196)
See #194 

This installs (and caches) the emsdk toolchain at the last version compatible w/ stable rust. It also tests on both asmjs and wasm32, uses node by default, and works around an asm.js bug.
2021-01-05 01:38:44 -08:00
Joe Richey
7b8f2ba952 Note that installed binaries are precompiled 2021-01-03 21:26:32 -08:00
Joe Richey
7687498160 Only test macOS on stable
Most of the advantages from testing various Rust versions already come
from running those tests on Linux and Windows. There's very little
gain from also running these tests on macOS, while macOS jobs are the
slowest to schedule.

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Joe Richey
ea73f5a975 Update CI
- Cleanup `tests.yml`
- Add better binary downloads
- Add minimal dependancies check
- Add tests for `custom` feature
- Build/Link for iOS
- Run cross tests on aarch64 linux and Android
- Link on Solaris and Netbsd
- Test wasm code on Node, Chrome, Firefox
- Test WASI
- No need for RDRAND feature on VxWorks

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Joe Richey
d5186e0c86 Add Clippy msrv configuration file
This allows us to automatically ignore lints that are
incompatible with our MSRV.

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Joe Richey
3303349ef1 Use -Z build-std=core instead of xbuild
See: https://github.com/rust-osdev/cargo-xbuild#alternative-the-build-std-feature-of-cargo

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Artyom Pavlov
9b4bb0047f
Remove CloudABI support (#184)
* Remove CloudABI support and update CI
2021-01-02 02:42:43 -08:00
Artyom Pavlov
6f11660dde
Migrate CI to GitHub Actions (#180) 2020-12-14 21:50:24 +00:00