-
Notifications
You must be signed in to change notification settings - Fork 373
66 lines (52 loc) · 1.78 KB
/
reusable_build_js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Reusable Build JS
on:
workflow_call:
inputs:
CONCURRENCY:
required: true
type: string
concurrency:
group: ${{ inputs.CONCURRENCY }}-build-js
cancel-in-progress: true
env:
# web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html
RUSTFLAGS: --cfg=web_sys_unstable_apis --deny warnings
# See https://github.com/ericseppanen/cargo-cranky/issues/8
RUSTDOCFLAGS: --deny warnings --deny rustdoc::missing_crate_level_docs
jobs:
build:
name: Build
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install Yarn
run: npm install -g yarn
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
cache_key: "build-web"
# Cache will be produced by `reusable_checks/rs-check-wasm`
save_cache: false
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- uses: prefix-dev/setup-pixi@v0.3.0
with:
pixi-version: v0.13.0
- name: Install dependencies
shell: bash
run: pixi run yarn --cwd rerun_js install
- name: Build package
shell: bash
run: pixi run yarn --cwd rerun_js workspaces run build