Darwin SDKs #6
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: Darwin SDKs | |
on: | |
workflow_dispatch: ~ | |
jobs: | |
extract_darwin_sdks: | |
name: Extract Darwin SDKs | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache fyne-cross | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-fyne-cross | |
with: | |
path: ~/.cache/fyne-cross | |
key: ${{ runner.os }}-fyne-cross-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-fyne-cross- | |
- name: Cache xcode cli tools | |
id: xcode-cli-tools-cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-cli_tools_14.3.1 | |
with: | |
path: ~/.cache/xcode | |
key: ${{ runner.os }}-cli_tools_14.3.1 | |
restore-keys: | | |
${{ runner.os }}-cli_tools_14.3.1 | |
- name: Cache SDKs | |
id: sdks-cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-sdks | |
with: | |
path: | | |
~/.cache/SDKs | |
key: ${{ runner.os }}-1.4-darwin-14.3.1 | |
restore-keys: | | |
${{ runner.os }}-sdks- | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
- name: Install fyne-cross | |
run: | | |
go install fyne.io/fyne/v2/cmd/fyne@latest | |
go install github.com/fyne-io/fyne-cross@v1.4.0 | |
- name: Get xcode cli tools | |
if: steps.xcode-cli-tools-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p ~/.cache/xcode | |
cd ~/.cache/xcode && wget -q -O Command_Line_Tools_for_Xcode_14.3.1.dmg --no-check-certificate ${{secrets.REMOTE_HOST}}/files/Command_Line_Tools_for_Xcode_14.3.1.dmg?token=${{secrets.SRV_TOKEN}} | |
- name: Install brew deps | |
run: | | |
brew install docker colima | |
- name: Start colima | |
id: start-colima | |
if: steps.sdks-cache.outputs.cache-hit != 'true' | |
continue-on-error: true | |
run: | | |
colima start | |
- name: Extract SDKs | |
id: extract-sdks | |
continue-on-error: true | |
if: steps.sdks-cache.outputs.cache-hit != 'true' && steps.start-colima.outcome == 'success' | |
run: | | |
fyne-cross darwin-sdk-extract --xcode-path ~/.cache/xcode/Command_Line_Tools_for_Xcode_14.3.1.dmg --pull=false | |
cd ~/.cache/xcode/SDKs | |
tar -czf SDKs-1.4-darwin-14.3.1.tar.gz * | |
mkdir -p ~/.cache/SDKs | |
mv SDKs-1.4-darwin-14.3.1.tar.gz ~/.cache/SDKs | |
rm -rf ~/.cache/xcode/SDKs | |
- name: Send image | |
if: steps.sdks-cache.outputs.cache-hit == 'true' || steps.extract-sdks.outcome == 'success' | |
run: | | |
cd ~/.cache/SDKs && curl -k -Ffile=@SDKs-1.4-darwin-14.3.1.tar.gz ${{secrets.REMOTE_HOST}}/upload?token=${{secrets.SRV_TOKEN}} |