(undo) build full godot, with args #785
Workflow file for this run
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
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
name: Full CI | |
# | |
# Runs before merging. Rebases on master to make sure CI passes for latest integration, not only for the PR at the time of creation. | |
on: | |
merge_group: | |
push: | |
env: | |
GDEXT_FEATURES: '' | |
# GDEXT_FEATURES: '--features godot/serde' | |
RETRY: ${{ github.workspace }}/.github/other/retry.sh | |
# LSan options: https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer | |
# * report_objects: list individual leaked objects when running LeakSanitizer | |
LSAN_OPTIONS: report_objects=1 | |
# ASan options: https://github.com/google/sanitizers/wiki/AddressSanitizerFlags | |
defaults: | |
run: | |
shell: bash | |
# If a new commit is pushed before the old one's CI has completed (on the same branch), abort previous run | |
#concurrency: | |
# group: ${{ github.head_ref }} | |
# cancel-in-progress: true | |
jobs: | |
# For complex matrix workflow, see https://stackoverflow.com/a/65434401 | |
godot-itest: | |
name: godot-itest (${{ matrix.name }}) | |
runs-on: ${{ matrix.os }} | |
continue-on-error: false | |
timeout-minutes: 24 | |
strategy: | |
fail-fast: false # cancel all jobs as soon as one fails? | |
matrix: | |
# Naming: {os}[-{runtimeVersion}]-{apiVersion} | |
# runtimeVersion = version of Godot binary; apiVersion = version of GDExtension API against which gdext is compiled. | |
# Order this way because macOS typically has the longest duration, followed by Windows, so it benefits total workflow execution time. | |
# Additionally, the 'linux (msrv *)' special case will then be listed next to the other 'linux' jobs. | |
# Note: Windows uses '--target x86_64-pc-windows-msvc' by default as Cargo argument. | |
include: | |
# macOS | |
- name: macos-1 | |
os: macos-12 | |
artifact-name: macos-nightly | |
godot-binary: godot.macos.editor.dev.x86_64 | |
rust-extra-args: --features godot/custom-godot | |
- name: macos-2 | |
os: macos-12 | |
artifact-name: macos-nightly | |
godot-binary: godot.macos.editor.dev.x86_64 | |
rust-extra-args: --features godot/custom-godot | |
- name: macos-3 | |
os: macos-12 | |
artifact-name: macos-nightly | |
godot-binary: godot.macos.editor.dev.x86_64 | |
rust-extra-args: --features godot/custom-godot | |
- name: macos-4 | |
os: macos-12 | |
artifact-name: macos-nightly | |
godot-binary: godot.macos.editor.dev.x86_64 | |
rust-extra-args: --features godot/custom-godot | |
- name: macos-5 | |
os: macos-12 | |
artifact-name: macos-nightly | |
godot-binary: godot.macos.editor.dev.x86_64 | |
rust-extra-args: --features godot/custom-godot | |
- name: macos-double | |
os: macos-12 | |
artifact-name: macos-double-nightly | |
godot-binary: godot.macos.editor.dev.double.x86_64 | |
rust-extra-args: --features godot/custom-godot,godot/double-precision | |
- name: macos-4.1 | |
os: macos-12 | |
artifact-name: macos-stable | |
godot-binary: godot.macos.editor.dev.x86_64 | |
#godot-prebuilt-patch: '4.1' | |
# Windows | |
- name: windows | |
os: windows-latest | |
artifact-name: windows-nightly | |
godot-binary: godot.windows.editor.dev.x86_64.exe | |
rust-extra-args: --features godot/custom-godot | |
# Linux | |
# Don't use latest Ubuntu (22.04) as it breaks lots of ecosystem compatibility. | |
# If ever moving to ubuntu-latest, need to manually install libtinfo5 for LLVM. | |
- name: linux | |
os: ubuntu-20.04 | |
artifact-name: linux-nightly | |
godot-binary: godot.linuxbsd.editor.dev.x86_64 | |
rust-extra-args: --features godot/custom-godot | |
# Memory checks: special Godot binaries compiled with AddressSanitizer/LeakSanitizer to detect UB/leaks. | |
# See also https://rustc-dev-guide.rust-lang.org/sanitizers.html. | |
# | |
# Additionally, the Godot source is patched to make dlclose() a no-op, as unloading dynamic libraries loses stacktrace and | |
# cause false positives like println!. See https://github.com/google/sanitizers/issues/89. | |
# | |
# There is also a gcc variant besides clang, which is currently not used. | |
- name: linux-memcheck | |
os: ubuntu-20.04 | |
artifact-name: linux-memcheck-clang-nightly | |
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san | |
rust-toolchain: nightly | |
rust-env-rustflags: -Zrandomize-layout -Zsanitizer=address | |
rust-extra-args: --features godot/custom-godot | |
# Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two. | |
rust-target: x86_64-unknown-linux-gnu | |
- name: linux-memcheck-4.0.4 | |
os: ubuntu-20.04 | |
artifact-name: linux-memcheck-clang-4.0.4 | |
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san | |
godot-prebuilt-patch: '4.0.4' | |
rust-toolchain: nightly | |
rust-env-rustflags: -Zrandomize-layout -Zsanitizer=address | |
# Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two. | |
rust-target: x86_64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Run Godot integration test" | |
uses: ./.github/composite/godot-itest | |
with: | |
artifact-name: godot-${{ matrix.artifact-name }} | |
godot-binary: ${{ matrix.godot-binary }} | |
godot-args: ${{ matrix.godot-args }} # currently unused | |
godot-prebuilt-patch: ${{ matrix.godot-prebuilt-patch }} | |
rust-extra-args: ${{ matrix.rust-extra-args }} --features godot/codegen-full | |
rust-toolchain: ${{ matrix.rust-toolchain || 'stable' }} | |
rust-env-rustflags: ${{ matrix.rust-env-rustflags }} | |
rust-target: ${{ matrix.rust-target }} | |
with-llvm: ${{ contains(matrix.name, 'macos') && contains(matrix.rust-extra-args, 'custom-godot') }} | |
godot-check-header: ${{ matrix.godot-check-header }} | |