Skip to content

Update to Godot 4

Update to Godot 4 #345

Workflow file for this run

name: Test Build Luxtorpeda
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.72 --profile minimal --no-self-update
rustup default 1.72
shell: bash
- name: Use rust cache
uses: Swatinem/rust-cache@v2
- name: Install Deps
run: sudo apt-get update && sudo apt-get -y install clang libsdl2-dev
shell: bash
- name: Download Godot Export Template
uses: robinraju/[email protected]
with:
repository: luxtorpeda-dev/godot_release_template
latest: true
fileName: "*"
tarBall: false
zipBall: false
- name: Read godot version
id: godot_version
uses: juliangruber/read-file-action@v1
with:
path: ./godot_version.txt
trim: true
- name: Install Godot
run: |
export GODOT_VERSION=$(echo "${{ steps.godot_version.outputs.content }}"|tr -d '\n')
wget https://downloads.tuxfamily.org/godotengine/"$GODOT_VERSION"/Godot_v"$GODOT_VERSION"-stable_linux.x86_64.zip
unzip Godot_v"$GODOT_VERSION"-stable_linux.x86_64.zip
chmod +x Godot_v"$GODOT_VERSION"-stable_linux.x86_64
rm Godot_v"$GODOT_VERSION"-stable_linux.x86_64.zip
mv Godot_v"$GODOT_VERSION"-stable_linux.x86_64 /usr/local/bin/godot
- name: Move Godot Export Template
run: |
mkdir -p ~/.local/share/godot/templates/${{ steps.godot_version.outputs.content }}.stable
mv ./linux_release.x86_64 ~/.local/share/godot/templates/${{ steps.godot_version.outputs.content }}.stable/linux_release.x86_64
- name: Build
run: make release GODOT=godot
- name: Package
env:
SHA_VALUE: ${{ github.sha }}
HEAD_REF: ${{ github.head_ref }}
run: make version="$HEAD_REF"."$SHA_VALUE" luxtorpeda.tar.xz GODOT=godot
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: luxtorpeda.tar.xz
path: ./luxtorpeda.tar.xz
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.72 --profile default
rustup default 1.72
- name: Use rust cache
uses: Swatinem/rust-cache@v2
- name: Clippy Run
run: cargo clippy
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.72 --profile default
rustup default 1.72
- name: fmt Run
run: cargo fmt --all -- --check
audit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.72 --profile default
rustup default 1.72
- name: Use rust cache
uses: Swatinem/rust-cache@v2
- name: Audit Run
run: cargo audit