mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 22:33:42 +00:00
ci: fix macos arm
This commit is contained in:
1 parent
8a47b6cfb5
commit
5e92379aa2
1 file changed
+25
-5
@@ -58,9 +58,28 @@ jobs:
|
|||||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
asset_path: dist/zip/*
|
asset_path: dist/zip/*
|
||||||
overwrite: true
|
overwrite: true
|
||||||
build-macos:
|
build-macos-arm64-lib:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ release ]
|
needs: [ release ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '^1.18'
|
||||||
|
cache: true
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
go install src.techknowlogick.com/xgo@latest
|
||||||
|
xgo -go go-1.18.x --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:
|
||||||
|
name: macos-arm64-lib
|
||||||
|
path: libgopeed.dylib
|
||||||
|
|
||||||
|
build-macos-arm64:
|
||||||
|
runs-on: macos-latest
|
||||||
|
needs: [ release, build-lib ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
@@ -73,13 +92,14 @@ jobs:
|
|||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
- name: Install appdmg
|
- name: Install appdmg
|
||||||
run: npm install -g appdmg
|
run: npm install -g appdmg
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: arm64-mac-lib
|
||||||
|
path: ui/flutter/macos/Frameworks
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ needs.release.outputs.tag_name }}
|
VERSION: ${{ needs.release.outputs.tag_name }}
|
||||||
run: |
|
run: |
|
||||||
go install src.techknowlogick.com/xgo@latest
|
|
||||||
xgo -go go-1.18.x --targets=darwin/arm64 -tags="nosqlite" -ldflags="-w -s" -buildmode=c-shared -pkg=bind/desktop -out=libgopeed .
|
|
||||||
mv libgopeed-*.dylib ui/flutter/macos/Frameworks/libgopeed.dylib
|
|
||||||
# go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
|
# go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
|
||||||
|
|
||||||
cd ui/flutter
|
cd ui/flutter
|
||||||
|
|||||||
Reference in new issue
Block a user