Merge pull request #261 from huggingface/feature/cpu-slice #1085
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: Rust | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
env: | |
RUST_LOG: "info" | |
MESA_VERSION: "23.3.1" # Sourced from https://archive.mesa3d.org/ | |
WARP_VERSION: "1.0.8" # Sourced from https://www.nuget.org/packages/Microsoft.Direct3D.WARP | |
VULKAN_SDK_VERSION: "1.3.268" # Sourced from https://vulkan.lunarg.com/sdk/home#linux | |
CARGO_TERM_COLOR: always | |
WGPU_DX12_COMPILER: dxc | |
RUSTFLAGS: --cfg=web_sys_unstable_apis | |
RUST_BACKTRACE: 1 | |
DXC_RELEASE: "v1.7.2308" | |
DXC_FILENAME: "dxc_2023_08_14.zip" | |
WASM_BINDGEN_TEST_TIMEOUT: 300 # 5 minutes | |
CI_BINARY_BUILD: "build18" # Corresponds to https://github.com/gfx-rs/ci-build/releases | |
RATCHET_FORCE_F32: 1 | |
jobs: | |
check: | |
name: Check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- name: Windows x86_64 | |
os: windows-2022 | |
target: x86_64-pc-windows-msvc | |
platform: win64 | |
- name: Linux x86_64 | |
os: ubuntu-22.04 | |
target: x86_64-unknown-linux-gnu | |
platform: linux64 | |
- name: MacOS aarch64 | |
os: macos-14 | |
target: aarch64-apple-darwin | |
platform: mac-arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- name: run tests | |
shell: bash | |
run: | | |
set -e | |
cargo nextest run -j 1 --no-fail-fast --features=ci,pyo3 | |
- name: Set up WebDriver for Ubuntu | |
if: matrix.os == 'ubuntu-22.04' | |
run: cp config/webdriver-linux.json crates/ratchet-models/webdriver.json | |
- name: Set up WebDriver for Windows | |
if: matrix.os == 'windows-2022' | |
run: cp config/webdriver-win.json crates/ratchet-models/webdriver.json | |
- name: Set up WebDriver for macOS | |
if: matrix.os == 'macos-14' | |
run: cp config/webdriver-macos.json crates/ratchet-models/webdriver.json | |
- name: Run wasm-bindgen-test integration tests | |
run: | | |
just wasm-test ratchet-models chrome | |
just wasm-test ratchet-hub chrome | |
just wasm-test ratchet-web chrome | |
build: | |
name: Build & Publish Web | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- name: MacOS aarch64 | |
os: macos-14 | |
target: aarch64-apple-darwin | |
platform: mac-arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- name: Build ratchet-web | |
shell: bash | |
run: just wasm ratchet-web | |
- name: Publish ratchet-web | |
shell: bash | |
run: just wasm-publish-pr ratchet-web |