Skip to content

Commit

Permalink
chore(ci): create CI
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrFLEURY committed Mar 3, 2024
1 parent dca67b0 commit fcfa22b
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 8 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI
on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Get dependencies
run: |
flutter pub get
flutter analyze
dart format --set-exit-if-changed .
flutter test
build-android:
needs: analyze
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Build Android appbundle
run: flutter build appbundle --debug
build-ios:
needs: analyze
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Build ios
run: flutter build ios --debug --no-codesign
build-web:
needs: analyze
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Build web
run: flutter build web
build-linux:
needs: analyze
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Linux prerequisites
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Build linux
run: flutter build linux --debug
build-windows:
needs: analyze
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Build windows
run: flutter build windows --debug
build-macos:
needs: analyze
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Build macos
run: flutter build macos --debug
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ app.*.map.json
/android/app/profile
/android/app/release

assets/books/
assets/books/*.epub
Empty file added assets/books/.gitkeep
Empty file.
2 changes: 0 additions & 2 deletions lib/views/linear_pogress_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class LinearProgressController {
LinearProgressController();

void Function(double) onProgress = (double progress) {};

}

class LinearProgressListener extends StatefulWidget {
Expand All @@ -15,7 +14,6 @@ class LinearProgressListener extends StatefulWidget {

final LinearProgressController controller;


@override
State<LinearProgressListener> createState() => _LinearProgressListenerState();
}
Expand Down
6 changes: 3 additions & 3 deletions macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -543,7 +543,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -593,7 +593,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
2 changes: 1 addition & 1 deletion macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
<string>$(PRODUCT_COPYRIGHT)</string>
<key>NSMainNibFile</key>
Expand Down
2 changes: 1 addition & 1 deletion test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
//
//
});
}

0 comments on commit fcfa22b

Please sign in to comment.