Simplify DOMHighResTimeStamp
to Duration
conversion
#47
This file contains 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: | |
branches: ["main"] | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-test: | |
name: Build & Test | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
rust: | |
- { version: "1.60", msrv: true, flags: "", args: "" } | |
- { version: stable, msrv: false, flags: "", args: "" } | |
target: | |
- { target: x86_64-unknown-linux-gnu, native: true } | |
- { target: wasm32-unknown-unknown, native: false } | |
include: | |
- os: macos-latest | |
rust: { version: stable, msrv: false, flags: "", args: "" } | |
target: { target: wasm32-unknown-unknown, native: false } | |
- os: ubuntu-latest | |
rust: { version: nightly, msrv: false, flags: "-Ctarget-feature=+atomics,+bulk-memory", args: "-Zbuild-std=panic_abort,std" } | |
target: { target: wasm32-unknown-unknown, native: false } | |
- os: macos-latest | |
rust: { version: nightly, msrv: false, flags: "-Ctarget-feature=+atomics,+bulk-memory", args: "-Zbuild-std=panic_abort,std" } | |
target: { target: wasm32-unknown-unknown, native: false } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: wasm-bindgen-cli | |
- name: Install Rust | |
run: | | |
rustup toolchain install ${{ matrix.rust.version }} --profile minimal --target ${{ matrix.target.target }} | |
rustup default ${{ matrix.rust.version }} | |
- name: Build | |
env: | |
RUSTFLAGS: ${{ matrix.rust.flags }} | |
run: cargo build --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
- name: Documentation | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
RUSTDOCFLAGS: ${{ matrix.rust.flags }} | |
RUSTFLAGS: ${{ matrix.rust.flags }} | |
run: cargo doc --no-deps --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
- name: Test on Chrome | |
if: matrix.rust.msrv == false && matrix.os == 'ubuntu-latest' | |
env: | |
CHROMEDRIVER: chromedriver | |
RUSTFLAGS: ${{ matrix.rust.flags }} | |
run: cargo test --all-targets --no-fail-fast --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
- name: Test on Firefox | |
if: matrix.rust.msrv == false && matrix.os == 'ubuntu-latest' | |
env: | |
GECKODRIVER: geckodriver | |
RUSTFLAGS: ${{ matrix.rust.flags }} | |
run: cargo test --all-targets --no-fail-fast --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
- name: Test on Safari | |
if: matrix.rust.msrv == false && matrix.os == 'macos-latest' | |
env: | |
SAFARIDRIVER: safaridriver | |
RUSTFLAGS: ${{ matrix.rust.flags }} | |
run: cargo test --all-targets --no-fail-fast --target ${{ matrix.target.target }} ${{ matrix.rust.args }} | |
- name: Documentation Test | |
if: matrix.rust.msrv == false && matrix.target.native == true && matrix.os == 'ubuntu-latest' | |
run: cargo test --doc --no-fail-fast | |
minimal-versions: | |
name: Minimal Versions | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: minimal-versions | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- "1.60" | |
- stable | |
target: | |
- x86_64-unknown-linux-gnu | |
- wasm32-unknown-unknown | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
rustup toolchain install ${{ matrix.rust }} --profile minimal --target ${{ matrix.target.target }} | |
rustup default ${{ matrix.rust }} | |
- name: Install Rust nightly | |
run: rustup toolchain install nightly --profile minimal | |
- name: Build | |
run: | | |
cargo +nightly update -Z minimal-versions | |
cargo build --target ${{ matrix.target }} |