Skip to content

Commit

Permalink
Fix CI (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhuijzer authored Feb 16, 2024
1 parent 580c4e5 commit 3e6d162
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ jobs:

- name: Setup emscripten SDK
uses: mymindstorm/setup-emsdk@v14
with:
version: '3.1.45'

- name: Verify emscripten
run: emcc -v

- name: Setup Stable Rust with emscripten target
uses: dtolnay/rust-toolchain@v1
with:
target: 'wasm32-unknown-emscripten'
toolchain: 'stable'
run: rustup target add wasm32-unknown-emscripten

- name: Rust cache
uses: Swatinem/rust-cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Apple
.DS_Store
**/.DS_Store

# Rust
**/target/
Expand All @@ -9,4 +9,4 @@
**/*.pdb

# Static
**/public/
**/public/
18 changes: 12 additions & 6 deletions script/public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ fi
if [ -f public/frontend.js ]; then
chmod 666 public/frontend.js
fi
if [ -f public/pa.js ]; then
chmod 666 public/pa.js
fi
if [ -f public/pa.wasm ]; then
chmod 666 public/pa.wasm
fi

cp index.html public
cp style.css public
cp favicon.png public
cp frontend.js public
cp target/wasm32-unknown-emscripten/release/pa.js public
cp target/wasm32-unknown-emscripten/release/pa.wasm public
cp --verbose index.html public
cp --verbose style.css public
cp --verbose favicon.png public
cp --verbose frontend.js public
cp --verbose target/wasm32-unknown-emscripten/release/pa.js public
cp --verbose target/wasm32-unknown-emscripten/release/pa.wasm public

# To avoid accidentally editing the files in public manually.
chmod 444 public/index.html
Expand Down

0 comments on commit 3e6d162

Please sign in to comment.