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)
|
- name: Build Prosperon (Linux)
|
||||||
run: |
|
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
|
meson compile -C build
|
||||||
|
|
||||||
- name: Test Prosperon (Linux)
|
- name: Test Prosperon (Linux)
|
||||||
env: { TRACY_NO_INVARIANT_CHECK: 1 }
|
env: { TRACY_NO_INVARIANT_CHECK: 1 }
|
||||||
run: |
|
run: |
|
||||||
meson test --print-errorlogs -C build
|
meson test --print-errorlogs -C build
|
||||||
strip build/prosperon
|
|
||||||
|
|
||||||
- name: Upload Test Log (Linux)
|
- name: Upload Test Log (Linux)
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -73,7 +72,7 @@ jobs:
|
|||||||
- name: Build Prosperon (Windows)
|
- name: Build Prosperon (Windows)
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
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
|
meson compile -C build
|
||||||
|
|
||||||
- name: Test Prosperon (Windows)
|
- name: Test Prosperon (Windows)
|
||||||
@@ -81,7 +80,6 @@ jobs:
|
|||||||
env: { TRACY_NO_INVARIANT_CHECK: 1 }
|
env: { TRACY_NO_INVARIANT_CHECK: 1 }
|
||||||
run: |
|
run: |
|
||||||
meson test --print-errorlogs -C build
|
meson test --print-errorlogs -C build
|
||||||
strip build/prosperon.exe
|
|
||||||
|
|
||||||
- name: Upload Test Log (Windows)
|
- name: Upload Test Log (Windows)
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -110,13 +108,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Prosperon (macOS)
|
- name: Build Prosperon (macOS)
|
||||||
run: |
|
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
|
meson compile -C build
|
||||||
|
|
||||||
- name: Test Prosperon (macOS)
|
- name: Test Prosperon (macOS)
|
||||||
run: |
|
run: |
|
||||||
meson test --pring-errorlogs -C build
|
meson test --print-errorlogs -C build
|
||||||
strip build/prosperon
|
|
||||||
|
|
||||||
- name: Upload Test Log (macOS)
|
- name: Upload Test Log (macOS)
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -125,18 +122,12 @@ jobs:
|
|||||||
name: testlog-macos
|
name: testlog-macos
|
||||||
path: build/meson-logs/testlog.txt
|
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)
|
- name: Upload Artifact (macOS)
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: prosperon-artifacts-macos
|
name: prosperon-artifacts-macos
|
||||||
path: prosperon
|
path: build/prosperon
|
||||||
|
|
||||||
# ──────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────
|
||||||
# PACKAGE CROSS-PLATFORM DIST
|
# PACKAGE CROSS-PLATFORM DIST
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -7,7 +7,7 @@ fast: FORCE
|
|||||||
meson compile -C build_fast
|
meson compile -C build_fast
|
||||||
|
|
||||||
release: FORCE
|
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
|
meson compile -C build_release
|
||||||
|
|
||||||
sanitize: FORCE
|
sanitize: FORCE
|
||||||
|
|||||||
22
meson.build
22
meson.build
@@ -213,6 +213,26 @@ prosperon_raw = executable('prosperon_raw', sources,
|
|||||||
install:false
|
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'
|
if host_machine.system() == 'windows'
|
||||||
exe_ext = '.exe'
|
exe_ext = '.exe'
|
||||||
else
|
else
|
||||||
@@ -221,7 +241,7 @@ endif
|
|||||||
|
|
||||||
prosperon = custom_target('prosperon',
|
prosperon = custom_target('prosperon',
|
||||||
output: 'prosperon' + exe_ext,
|
output: 'prosperon' + exe_ext,
|
||||||
input: [prosperon_raw, core],
|
input: [exe_for_concat, core],
|
||||||
command: [
|
command: [
|
||||||
'sh', '-c',
|
'sh', '-c',
|
||||||
'cat "$1" "$2" > "$3" && chmod +x "$3" >/dev/null 2>&1',
|
'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.
|
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] = `
|
graphics.make_surface[prosperon.DOC] = `
|
||||||
:param dimensions: The size object {width, height}, or an array [w,h].
|
: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.
|
:return: A blank RGBA surface with the given dimensions, typically for software rendering or icons.
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function loop()
|
|||||||
|
|
||||||
render.present()
|
render.present()
|
||||||
dt = os.now() - now
|
dt = os.now() - now
|
||||||
|
|
||||||
fps_samples.push(dt)
|
fps_samples.push(dt)
|
||||||
if (fps_samples.length > fps_window) fps_samples.shift()
|
if (fps_samples.length > fps_window) fps_samples.shift()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user