Use thin lto for release builds; move 'strip' to meson.build for release
Some checks failed
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / build-linux (push) Successful in 1m44s
Build and Deploy / build-macos (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Some checks failed
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / build-linux (push) Successful in 1m44s
Build and Deploy / build-macos (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -22,14 +22,13 @@ jobs:
|
||||
|
||||
- name: Build Prosperon (Linux)
|
||||
run: |
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_lto_mode=thin -Db_ndebug=true
|
||||
meson compile -C build
|
||||
|
||||
- name: Test Prosperon (Linux)
|
||||
env: { TRACY_NO_INVARIANT_CHECK: 1 }
|
||||
run: |
|
||||
meson test --print-errorlogs -C build
|
||||
strip build/prosperon
|
||||
|
||||
- name: Upload Test Log (Linux)
|
||||
if: ${{ always() }}
|
||||
@@ -73,7 +72,7 @@ jobs:
|
||||
- name: Build Prosperon (Windows)
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true -Dtracy:only_localhost=true -Dtracy:no_broadcast=true
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_lto_mode=thin -Db_ndebug=true -Dtracy:only_localhost=true -Dtracy:no_broadcast=true
|
||||
meson compile -C build
|
||||
|
||||
- name: Test Prosperon (Windows)
|
||||
@@ -81,7 +80,6 @@ jobs:
|
||||
env: { TRACY_NO_INVARIANT_CHECK: 1 }
|
||||
run: |
|
||||
meson test --print-errorlogs -C build
|
||||
strip build/prosperon.exe
|
||||
|
||||
- name: Upload Test Log (Windows)
|
||||
if: ${{ always() }}
|
||||
@@ -110,13 +108,12 @@ jobs:
|
||||
|
||||
- name: Build Prosperon (macOS)
|
||||
run: |
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_lto_mode=thin -Db_ndebug=true
|
||||
meson compile -C build
|
||||
|
||||
- name: Test Prosperon (macOS)
|
||||
run: |
|
||||
meson test --pring-errorlogs -C build
|
||||
strip build/prosperon
|
||||
meson test --print-errorlogs -C build
|
||||
|
||||
- name: Upload Test Log (macOS)
|
||||
if: ${{ always() }}
|
||||
@@ -125,18 +122,12 @@ jobs:
|
||||
name: testlog-macos
|
||||
path: build/meson-logs/testlog.txt
|
||||
|
||||
- name: Create artifact folder (macOS)
|
||||
run: |
|
||||
mkdir _pack
|
||||
cp build_macos/prosperon _pack/
|
||||
cp sdl3-macos/libSDL3*.dylib _pack/ || true
|
||||
|
||||
- name: Upload Artifact (macOS)
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: prosperon-artifacts-macos
|
||||
path: prosperon
|
||||
path: build/prosperon
|
||||
|
||||
# ──────────────────────────────────────────────────────────────
|
||||
# PACKAGE CROSS-PLATFORM DIST
|
||||
|
||||
2
Makefile
2
Makefile
@@ -7,7 +7,7 @@ fast: FORCE
|
||||
meson compile -C build_fast
|
||||
|
||||
release: FORCE
|
||||
meson setup -Dbuildtype=release -Db_lto=true -Db_ndebug=true build_release
|
||||
meson setup -Dbuildtype=release -Db_lto=true -Db_lto_mode=thin -Db_ndebug=true build_release
|
||||
meson compile -C build_release
|
||||
|
||||
sanitize: FORCE
|
||||
|
||||
22
meson.build
22
meson.build
@@ -213,6 +213,26 @@ prosperon_raw = executable('prosperon_raw', sources,
|
||||
install:false
|
||||
)
|
||||
|
||||
strip_enabled = ['release', 'minsize'].contains(get_option('buildtype'))
|
||||
|
||||
if strip_enabled
|
||||
prosperon_raw_stripped = custom_target('prosperon_raw_stripped',
|
||||
input: prosperon_raw,
|
||||
output: 'prosperon_raw_stripped',
|
||||
command: [
|
||||
'sh', '-c',
|
||||
'strip "$1" && cp "$1" "$2"',
|
||||
'stripper',
|
||||
'@INPUT@',
|
||||
'@OUTPUT@'
|
||||
],
|
||||
build_by_default: true
|
||||
)
|
||||
exe_for_concat = prosperon_raw_stripped
|
||||
else
|
||||
exe_for_concat = prosperon_raw
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
exe_ext = '.exe'
|
||||
else
|
||||
@@ -221,7 +241,7 @@ endif
|
||||
|
||||
prosperon = custom_target('prosperon',
|
||||
output: 'prosperon' + exe_ext,
|
||||
input: [prosperon_raw, core],
|
||||
input: [exe_for_concat, core],
|
||||
command: [
|
||||
'sh', '-c',
|
||||
'cat "$1" "$2" > "$3" && chmod +x "$3" >/dev/null 2>&1',
|
||||
|
||||
@@ -310,13 +310,6 @@ graphics.cull_sprites[prosperon.DOC] = `
|
||||
Filter an array of sprites to only those visible in the provided camera’s view.
|
||||
`
|
||||
|
||||
graphics.rects_to_sprites[prosperon.DOC] = `
|
||||
:param rects: An array of rect coords or objects.
|
||||
:param image: An image object (with .texture).
|
||||
:return: An array of sprite objects referencing the 'image' and each rect for UV or position.
|
||||
Convert an array of rect coords into sprite objects referencing a single image.
|
||||
`
|
||||
|
||||
graphics.make_surface[prosperon.DOC] = `
|
||||
:param dimensions: The size object {width, height}, or an array [w,h].
|
||||
:return: A blank RGBA surface with the given dimensions, typically for software rendering or icons.
|
||||
|
||||
@@ -84,7 +84,7 @@ function loop()
|
||||
|
||||
render.present()
|
||||
dt = os.now() - now
|
||||
|
||||
|
||||
fps_samples.push(dt)
|
||||
if (fps_samples.length > fps_window) fps_samples.shift()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user