Skip to content

Commit ed907e9

Browse files
committed
Chore: Remove workmanager override to fix linux arm64 build
1 parent df03da8 commit ed907e9

File tree

3 files changed

+4
-164
lines changed

3 files changed

+4
-164
lines changed

.github/workflows/linux.yml

Lines changed: 0 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -4,97 +4,8 @@ on:
44
# Enable manual run
55
workflow_dispatch:
66
push:
7-
tags:
8-
- '**'
9-
branches:
10-
- '**'
11-
paths:
12-
- .github/workflows/linux.yml
13-
- appimage/AppImageBuilder.yml
147

158
jobs:
16-
build-flutter-app-x86_64:
17-
name: Build Flutter app (x86_64)
18-
runs-on: ubuntu-latest
19-
permissions:
20-
contents: write
21-
timeout-minutes: 20
22-
steps:
23-
- name: Checkout code
24-
uses: actions/checkout@v4
25-
26-
- name: Install apt dependencies
27-
uses: awalsh128/cache-apt-pkgs-action@latest
28-
with:
29-
packages: libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev libsecret-1-dev libjsoncpp-dev ghostscript libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev webkit2gtk-4.1-dev
30-
version: 1.0
31-
execute_install_scripts: true
32-
33-
- name: Setup cache
34-
uses: actions/cache@v4
35-
with:
36-
path: |
37-
build
38-
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
39-
restore-keys: |
40-
${{ runner.OS }}-saber-
41-
42-
- name: Remove proprietary dependencies
43-
run: ./patches/remove_proprietary_dependencies.sh
44-
45-
- name: Setup Flutter
46-
uses: subosito/flutter-action@v2
47-
with:
48-
channel: stable
49-
cache: true
50-
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
51-
52-
- name: Disable Flutter CLI animations
53-
run: flutter config --no-cli-animations
54-
55-
- run: flutter pub get
56-
57-
- name: Build Linux (x86_64)
58-
run: |
59-
flutter build linux \
60-
--dart-define=DIRTY=$DIRTY
61-
env:
62-
DIRTY: ${{ !startsWith(github.ref, 'refs/tags/') }}
63-
64-
- name: Compress Flutter build
65-
id: compress
66-
run: |
67-
buildName=$(grep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart)
68-
archiveName="Saber_v${buildName}_Linux_x86_64.tar.gz"
69-
echo "archiveName=$archiveName" >> $GITHUB_OUTPUT
70-
71-
mkdir -p AppDir
72-
mv build/linux/x64/release/bundle/* AppDir
73-
chmod +x AppDir/saber
74-
75-
install -Dm644 flatpak/com.adilhanney.saber.metainfo.xml -t AppDir/share/metainfo/
76-
install -Dm644 flatpak/com.adilhanney.saber.metainfo.xml -t AppDir/usr/share/metainfo/
77-
78-
install -Dm644 assets/icon/icon.svg AppDir/share/icons/hicolor/scalable/apps/com.adilhanney.saber.svg
79-
install -Dm644 assets/icon/icon.svg AppDir/usr/share/icons/hicolor/scalable/apps/com.adilhanney.saber.svg
80-
81-
install -Dm644 flatpak/com.adilhanney.saber.desktop -t AppDir/share/applications/
82-
83-
tar -C AppDir -cvf $archiveName .
84-
85-
- name: Upload artifact
86-
uses: actions/upload-artifact@v4
87-
with:
88-
name: Saber-Archive-x86_64
89-
path: ${{ steps.compress.outputs.archiveName }}
90-
91-
- name: Upload to GitHub release
92-
uses: svenstaro/upload-release-action@v2
93-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
94-
with:
95-
repo_token: ${{ secrets.GITHUB_TOKEN }}
96-
file: ${{ steps.compress.outputs.archiveName }}
97-
989
build-flutter-app-arm64:
9910
name: Build Flutter app (arm64)
10011
runs-on: ubuntu-latest
@@ -255,66 +166,3 @@ jobs:
255166
with:
256167
repo_token: ${{ secrets.GITHUB_TOKEN }}
257168
file: ${{ steps.compress.outputs.archiveName }}
258-
259-
build-appimage:
260-
name: Build AppImage
261-
needs: build-flutter-app-x86_64
262-
runs-on: ubuntu-latest
263-
permissions:
264-
contents: write
265-
timeout-minutes: 10
266-
steps:
267-
- name: Checkout code
268-
uses: actions/checkout@v4
269-
270-
- name: Install AppImage dependencies
271-
run: |
272-
sudo add-apt-repository universe
273-
sudo apt install libfuse2
274-
275-
- name: Download app archive
276-
uses: actions/download-artifact@v4
277-
with:
278-
name: Saber-Archive-x86_64
279-
280-
- name: Rename app archive
281-
run: |
282-
mv Saber_*.tar.gz Saber-Linux-Portable.tar.gz
283-
284-
- name: Download appimage-builder
285-
working-directory: appimage
286-
run: |
287-
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
288-
chmod +x appimage-builder-x86_64.AppImage
289-
290-
- name: Prepare build files
291-
working-directory: appimage
292-
run: |
293-
mkdir AppDir
294-
tar -xvf ../Saber-Linux-Portable.tar.gz -C AppDir
295-
296-
- name: Set AppImage version
297-
working-directory: appimage
298-
run: |
299-
# replace line with "version: latest" with "version: $buildName"
300-
buildName=$(grep -oP "(?<=buildName = ').*(?=')" ../lib/data/version.dart)
301-
sed -i "s/version: latest/version: ${buildName}/" AppImageBuilder.yml
302-
303-
- name: Build AppImage
304-
working-directory: appimage
305-
run: |
306-
./appimage-builder-x86_64.AppImage --skip-test
307-
308-
- name: Upload artifact
309-
uses: actions/upload-artifact@v4
310-
with:
311-
name: AppImage artifact
312-
path: appimage/Saber-*-x86_64.AppImage*
313-
314-
- name: Upload to GitHub release
315-
uses: svenstaro/upload-release-action@v2
316-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
317-
with:
318-
repo_token: ${{ secrets.GITHUB_TOKEN }}
319-
file: appimage/Saber-*-x86_64.AppImage*
320-
file_glob: true

pubspec.lock

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,11 +1861,10 @@ packages:
18611861
workmanager:
18621862
dependency: "direct main"
18631863
description:
1864-
path: workmanager
1865-
ref: main
1866-
resolved-ref: "4ce065135dc1b91fee918f81596b42a56850391d"
1867-
url: "https://github.com/fluttercommunity/flutter_workmanager"
1868-
source: git
1864+
name: workmanager
1865+
sha256: ed13530cccd28c5c9959ad42d657cd0666274ca74c56dea0ca183ddd527d3a00
1866+
url: "https://pub.dev"
1867+
source: hosted
18691868
version: "0.5.2"
18701869
xdg_directories:
18711870
dependency: transitive

pubspec.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,6 @@ dependency_overrides:
180180
url: https://github.com/ad-angelo/receive_sharing_intent
181181
ref: deec27f3dd36d6c9f51c22d0026baa7b6f0850a3
182182

183-
# https://github.com/fluttercommunity/flutter_workmanager/issues/588
184-
workmanager:
185-
git:
186-
url: https://github.com/fluttercommunity/flutter_workmanager
187-
path: workmanager
188-
ref: main
189-
190183
# For information on the generic Dart part of this file, see the
191184
# following page: https://dart.dev/tools/pub/pubspec
192185

0 commit comments

Comments
 (0)