Skip to content

Commit

Permalink
create '-min' version of macOS sysroot
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkMyCar committed Sep 28, 2024
1 parent 7eeef5f commit f9af634
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/macos-sysroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,22 @@ jobs:
- name: Package SDK
run: |
mkdir working working/$SDK_NAME
mkdir working working/$SDK_NAME working/$SDK_NAME-min
mkdir artifacts
cp -rP $SDK_PATH/* working/$SDK_NAME
cat macos-sysroot/remove.txt | while read -r val; do eval rm -v working/$SDK_NAME/$val || true; done
cd working
tar -cf - $SDK_NAME/* | zstd --ultra -22 -o "../artifacts/$SDK_NAME.tar.zst"
cd ..
cp -rP $SDK_PATH/* working/$SDK_NAME-min
cat macos-sysroot/min-remove.txt | while read -r val; do eval rm -rf working/$SDK_NAME-min/$val || true; done
cat macos-sysroot/min-add.txt | while read -r val; do eval mkdir -p working/$SDK_NAME-min/$val && cp -r working/$SDK_NAME/$val working/$SDK_NAME-min/$val; done
cd working
tar -cf - $SDK_NAME-min/* | zstd --ultra -22 -o "../artifacts/$SDK_NAME-min.tar.zst"
- name: Determine Release Tag
run: |
RELEASE_TAG="macos-sysroot-sdk-${{ inputs.macos_sdk_version }}"
Expand Down
6 changes: 6 additions & 0 deletions macos-sysroot/min-add.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
System/Library/Frameworks/CoreFoundation.framework
System/Library/Frameworks/Foundation.framework
System/Library/Frameworks/IOKit.framework
System/Library/Frameworks/Kernel.framework
System/Library/Frameworks/Security.framework
System/Library/Frameworks/SystemConfiguration.framework
25 changes: 25 additions & 0 deletions macos-sysroot/min-remove.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
System
usr/share
usr/libexec
usr/lib/log
usr/lib/swift
usr/lib/updaters
usr/include/apache2
usr/include/AppleArchive
usr/include/apr-1
usr/include/atm
usr/include/bank
usr/include/cups
usr/include/default_pager
usr/include/device
usr/include/device.modulemap
usr/include/EndpointSecurity
usr/include/libDER
usr/include/libexslt
usr/include/libxslt
usr/include/net-snmp
usr/include/netkey
usr/include/networkext
usr/include/pexpert
usr/include/Spatial
usr/include/tidy

0 comments on commit f9af634

Please sign in to comment.