-
Notifications
You must be signed in to change notification settings - Fork 5
105 lines (93 loc) · 4.31 KB
/
get_apple_sdks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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
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