Skip to content

Commit

Permalink
Add linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
yunusey committed Jan 14, 2025
1 parent 5a6ece0 commit 35215d1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 9 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ jobs:
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build Rust
run: cd ./rust/godot-neural-networks && nix develop --command cargo build && nix develop --command cargo build -Zbuild-std=std,panic_abort --target wasm32-unknown-emscripten --release
run: |
cd ./rust/godot-neural-networks
nix develop --command cargo build # we need the debug build for WASM
nix develop --command cargo build --release
nix develop --command cargo build -Zbuild-std=std,panic_abort --target wasm32-unknown-emscripten --release
- name: Move artifacts
run: |
mkdir -v -p ./extern/{release,debug}
cp ./rust/godot-neural-networks/target/wasm32-unknown-emscripten/release/godot_neural_networks.wasm ./extern/release
cp ./rust/godot-neural-networks/target/release/libgodot_neural_networks.so ./extern/release
cp ./rust/godot-neural-networks/target/debug/libgodot_neural_networks.so ./extern/debug
- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -60,17 +65,17 @@ jobs:
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: Raw Build
uses: actions/upload-artifact@v3
with:
name: godot-web
path: ./game
- name: Web Build
run: |
cd ./game
mkdir -v -p build/web
godot --headless --verbose --export-release "Web" build/web/index.html
ls -lah build/web
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: godot-web
path: ./game/build/web
- name: Netlify headers
run: |
cd ./game
Expand All @@ -88,3 +93,38 @@ jobs:
BRANCH: gh-pages
FOLDER: ./game/build/web
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
export-linux:
name: Linux Export
runs-on: ubuntu-20.04
needs:
- build-wasm
container:
image: barichello/godot-ci:4.3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make dir
run: mkdir -v -p ./game/extern
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: godot-neural-networks-wasm
path: ./game/extern
- 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: Linux Build
run: |
cd ./game
mkdir -v -p build/linux
godot --headless --verbose --export-release "Linux" build/linux/flappy-ai.x86_64
ls -lah build/linux
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: godot-linux
path: ./game/build/linux
6 changes: 3 additions & 3 deletions game/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
advanced_options=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="build/temp.x86_64"
export_path="../exports/linux/flappy-ai.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
Expand All @@ -21,7 +21,7 @@ script_export_mode=2
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
Expand Down

0 comments on commit 35215d1

Please sign in to comment.