mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2025-02-03 17:32:33 +00:00
ci: fix dmg release artifacts
- build-release.py: use absolute paths instead of resolved paths - xcode: run the shell script with 'set -ex' for extra verbosity + failing when an error happens - On macOS ci, /tmp resolves to /private/tmp, causing the shell script to not find the SDL3.xcframework. So don't use /tmp.
This commit is contained in:
parent
84c69d0f9f
commit
8f4cab0f83
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -106,9 +106,9 @@ jobs:
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
mkdir -p "${{ github.workspace }}/tardir"
|
||||
tar -C "${{ github.workspace }}/tardir" -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=${{ github.workspace }}/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Build SDL3.dmg'
|
||||
id: releaser
|
||||
shell: bash
|
||||
|
@ -2624,7 +2624,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "mkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/resources/CMake/sdl3-config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/resources/CMake/sdl3-config-version.cmake build/dmg-tmp/share/cmake/SDL3\n\nmkdir -p \n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
|
||||
shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/resources/CMake/sdl3-config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/resources/CMake/sdl3-config-version.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
|
||||
};
|
||||
F3B38CF0296F63D1005DA6D3 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
@ -310,7 +310,7 @@ class Releaser:
|
||||
def create_xcframework(self, configuration: str="Release"):
|
||||
dmg_in = self.root / f"Xcode/SDL/build/SDL3.dmg"
|
||||
dmg_in.unlink(missing_ok=True)
|
||||
self.executer.run(["xcodebuild", "-project", self.root / "Xcode/SDL/SDL.xcodeproj", "-target", "SDL3.dmg", "-configuration", configuration])
|
||||
self.executer.run(["xcodebuild", "-project", str(self.root / "Xcode/SDL/SDL.xcodeproj"), "-target", "SDL3.dmg", "-configuration", configuration])
|
||||
if self.dry:
|
||||
dmg_in.parent.mkdir(parents=True, exist_ok=True)
|
||||
dmg_in.touch()
|
||||
@ -519,7 +519,7 @@ class Releaser:
|
||||
|
||||
def main(argv=None):
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Create SDL release artifacts")
|
||||
parser.add_argument("--root", metavar="DIR", type=Path, default=Path(__file__).resolve().parents[1], help="Root of SDL")
|
||||
parser.add_argument("--root", metavar="DIR", type=Path, default=Path(__file__).absolute().parents[1], help="Root of SDL")
|
||||
parser.add_argument("--out", "-o", metavar="DIR", dest="dist_path", type=Path, default="dist", help="Output directory")
|
||||
parser.add_argument("--github", action="store_true", help="Script is running on a GitHub runner")
|
||||
parser.add_argument("--commit", default="HEAD", help="Git commit/tag of which a release should be created")
|
||||
@ -535,9 +535,9 @@ def main(argv=None):
|
||||
args = parser.parse_args(argv)
|
||||
logging.basicConfig(level=args.loglevel, format='[%(levelname)s] %(message)s')
|
||||
args.actions = set(args.actions)
|
||||
args.dist_path = args.dist_path.resolve()
|
||||
args.root = args.root.resolve()
|
||||
args.dist_path = args.dist_path.resolve()
|
||||
args.dist_path = args.dist_path.absolute()
|
||||
args.root = args.root.absolute()
|
||||
args.dist_path = args.dist_path.absolute()
|
||||
if args.dry:
|
||||
args.dist_path = args.dist_path / "dry"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user