From c30b1b2464eec48eba49a8a66b82d649988e7df5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Oct 2025 21:10:39 +0000 Subject: [PATCH] fix v2 github actions --- .github/workflows/release.yml | 6 +- .github/workflows/test.yml | 8 +- .github/workflows/torrent-engine.yml | 123 --------------------------- 3 files changed, 7 insertions(+), 130 deletions(-) delete mode 100644 .github/workflows/torrent-engine.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f55765..abe6c07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true @@ -62,7 +62,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true @@ -95,7 +95,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2cb094e..288e611 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true @@ -45,7 +45,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true @@ -78,7 +78,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true @@ -118,7 +118,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.24.0' + flutter-version: '3.35.5' channel: 'stable' cache: true diff --git a/.github/workflows/torrent-engine.yml b/.github/workflows/torrent-engine.yml deleted file mode 100644 index b55c747..0000000 --- a/.github/workflows/torrent-engine.yml +++ /dev/null @@ -1,123 +0,0 @@ -name: Build Torrent Engine - -on: - push: - branches: - - main - - dev - paths: - - 'android/torrentengine/**' - - '.github/workflows/torrent-engine.yml' - pull_request: - branches: - - main - - dev - paths: - - 'android/torrentengine/**' - -jobs: - build-torrent-engine: - name: Build Torrent Engine AAR - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '17' - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: Cache Gradle packages - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Create local.properties - run: | - echo "sdk.dir=$ANDROID_HOME" > android/local.properties - - - name: Build Torrent Engine - run: | - cd android - chmod +x gradlew - ./gradlew :torrentengine:assembleRelease --no-daemon --stacktrace - - - name: Get AAR info - id: aar_info - run: | - AAR_FILE=$(find android/torrentengine/build/outputs/aar -name "*.aar" | head -n 1) - AAR_SIZE=$(du -h "$AAR_FILE" | cut -f1) - AAR_NAME=$(basename "$AAR_FILE") - - echo "file=$AAR_FILE" >> $GITHUB_OUTPUT - echo "size=$AAR_SIZE" >> $GITHUB_OUTPUT - echo "name=$AAR_NAME" >> $GITHUB_OUTPUT - - - name: Upload Torrent Engine AAR - uses: actions/upload-artifact@v4 - with: - name: torrent-engine-aar - path: android/torrentengine/build/outputs/aar/*.aar - retention-days: 30 - - - name: Summary - run: | - echo "## Torrent Engine Built Successfully!" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**AAR File:** \`${{ steps.aar_info.outputs.name }}\`" >> $GITHUB_STEP_SUMMARY - echo "**Size:** ${{ steps.aar_info.outputs.size }}" >> $GITHUB_STEP_SUMMARY - echo "**Path:** \`android/torrentengine/build/outputs/aar/\`" >> $GITHUB_STEP_SUMMARY - - test-torrent-engine: - name: Test Torrent Engine - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '17' - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: Cache Gradle packages - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Create local.properties - run: | - echo "sdk.dir=$ANDROID_HOME" > android/local.properties - - - name: Run Unit Tests - run: | - cd android - chmod +x gradlew - ./gradlew :torrentengine:test --no-daemon - - - name: Upload Test Results - uses: actions/upload-artifact@v4 - with: - name: torrent-engine-test-results - path: android/torrentengine/build/test-results/ - retention-days: 7 - if: always() \ No newline at end of file