Skip to content

Build

Build #1069

Workflow file for this run

name: "Build"
on:
push:
schedule: # Test daily.
- cron: 0 11 * * *
jobs:
run-godot:
name: ${{ matrix.os }} ${{ matrix.bits }}bit ${{ matrix.version }} ${{ matrix.mono && 'mono' || '' }} ${{ matrix.export-templates && 'export' || '' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-12]
bits: [64, 32]
mono: [true, false]
version:
[
"v3.1.2-stable",
"v3.2.3-stable",
"v3.3.4-stable",
"v3.4.5-stable",
"v3.5.1-stable",
"v3.5.3-stable",
"v4.2.1-stable",
]
include:
# Different versions of Godot have different command line options,
# export_presets and project settings, so just export for these versions.
- version: "v3.5.1-stable"
export-templates: true
- version: "v4.2.1-stable"
export-templates: true
exclude:
- os: macos-12
bits: 32
- mono: true
version: "v4.2.1-stable"
- os: macos-12
version: "v4.2.1-stable"
- os: windows-latest
version: "v4.2.1-stable"
# Issue: https://github.com/godotengine/godot/issues/27496
- os: ubuntu-latest
bits: 32
mono: false
version: "v3.1-stable"
- os: ubuntu-latest
bits: 32
mono: false
version: "v3.1.2-stable"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Godot
id: setup-godot
uses: ./
with:
version: ${{ matrix.version }}
bits: ${{ matrix.bits }}
mono: ${{ matrix.mono }}
export-templates: ${{ matrix.export-templates }}
- shell: bash
run: godot --editor --quit
- name: Export project
if: ${{ matrix.export-templates == true }}
working-directory: test_project
shell: bash
# v3 and v4 use --export and --export-<target> respectively.
run: godot --no-window --export ${{ matrix.os }} || godot --headless --export-debug ${{ matrix.os }}
- name: Run exported project (linux)
if: ${{ matrix.export-templates == true && matrix.os == 'ubuntu-latest' }}
working-directory: test_project
run: |
./test --rendering-driver opengl3
grep 'Test success!' ~/.local/share/godot/app_userdata/test/test.log || grep 'Test success!' ~/.local/share/godot/app_userdata/test/logs/godot.log
- name: Run exported project (macos)
if: ${{ matrix.export-templates == true && matrix.os == 'macos-12' }}
working-directory: test_project
run: |
volume=`hdiutil attach ./test.dmg | grep Volumes | awk '{print $3}'`
cp -rf $volume/*.app /Applications
hdiutil detach $volume
open -W /Applications/test.app
grep 'Test success!' ~/Library/Application\ Support/Godot/app_userdata/test/test.log
- name: Run exported project (windows)
if: ${{ matrix.export-templates == true && matrix.os == 'windows-latest' }}
working-directory: test_project
run: .\test.exe -and Select-String -Path "$env:Appdata\Godot\app_userdata\test\test.log" -Pattern "Test success!"
with_alias:
name: "with alias"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Godot with alias
uses: ./
with:
alias: coolGameEngine
- name: Run Godot with alias
run: coolGameEngine --editor --quit
- name: Setup Godot v3.3.2 with alias
uses: ./
with:
version: 3.3.2
alias: godot-3.3.2
- name: Setup Godot v3.2 with alias
uses: ./
with:
version: 3.2
alias: godot-3.2
- name: Check versions
run: |
godot-3.3.2 --version || true
godot-3.2 --version || true
no_cache:
name: "no cache"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Godot without using cache
uses: ./
with:
cache: false
run_twice:
name: "runs twice"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Godot
uses: ./
- shell: bash
run: godot --editor --quit
- name: Setup Godot again
uses: ./
- shell: bash
run: godot --editor --quit
x11-server:
name: "starts X11 server"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check X11 server not running on :0
run: DISPLAY=:0; if ! xset -q; then exit 0; else exit 1; fi
- name: Setup Godot
uses: ./
- name: Check X11 server started on :0
run: DISPLAY=:0; if ! xset -q; then exit 1; else exit 0; fi
- name: Check X11 server not running on :95
run: DISPLAY=:95; if ! xset -q; then exit 0; else exit 1; fi
- name: Set DISPLAY environment variable to :95
uses: university-of-york/ds-devtool-setEnvVars@v3.1.0
with:
envFile: test/x11.env
overwrite: true
- name: Setup Godot again
uses: ./
- name: Check X11 server started on :95
run: DISPLAY=:95; if ! xset -q; then exit 1; else exit 0; fi
export-html5:
name: Export HTML5 (${{ matrix.os }}, ${{ matrix.bits }}bit, ${{ matrix.version }}, ${{ matrix.mono && 'mono, ' || '' }}${{ matrix.export-type }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bits: [64, 32]
mono: [false, true]
export-type: [regular, threads, gdnative]
version: ["v3.5.1-stable"]
exclude:
- os: macos-latest
bits: 32
- mono: true
export-type: threads
- mono: true
export-type: gdnative
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Godot
uses: ./
with:
version: ${{ matrix.version }}
bits: ${{ matrix.bits }}
mono: ${{ matrix.mono }}
export-templates: true
- name: Export HTML5 (${{ matrix.export-type }})
shell: bash
working-directory: test_project
run: godot --no-window --export html5-${{ matrix.export-type }}