Gather XCode SDKs for OSXCROSS #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gather XCode SDKs for OSXCROSS | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
do_deploy: | ||
description: Does this get deployed to Digital Ocean? | ||
required: true | ||
type: boolean | ||
default: false | ||
tar_files: | ||
description: Do you want to Tar Files? | ||
required: true | ||
type: boolean | ||
default: false | ||
xcode_version: | ||
description: Version of Xcode to copy the SDKs from | ||
required: true | ||
type: string | ||
default: "15.4" | ||
build_type: | ||
description: nightly, prerelease, release | ||
required: true | ||
type: string | ||
default: "nightly" | ||
env: | ||
BASE_FOLDER: deps | ||
XCODE_VERSION: ${{ inputs.xcode_version }} | ||
jobs: | ||
gather: | ||
name: Process XCode SDKs | ||
runs-on: "macos-latest" | ||
steps: | ||
- name: Reinstall XCode | ||
id: base_folder | ||
run: | | ||
sudo rm -rf $(xcode-select -print-path) | ||
xcode-select --install | ||
xcodebuild -license | ||
- name: Set up Base Folder | ||
id: base_folder | ||
Check failure on line 45 in .github/workflows/get_apple_sdks.yml GitHub Actions / Gather XCode SDKs for OSXCROSSInvalid workflow file
|
||
run: | | ||
mkdir -p "$(pwd)/$BASE_FOLDER" | ||
echo "base_folder=$(pwd)/$BASE_FOLDER" >> $GITHUB_OUTPUT | ||
- name: List SDKs and Developer Platforms | ||
run: | | ||
echo '### Base Directory' >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/ >> $GITHUB_STEP_SUMMARY | ||
echo '### Toolchains Directory' >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Toolchains/ >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include >> $GITHUB_STEP_SUMMARY | ||
echo '### Platforms Directory' >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/ >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs >> $GITHUB_STEP_SUMMARY | ||
ls -la /Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs >> $GITHUB_STEP_SUMMARY | ||
- name: Create tar.xz archives for iPhoneOS directories | ||
if: ${{ inputs.tar_files }} | ||
run: | | ||
SDK_PATH="/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" | ||
for sdk in $(ls "$SDK_PATH" | grep iPhoneOS | grep -v iPhoneOS.sdk); do | ||
sudo tar -cJvhf "$(pwd)/$BASE_FOLDER/${sdk}.tar.xz" "$SDK_PATH/$sdk" | ||
done | ||
- name: Create tar.xz archives for iPhoneSimulator directories | ||
if: ${{ inputs.tar_files }} | ||
run: | | ||
SDK_PATH="/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs" | ||
for sdk in $(ls "$SDK_PATH" | grep iPhoneSimulator | grep -v iPhoneSimulator.sdk); do | ||
sudo tar -cJvhf "$(pwd)/$BASE_FOLDER/${sdk}.tar.xz" "$SDK_PATH/$sdk" | ||
done | ||
- name: Create tar.xz archives for MacOSX directories | ||
if: ${{ inputs.tar_files }} | ||
run: | | ||
SDK_PATH="/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" | ||
for sdk in $(ls "$SDK_PATH" | grep MacOSX | grep -v MacOSX.sdk); do | ||
sudo tar -cJvhf "$(pwd)/$BASE_FOLDER/${sdk}.tar.xz" "$SDK_PATH/$sdk" | ||
done | ||
- name: List Base Folder Contents and Add to Summary | ||
if: ${{ inputs.tar_files }} | ||
run: | | ||
ls -la "$(pwd)/$BASE_FOLDER" >> $GITHUB_STEP_SUMMARY | ||
- uses: BetaHuhn/do-spaces-action@v2 | ||
name: Deploy to DigitalOcean | ||
if: ${{ inputs.do_deploy }} | ||
id: spaces | ||
with: | ||
access_key: ${{ secrets.DO_ACCESS_KEY }} | ||
secret_key: ${{ secrets.DO_SECRET_KEY }} | ||
space_name: ${{ secrets.DO_SPACE_NAME }} | ||
space_region: ${{ secrets.DO_SPACE_REGION }} | ||
source: ${{ env.BASE_FOLDER }} | ||
out_dir: pipeline | ||