Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add github action to build source release tarball with submodules #15390

Merged
merged 11 commits into from
Feb 16, 2022

Conversation

rofl0r
Copy link
Contributor

@rofl0r rofl0r commented Feb 10, 2022

whenever a release is created on github using "make new release",
CI will automatically create a tarball containing all sources
including submodules and upload it.
this makes it much easier for distros to build ppsspp using their
existing workflow, without having to resort to running git from
build scripts.

fixes #13973
fixes #11090

result can be seen here: (created using identical GHA) https://github.com/rofl0r/ppsspp/releases/tag/v9.9.99j . the action takes about 15 mins to complete due to sheer size of sources passed to compressor. brought it down to roughly 2 mins and < 40MB by removing pre-built libraries.
this makes the advantages of using the release tarball obvious:
someone intending to build the project from source can fetch a single 40MB tarball with a well-known (cloud, by checking distro recipes) checksum, rather than checking out 2.8GB[!] of recursive git repos, as of today.

ubuntu@~ $ git clone --recursive git://github.com/hrydgard/ppsspp
ubuntu@~ $ du -h ppsspp/ | tail -n 1
2.8G    ppsspp/
ubuntu@~ $

whenever a release is created on github using "make new release",
CI will automatically create a tarball containing all sources
including submodules and upload it.
this makes it much easier for distros to build ppsspp using their
existing workflow, without having to resort to running git from
build scripts.

fixes hrydgard#13973
fixes hrydgard#11090
@anr2me
Copy link
Collaborator

anr2me commented Feb 10, 2022

wow i never knew that linux release can be so bulky O.o
well it have been the largest size for a long time anyway (based on artifacts size comparison on PRs)

@rofl0r
Copy link
Contributor Author

rofl0r commented Feb 10, 2022

@anr2me it's not linux release, but a tarball containing all necessary sources to build (most of them are probably unused, and i've seen there's even some binary stuff inside submodules)

@unknownbrackets
Copy link
Collaborator

If the intent is to support someone who can't use git, it seems like at least the git-version.cpp/win-version.h/etc. should be updated. Such a system is also losing the built-in disk corruption inherent in git, so might need some sort of hash of the source. I do feel bad for the person losing the advantages of git.

-[Unknown]

.github/workflows/build_source_release.yml Outdated Show resolved Hide resolved
.github/workflows/build_source_release.yml Outdated Show resolved Hide resolved
.github/workflows/build_source_release.yml Outdated Show resolved Hide resolved
.github/workflows/build_source_release.yml Outdated Show resolved Hide resolved
.github/workflows/build_source_release.yml Outdated Show resolved Hide resolved
@rofl0r
Copy link
Contributor Author

rofl0r commented Feb 11, 2022

addressed some of your suggestions. since you were concerned about performance/time used, i went ahead and removed some pre-built libraries inside the source tree before packing. this cuts down the size to 67 MB from previously 227 MB, and reduces build time of the job to 6 mins. result: https://github.com/rofl0r/ppsspp/releases/tag/v9.9.99f

@unknownbrackets
Copy link
Collaborator

Well, I assume someone building from source will be happy not having SDL2 statically compiled, so that seems fine.

I also agree with removing the FFmpeg linux libs as they should just always be built (originally they were only included for Android and Windows because of how hard it is to build FFmpeg for those platforms and how important it is for us that people can easily contribute.) I guess that does mean this source tarball would be inappropriate for a Windows user who doesn't really understand how to setup msys2, but probably such a user would have a capable system that could use git anyway.

I'll note that the change to cmake is not enough to make this work for Windows builds (resource file, etc. updates.) But along the same lines, I guess that's not really the target either.

-[Unknown]

@rofl0r
Copy link
Contributor Author

rofl0r commented Feb 14, 2022

@anr2me i don't know the process here to get something merged, but i suspect it could be helpful if you give your approval too, thanks!

@anr2me
Copy link
Collaborator

anr2me commented Feb 14, 2022

You only need unknownbrackets and @hrydgard approval

@unknownbrackets unknownbrackets merged commit 7a7bb7d into hrydgard:master Feb 16, 2022
@unknownbrackets unknownbrackets added this to the v1.13.0 milestone Feb 16, 2022
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.

release tarball including all submodule sources please ? Provide release tarballs for packaging
3 participants