Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-tennert committed Oct 8, 2023
1 parent 197ecfd commit ebbf345
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
components: wasm-bindgen-cli

- uses: actions/cache@v2
with:
Expand All @@ -22,23 +27,26 @@ jobs:
cache-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-${{ runner.os }}-cargo
- name: Build
run: wasm-pack build --target web --release

- name: Copy Assets
run: |
mkdir build
cp -r pkg build/.
cp -r assets build/.
cp index.html build/.
rm build/pkg/.gitignore
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: build --release --target wasm32-unknown-unknown --features webgl
- name: WASM
run: wasm-bindgen --out-name Simulation --out-dir wasm/target --target web target/wasm32-unknown-unknown/release/Simulation.wasm
# - name: Copy Assets
# run: |
# mkdir build
# cp -r pkg build/.
# cp -r assets build/.
# cp index.html build/.
# rm build/pkg/.gitignore

- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'build'
path: 'wasm'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ opt-level = 1
[profile.dev.package."*"]
opt-level = 3

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
#bevy = { git = "https://github.com/bevyengine/bevy", branch = "release-0.11.3", features = ["dynamic_linking"] }
bevy = { version = "0.11.3" }
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mod diameter;
mod pan_orbit;
mod ui;
mod orbit_lines;
mod lib;

use bevy::app::{App, PluginGroup};
use bevy::DefaultPlugins;
Expand Down

0 comments on commit ebbf345

Please sign in to comment.