Skip to content

Commit

Permalink
trying to fix .github, minor code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dedztbh committed Apr 21, 2024
1 parent ac89018 commit c793af3
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 220 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
steps:
# Android only
- name: Android - Set up Java 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: ${{ inputs.platform == 'android' }}
with:
distribution: temurin
Expand All @@ -39,7 +39,7 @@ runs:
uses: nttld/setup-ndk@v1
if: ${{ inputs.platform == 'android' }}
with:
ndk-version: r23c
ndk-version: r26
link-to-sdk: true
# Linux only
- name: Linux - dependencies
Expand All @@ -51,7 +51,7 @@ runs:
# Web only
- name: Web - Set up Emscripten latest
if: ${{ inputs.platform == 'web' }}
uses: mymindstorm/setup-emsdk@v13
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ inputs.em_version }}
actions-cache-folder: ${{ inputs.em_cache_folder }}.${{ inputs.float-precision }}.${{ inputs.build-target-type }}
Expand Down
86 changes: 43 additions & 43 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:

env:
LIBNAME: example
LIBNAME: lifepvp

jobs:
build:
Expand All @@ -15,7 +15,7 @@ jobs:
- platform: linux
float-precision: single
arch: x86_64
os: ubuntu-20.04
os: ubuntu-22.04
- platform: windows
float-precision: single
arch: x86_32
Expand All @@ -24,39 +24,39 @@ jobs:
float-precision: single
arch: x86_64
os: windows-latest
- platform: macos
float-precision: single
arch: universal
os: macos-latest
# - platform: macos
# float-precision: single
# arch: universal
# os: macos-latest
- platform: android
float-precision: single
arch: arm64
os: ubuntu-20.04
os: ubuntu-22.04
- platform: android
float-precision: single
arch: arm32
os: ubuntu-20.04
os: ubuntu-22.04
- platform: android
float-precision: single
arch: x86_64
os: ubuntu-20.04
os: ubuntu-22.04
- platform: android
float-precision: single
arch: x86_32
os: ubuntu-20.04
- platform: ios
float-precision: single
arch: arm64
os: macos-latest
os: ubuntu-22.04
# - platform: ios
# float-precision: single
# arch: arm64
# os: macos-latest
- platform: web
float-precision: single
arch: wasm32
os: ubuntu-20.04
os: ubuntu-22.04

- platform: linux
float-precision: double
arch: x86_64
os: ubuntu-20.04
os: ubuntu-22.04
- platform: windows
float-precision: double
arch: x86_32
Expand All @@ -65,34 +65,34 @@ jobs:
float-precision: double
arch: x86_64
os: windows-latest
- platform: macos
float-precision: double
arch: universal
os: macos-latest
# - platform: macos
# float-precision: double
# arch: universal
# os: macos-latest
- platform: android
float-precision: double
arch: arm64
os: ubuntu-20.04
os: ubuntu-22.04
- platform: android
float-precision: double
arch: arm32
os: ubuntu-20.04
os: ubuntu-22.04
- platform: android
float-precision: double
arch: x86_64
os: ubuntu-20.04
os: ubuntu-22.04
- platform: android
float-precision: double
arch: x86_32
os: ubuntu-20.04
- platform: ios
float-precision: double
arch: arm64
os: macos-latest
os: ubuntu-22.04
# - platform: ios
# float-precision: double
# arch: arm64
# os: macos-latest
- platform: web
float-precision: double
arch: wasm32
os: ubuntu-20.04
os: ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -118,20 +118,20 @@ jobs:
float-precision: ${{ matrix.float-precision }}
build-target-type: template_release
# Sign
- name: Mac Sign
# Disable sign if secrets are not set
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
env:
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
uses: ./.github/actions/sign
with:
FRAMEWORK_PATH: bin/macos/macos.framework
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}
APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}
# - name: Mac Sign
# # Disable sign if secrets are not set
# if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
# env:
# APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
# uses: ./.github/actions/sign
# with:
# FRAMEWORK_PATH: bin/macos/macos.framework
# APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
# APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
# APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}
# APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
# APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
# APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}

- name: Windows - Delete compilation files
if: ${{ matrix.platform == 'windows' }}
Expand Down
12 changes: 11 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,17 @@ env.Alias("compiledb", compilation_db)

env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})

env.Append(CXXFLAGS=["-std=c++20"])
# Use user provided CXX if needed
if "CXX" in os.environ:
env["CXX"] = os.environ["CXX"]

if env["platform"] == "windows":
env.Append(CXXFLAGS=["/std:c++20"])
else:
env.Append(CXXFLAGS=["-std=c++20"])

print("Platform:", env["platform"])
print("C++ Compiler:", env["CXX"])

env.Append(CPPPATH=["src/"])
sources = Glob("src/*.cpp")
Expand Down
1 change: 1 addition & 0 deletions game/License.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extends Label
# Called when the node enters the scene tree for the first time.
func _ready():
text = Engine.get_license_text()
visible = false


func _unhandled_input(event):
Expand Down
6 changes: 4 additions & 2 deletions game/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ offset_bottom = 31.0
script = ExtResource("2_avnxl")

[node name="License" type="Label" parent="CanvasLayer"]
offset_right = 40.0
offset_bottom = 23.0
offset_left = 6.0
offset_top = 42.0
offset_right = 46.0
offset_bottom = 65.0
script = ExtResource("2_qsvb4")

[node name="Camera2D" type="Camera2D" parent="."]
Expand Down
111 changes: 0 additions & 111 deletions src/basic_engine.h

This file was deleted.

Loading

0 comments on commit c793af3

Please sign in to comment.