Merge pull request #118 from wryun/separate-emscripten-build-dir

Separate emscripten build directory
This commit is contained in:
joeycastillo 2022-11-22 08:37:33 -06:00 committed by GitHub
commit 8dbc00c56d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View file

@ -44,7 +44,7 @@ jobs:
run: emmake make
working-directory: 'movement/make'
- name: Archive simulator build
working-directory: 'movement/make/build'
working-directory: 'movement/make/build-sim'
run: |
cp watch.html index.html
tar -czf simulator.tar.gz index.html watch.wasm watch.js
@ -52,4 +52,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: simulator.tar.gz
path: movement/make/build/simulator.tar.gz
path: movement/make/build-sim/simulator.tar.gz

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
**/build/
**/build-sim/
*.b#*
*.bin
*.d

View file

@ -69,7 +69,7 @@ You may want to test out changes in the emulator first. To do this, you'll need
```
cd movement/make
emmake make
python3 -m http.server 8000 -d build
python3 -m http.server -d build-sim
```
Finally, visit [watch.html](http://localhost:8000/watch.html) to see your work.

View file

@ -1,5 +1,9 @@
##############################################################################
ifndef EMSCRIPTEN
BUILD = ./build
else
BUILD = ./build-sim
endif
BIN = watch
ifndef BOARD

View file

@ -28,9 +28,9 @@ do
make clean
emmake make FIRMWARE=$VARIANT
mkdir "$sim_dir/$variant/"
mv "build/watch.wasm" "$sim_dir/$variant/"
mv "build/watch.js" "$sim_dir/$variant/"
mv "build/watch.html" "$sim_dir/$variant/index.html"
mv "build-sim/watch.wasm" "$sim_dir/$variant/"
mv "build-sim/watch.js" "$sim_dir/$variant/"
mv "build-sim/watch.html" "$sim_dir/$variant/index.html"
done
echo "Done."