ci: build linux

This commit is contained in:
monkeyWie committed 2022-11-02 15:16:24 +00:00
1 parent 423ee5c3d1
commit 48821a519e
4 files changed
+64

No files matched your search

+55
View File
@@ -174,6 +174,61 @@ jobs:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ui/flutter/dist/*
overwrite: true
build-linux:
runs-on: ubuntu-latest
needs: [ release ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1.19'
cache: true
- uses: subosito/flutter-action@v2
- name: Build
env:
VERSION: ${{ needs.release.outputs.tag_name }}
run: |
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build linux
mkdir -p debian/gui
cat>debian/debian.yaml<<EOF
flutter_app:
command: Gopeed
arch: amd64
parent: /usr/local/lib
control:
Package: gopeed
Version: $VERSION
Architecture: amd64
Essential: no
Priority: optional
Depends:
Maintainer: monkeyWie
Description: High speed downloader that supports all platforms.
EOF
cat>debian/gui/Gopeed.desktop<<EOF
[Desktop Entry]
Version=1.0
Name=Gopeed
GenericName=Gopeed
Comment=High speed downloader that supports all platforms.
Terminal=false
Type=Application
Categories=Utility
Keywords=Flutter;Downloader;
EOF
dart pub global activate flutter_to_debian
flutter_to_debian
mv debian/packages/gopeed*.deb gopeed-$VERSION-linux.deb
- name: Upload
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ui/flutter/debian/packages
overwrite: true
build-web:
runs-on: ubuntu-latest
needs: [ release ]
+2
View File
@@ -47,3 +47,5 @@ android/app/libs/libgopeed.aar
android/app/libs/libgopeed-sources.jar
macos/Frameworks/libgopeed.h
macos/Frameworks/libgopeed.dylib
debian/packages
@@ -74,6 +74,10 @@ class LibgopeedBootNative implements LibgopeedBoot {
_libgopeed =
LibgopeedFFi(LibgopeedBind(DynamicLibrary.open('libgopeed.dylib')));
}
if (Platform.isLinux) {
_libgopeed =
LibgopeedFFi(LibgopeedBind(DynamicLibrary.open('libgopeed.so')));
}
}
// FFI run in isolate
+3
View File
@@ -116,6 +116,9 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/bundle/lib/libgopeed.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
install(FILES "${bundled_library}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"