Skip to content

Fix github actions

Fix github actions #14

Workflow file for this run

name: Godot Export
on:
push:
branches:
- main
paths-ignore:
- "README.md"
- ".gitattributes"
- ".gitignore"
env:
GODOT_VERSION: 4.3
CC: gcc
jobs:
export-web:
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Godot Template
run: |
mkdir -v -p ~/.local/share/godot/export_templates
mkdir -v -p ~/.config/
mv /root/.config/godot ~/.config/godot
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
ls -lah
- name: Install Python
uses: actions/setup-python@v4
- uses: mymindstorm/setup-emsdk@v14
- name: Verify
run: emcc -v
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src, cargo, rustc, rust-analyzer, rustfmt
- name: GDExtension Build
run: |
cd ./rust/godot-neural-networks
cargo +nightly build -Zbuild-std --target wasm32-unknown-emscripten --release
mkdir -p ../../game/extern/release
cp ./target/wasm32-unknown-emscripten/debug/godot_neural_networks.wasm ../../game/extern/release/godot_neural_networks.wasm
- name: List files
run: |
ls -lah
# - name: Web Build
# run: |
# mkdir -v -p build/web
# godot --headless --verbose --export-release "Web" ../exports/
# ls -lah build/web
# - name: Netlify headers
# # https://github.com/godotengine/godot/issues/69020
# # https://github.com/godotengine/godot/blob/master/platform/web/serve.py
# # https://docs.netlify.com/routing/headers/
# run: |
# cat <<EOF > build/web/_headers
# /*
# Cross-Origin-Opener-Policy: same-origin
# Cross-Origin-Embedder-Policy: require-corp
# Access-Control-Allow-Origin: *
# EOF
# cat build/web/_headers
# - name: Deploy artifacts to `artifacts` branch
# uses: s0/git-publish-subdir-action@develop
# env:
# REPO: self
# BRANCH: gh-pages
# FOLDER: ./build/web
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}