From f2e49804785d8b6944c54b7af162e7f8ddc9bf5e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 07:05:44 +0000 Subject: [PATCH 1/6] Initial plan From 042702de9c1e4268cd4292a6a05beceed6942938 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 07:08:20 +0000 Subject: [PATCH 2/6] Add Flutter CI/CD pipeline with analyzer and build checks Co-authored-by: AramSemerjyan <18259461+AramSemerjyan@users.noreply.github.com> --- .github/workflows/flutter-ci.yml | 89 ++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .github/workflows/flutter-ci.yml diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml new file mode 100644 index 0000000..17cd93c --- /dev/null +++ b/.github/workflows/flutter-ci.yml @@ -0,0 +1,89 @@ +name: Flutter CI + +on: + push: + branches: [ "main", "master", "develop" ] + pull_request: + branches: [ "main", "master", "develop" ] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.9.2' + channel: 'stable' + cache: true + + - name: Install dependencies + run: flutter pub get + + - name: Verify formatting + run: dart format --output=none --set-exit-if-changed . + + - name: Analyze project + run: flutter analyze --no-fatal-infos + + build: + name: Build + runs-on: ${{ matrix.os }} + needs: analyze + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + include: + - os: ubuntu-latest + build-target: linux + build-path: build/linux/x64/release/bundle + - os: macos-latest + build-target: macos + build-path: build/macos/Build/Products/Release + - os: windows-latest + build-target: windows + build-path: build/windows/x64/runner/Release + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.9.2' + channel: 'stable' + cache: true + + - name: Install Linux dependencies + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update -y + sudo apt-get install -y ninja-build libgtk-3-dev + + - name: Install dependencies + run: flutter pub get + + - name: Enable platform + run: flutter config --enable-${{ matrix.build-target }}-desktop + + - name: Build application + run: flutter build ${{ matrix.build-target }} --release + + - name: Verify build output + shell: bash + run: | + if [ -d "${{ matrix.build-path }}" ]; then + echo "Build successful - output found at ${{ matrix.build-path }}" + ls -la "${{ matrix.build-path }}" || true + else + echo "Build output directory not found at expected path" + exit 1 + fi From 4689682e14ca7ae81044b91cebb65483e3202797 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 07:08:59 +0000 Subject: [PATCH 3/6] Add documentation for CI/CD pipeline Co-authored-by: AramSemerjyan <18259461+AramSemerjyan@users.noreply.github.com> --- .github/workflows/README.md | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 0000000..9d5bb02 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,40 @@ +# GitHub Actions Workflows + +## Flutter CI Pipeline + +The `flutter-ci.yml` workflow automatically runs on every commit and pull request to the main branches (main, master, develop). + +### What it does: + +1. **Analyze Job** (runs on Ubuntu): + - Checks code formatting with `dart format` + - Runs static analysis with `flutter analyze` + - Ensures code quality standards are met + +2. **Build Job** (runs on Linux, macOS, and Windows): + - Builds the application for each platform + - Verifies that the build completes successfully + - Catches build-time errors before merging + +### Running locally: + +Before pushing your changes, you can run these checks locally: + +```bash +# Format your code +dart format . + +# Analyze your code +flutter analyze + +# Build for your platform +flutter build linux --release # on Linux +flutter build macos --release # on macOS +flutter build windows --release # on Windows +``` + +### Troubleshooting: + +- If the format check fails, run `dart format .` to auto-format your code +- If analyze fails, fix the reported issues in your code +- If build fails, check the build logs for specific error messages From f2ed4299f8915cd50398666a9b22a995c7936040 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 07:09:48 +0000 Subject: [PATCH 4/6] Improve error message in build verification step Co-authored-by: AramSemerjyan <18259461+AramSemerjyan@users.noreply.github.com> --- .github/workflows/flutter-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index 17cd93c..452982f 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -84,6 +84,6 @@ jobs: echo "Build successful - output found at ${{ matrix.build-path }}" ls -la "${{ matrix.build-path }}" || true else - echo "Build output directory not found at expected path" + echo "Build output directory not found at expected path: ${{ matrix.build-path }}" exit 1 fi From 8c7e09127a3053579cac5904697c12a96552ac9c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 07:11:05 +0000 Subject: [PATCH 5/6] Add explicit permissions to workflow for security Co-authored-by: AramSemerjyan <18259461+AramSemerjyan@users.noreply.github.com> --- .github/workflows/flutter-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index 452982f..17ca820 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ "main", "master", "develop" ] +permissions: + contents: read + jobs: analyze: name: Analyze From 870faef653b33954d00259e72eb69bc4d43effa3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 09:17:08 +0000 Subject: [PATCH 6/6] Comment out Linux/Windows builds - only macOS supported currently Co-authored-by: AramSemerjyan <18259461+AramSemerjyan@users.noreply.github.com> --- .github/workflows/README.md | 12 ++++++------ .github/workflows/flutter-ci.yml | 27 +++++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 9d5bb02..1617034 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -11,11 +11,13 @@ The `flutter-ci.yml` workflow automatically runs on every commit and pull reques - Runs static analysis with `flutter analyze` - Ensures code quality standards are met -2. **Build Job** (runs on Linux, macOS, and Windows): - - Builds the application for each platform +2. **Build Job** (runs on macOS): + - Builds the application for macOS - Verifies that the build completes successfully - Catches build-time errors before merging +> **Note:** Linux and Windows builds are currently commented out as the application doesn't support these platforms yet. They can be enabled in the future by uncommenting the relevant sections in the workflow file. + ### Running locally: Before pushing your changes, you can run these checks locally: @@ -27,10 +29,8 @@ dart format . # Analyze your code flutter analyze -# Build for your platform -flutter build linux --release # on Linux -flutter build macos --release # on macOS -flutter build windows --release # on Windows +# Build for macOS +flutter build macos --release ``` ### Troubleshooting: diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index 17ca820..0e124b3 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -42,17 +42,19 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + # Linux and Windows builds commented out - not supported yet + # os: [ubuntu-latest, macos-latest, windows-latest] + os: [macos-latest] include: - - os: ubuntu-latest - build-target: linux - build-path: build/linux/x64/release/bundle + # - os: ubuntu-latest + # build-target: linux + # build-path: build/linux/x64/release/bundle - os: macos-latest build-target: macos build-path: build/macos/Build/Products/Release - - os: windows-latest - build-target: windows - build-path: build/windows/x64/runner/Release + # - os: windows-latest + # build-target: windows + # build-path: build/windows/x64/runner/Release steps: - name: Checkout code @@ -65,11 +67,12 @@ jobs: channel: 'stable' cache: true - - name: Install Linux dependencies - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build libgtk-3-dev + # Linux dependencies - not needed yet + # - name: Install Linux dependencies + # if: matrix.os == 'ubuntu-latest' + # run: | + # sudo apt-get update -y + # sudo apt-get install -y ninja-build libgtk-3-dev - name: Install dependencies run: flutter pub get