-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 476b5c3 🚀
- Loading branch information
0 parents
commit 1990eb9
Showing
8 changed files
with
2,249 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Deploy web demo | ||
|
||
on: | ||
# We only run this on merges to master | ||
push: | ||
branches: ["master"] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# to only run when you do a new github release, comment out above part and uncomment the below trigger. | ||
# on: | ||
# release: | ||
# types: ["published"] | ||
|
||
|
||
permissions: | ||
contents: write # for committing to gh-pages branch | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
env: | ||
# web_sys_unstable_apis is required to enable the web_sys clipboard API which eframe web uses, | ||
# as well as by the wasm32-backend of the wgpu crate. | ||
# 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 -D warnings | ||
RUSTDOCFLAGS: -D warnings | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
name: Deploy web demo | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
target: wasm32-unknown-unknown | ||
toolchain: 1.67.0 | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: "web-demo-" | ||
|
||
- name: "Install wasmopt / binaryen" | ||
run: | | ||
sudo apt-get update && sudo apt-get install binaryen | ||
- run: | | ||
example_eframe/build_web.sh --release | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: web_demo | ||
# this option will not maintain any history of your previous pages deployment | ||
# set to false if you want all page build to be committed to your gh-pages branch history | ||
single-commit: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
on: [push, pull_request] | ||
|
||
name: CI | ||
|
||
env: | ||
# This 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 | ||
|
||
jobs: | ||
check_native: | ||
name: cargo check --all-features | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --all-features | ||
|
||
check_web: | ||
name: cargo check web --all-features | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- run: rustup target add wasm32-unknown-unknown | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --lib --target wasm32-unknown-unknown --all-features | ||
|
||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features -p ehttp | ||
|
||
fmt: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: cargo clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets --all-features -- -D warnings -W clippy::all | ||
|
||
doc: | ||
name: cargo doc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- run: cargo doc -p ehttp --lib --no-deps --all-features | ||
|
||
doc_web: | ||
name: cargo doc web | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.67.0 | ||
override: true | ||
- run: rustup target add wasm32-unknown-unknown | ||
- run: cargo doc -p ehttp --target wasm32-unknown-unknown --lib --no-deps --all-features | ||
|
||
cargo-deny: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
example_eframe_bg.wasm | ||
example_eframe.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Build the web demo using `./example_eframe/build_web.sh` and serve it with `./example_eframe/start_server.sh`. |
Oops, something went wrong.