Skip to content

Add release archive action to release.yml - #1099

Merged
zeux merged 2 commits into
masterfrom
archive
Sep 28, 2026
Merged

zeux merged 2 commits into
masterfrom
archive

Conversation

@zeux

@zeux zeux commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

We will use this to produce meshoptimizer-version.tar.gz which will be
attached to releases as an artifact. This is hash-stable as GitHub will
not recompress it, and contains a subset of meshoptimizer repository -
excluding files that are used for editor setup, Git repository management
and extra demo content. js/ is included for web module consumers.

.tar.gz was chosen over .zip because it embeds Git metadata, notably,
the commit SHA, which can be retrieved via git get-tar-commit-id:

$ cat meshoptimizer-1.3.tar.gz | gzip -d | git get-tar-commit-id
9e1f07b159d3cb777f1c67ed31fc11fd117986f4

The first commit here builds the archive as-is from the v1.3 sources; this
requires inclusion of tools/objloader.cpp into the archive. The resulting .tar.gz
was built by this GHA run and uploaded to v1.3 release retroactively, with SHA256
d50a0b5e1323ba4379cdb32f89436c20652b7393445f8e18c88ae64445b67b77

To simplify the structure for future releases, the second commit removes
tools/objloader.cpp (it was simply building fast_obj.h) so that the future
archives do not need to package tools/. This requires changing CMakeLists.txt
so the 1.3 .tar.gz does not include this for consistency, but it will be part of 1.4.

Fixes #1098.

We will use this to produce meshoptimizer-version.tar.gz which will be
attached to release as an artifact. This is hash-stable as GitHub will
not recompress it, and contains a subset of meshoptimizer repository -
excluding files that are used for editor setup, Git repository management
and extra demo content. js/ is included for web module consumers.

Also temporarily let this run on 'arhive' branch to produce the
artifact, and use v1.3 for checkout so that we get a correct .tar.gz
built on GHA. This will be reverted in a later commit.
Instead of relying on objloader.cpp to build fast_obj.h implementation,
we simply build it as part of main.cpp for now. If the build time
increase becomes noticeable, this can be extracted into a separate file,
but it works for now.

This allows us to remove the references to any tools/ files from
CMakeLists.txt as well as adjust the source archive to not include
tools/ at all. Makefile which is used for internal development and
should not be used externally continues to reference tools/ but is not
packaged.
@zeux
zeux merged commit 4c20343 into master Sep 28, 2026
13 checks passed
@zeux
zeux deleted the archive branch September 28, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stable source archive

1 participant