diff --git a/.github/workflows/macos-sysroot.yml b/.github/workflows/macos-sysroot.yml index 9339115..723eb67 100644 --- a/.github/workflows/macos-sysroot.yml +++ b/.github/workflows/macos-sysroot.yml @@ -41,7 +41,7 @@ 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 @@ -49,6 +49,14 @@ jobs: 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 }}" diff --git a/macos-sysroot/min-add.txt b/macos-sysroot/min-add.txt new file mode 100644 index 0000000..e8f962c --- /dev/null +++ b/macos-sysroot/min-add.txt @@ -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 diff --git a/macos-sysroot/min-remove.txt b/macos-sysroot/min-remove.txt new file mode 100644 index 0000000..e4ee006 --- /dev/null +++ b/macos-sysroot/min-remove.txt @@ -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