Skip to content

Darwin SDKs

Darwin SDKs #4

Workflow file for this run

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_15.1
with:
path: ~/.cache/xcode
key: ${{ runner.os }}-cli_tools_15.1
restore-keys: |
${{ runner.os }}-cli_tools_15.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-15.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@latest
- 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_15.1.dmg ${{secrets.REMOTE_HOST}}/files/Command_Line_Tools_for_Xcode_15.1.dmg?token=${{secrets.SRV_TOKEN}}
- name: Install brew deps
run: |
brew install upx 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_15.1.dmg --pull=false
cd ~/.cache/xcode/SDKs
tar -czf SDKs-1.4-darwin-15.1.tar.gz *
mkdir -p ~/.cache/SDKs
mv SDKs-1.4-darwin-15.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 [email protected] ${{secrets.REMOTE_HOST}}/upload?token=${{secrets.SRV_TOKEN}}