ci: add xgo cache

This commit is contained in:
levi committed 2022-10-28 14:55:25 +08:00
1 parent 46e0c6258f
commit a9c6705bd3
1 file changed
+14 -2
+14 -2
View File
@@ -67,10 +67,22 @@ jobs:
with:
go-version: '^1.19'
cache: true
- run: mkdir -p ~/image-cache
- id: image-cache
uses: actions/cache@v3
with:
path: ~/image-cache
key: image-cache-xgo-v1.19
- if: steps.image-cache.outputs.cache-hit != 'true'
run: |
docker pull techknowlogick/xgo:go-1.19.x
docker save -o ~/image-cache/xgo.tar techknowlogick/xgo:go-1.19.x
- if: steps.image-cache.outputs.cache-hit == 'true'
run: docker load -i ~/image-cache/xgo.tar
- name: Build
run: |
go install src.techknowlogick.com/xgo@latest
xgo -go go-1.19.x --targets=darwin/arm64 -tags="nosqlite" -ldflags="-w -s" -buildmode=c-shared -pkg=bind/desktop -out=libgopeed .
xgo --targets=darwin/arm64 -tags="nosqlite" -ldflags="-w -s" -buildmode=c-shared -pkg=bind/desktop -out=libgopeed .
mv libgopeed-*.dylib libgopeed.dylib
- uses: actions/upload-artifact@v3
with:
@@ -94,7 +106,7 @@ jobs:
run: npm install -g appdmg
- uses: actions/download-artifact@v3
with:
name: arm64-mac-lib
name: macos-arm64-lib
path: ui/flutter/macos/Frameworks
- name: Build
env: