-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10cb298
commit a0f6169
Showing
3 changed files
with
127 additions
and
119 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
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/[email protected] | ||
- 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 [email protected] ${{secrets.REMOTE_HOST}}/upload?token=${{secrets.SRV_TOKEN}} |
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