Visual changes #20
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
name: Build Lobster WASM demos | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
pages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update and install OpenGL | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install libglu1-mesa-dev freeglut3-dev mesa-common-dev | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- name: Clone and activate Emscripten | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
- name: Clone and build Lobster | |
run: | | |
git clone https://github.com/jon-edward/lobster.git | |
cd lobster/dev | |
cmake -DCMAKE_BUILD_TYPE=Release | |
make -j8 | |
- name: Build cube | |
run: | | |
source ./emsdk/emsdk_env.sh | |
python3 build.py --entry ./demos/cube/main.lobster --out-dir ./demos/cube --lobster ./lobster --html ./demos/demos_index.html | |
- name: Build lobstercraft | |
run: | | |
source ./emsdk/emsdk_env.sh | |
python3 build.py --entry ./demos/lobstercraft/main.lobster --out-dir ./demos/lobstercraft --lobster ./lobster --html ./demos/demos_index.html | |
- name: Build pendulum | |
run: | | |
source ./emsdk/emsdk_env.sh | |
python3 build.py --entry ./demos/pendulum/main.lobster --out-dir ./demos/pendulum --lobster ./lobster --html ./demos/demos_index.html | |
- name: Build physics_boxes | |
run: | | |
source ./emsdk/emsdk_env.sh | |
python3 build.py --entry ./demos/physics_boxes/main.lobster --out-dir ./demos/physics_boxes --lobster ./lobster --html ./demos/demos_index.html | |
- name: Build physics_water | |
run: | | |
source ./emsdk/emsdk_env.sh | |
python3 build.py --entry ./demos/physics_water/main.lobster --out-dir ./demos/physics_water --lobster ./lobster --html ./demos/demos_index.html | |
- name: Build pythtree | |
run: | | |
source ./emsdk/emsdk_env.sh | |
python3 build.py --entry ./demos/pythtree/main.lobster --out-dir ./demos/pythtree --lobster ./lobster --html ./demos/demos_index.html | |
- name: Clean up cloned repositories | |
run: | | |
rm -rf ./lobster | |
rm -rf ./emsdk | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: ./ | |
destination: ./_site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |