diff --git a/.github/workflows/aft.yaml b/.github/workflows/aft.yaml index c8f04cdab4b..fcdb1d1cf42 100644 --- a/.github/workflows/aft.yaml +++ b/.github/workflows/aft.yaml @@ -1,4 +1,3 @@ -# Generated with aft. To update, run: `aft generate workflows` name: aft on: push: @@ -6,15 +5,11 @@ on: - main - stable - next + paths: + - 'packages/aft/**/*.dart' pull_request: paths: - 'packages/aft/**/*.dart' - - 'packages/aft/**/*.yaml' - - 'packages/aft/lib/**/*' - - 'packages/aft/test/**/*' - - '.github/workflows/dart_vm.yaml' - - '.github/workflows/dart_native.yaml' - - '.github/workflows/aft.yaml' schedule: - cron: "0 0 * * 0" # Every Sunday at 00:00 defaults: @@ -24,12 +19,29 @@ permissions: read-all jobs: test: - uses: ./.github/workflows/dart_vm.yaml - with: - working-directory: packages/aft - native_test: - if: ${{ github.event_name == 'push' }} - needs: test - uses: ./.github/workflows/dart_native.yaml - with: - working-directory: packages/aft + name: Test + runs-on: ubuntu-latest + steps: + - name: Git Checkout + uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0 + + - name: Git Submodules + run: git submodule update --init + + - name: Setup Dart + uses: dart-lang/setup-dart@196f54580e9eee2797c57e85e289339f85e6779d # main + with: + sdk: stable + + - name: Get Packages + working-directory: packages/aft + run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd /external/libgit2dart; git apply ../libgit2dart.patch ) + dart pub upgrade + sudo apt-get install libgit2-dev + dart run libgit2dart:setup + + - name: Run Tests + working-directory: packages/aft + run: dart test diff --git a/.github/workflows/amplify_authenticator.yaml b/.github/workflows/amplify_authenticator.yaml index 4be8e8d8394..0e43cb03342 100644 --- a/.github/workflows/amplify_authenticator.yaml +++ b/.github/workflows/amplify_authenticator.yaml @@ -15,7 +15,7 @@ on: - '.github/workflows/flutter_vm.yaml' - '.github/workflows/amplify_authenticator.yaml' schedule: - - cron: '0 0 * * 0' # Every Sunday at 00:00 + - cron: "0 0 * * 0" # Every Sunday at 00:00 defaults: run: shell: bash diff --git a/.github/workflows/dart_dart2js.yaml b/.github/workflows/dart_dart2js.yaml index fa8799c400e..523e7df9230 100644 --- a/.github/workflows/dart_dart2js.yaml +++ b/.github/workflows/dart_dart2js.yaml @@ -50,7 +50,10 @@ jobs: sdk: ${{ matrix.sdk }} - name: Setup aft - run: dart pub global activate -spath packages/aft + run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch ) + dart pub global activate -spath packages/aft - name: Setup Firefox if: ${{ matrix.browser == 'firefox' }} diff --git a/.github/workflows/dart_ddc.yaml b/.github/workflows/dart_ddc.yaml index e471e0b6438..1ade4fddccc 100644 --- a/.github/workflows/dart_ddc.yaml +++ b/.github/workflows/dart_ddc.yaml @@ -54,7 +54,10 @@ jobs: sdk: ${{ matrix.sdk }} - name: Setup aft - run: dart pub global activate -spath packages/aft + run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch ) + dart pub global activate -spath packages/aft - name: Setup Firefox if: ${{ matrix.browser == 'firefox' }} diff --git a/.github/workflows/dart_native.yaml b/.github/workflows/dart_native.yaml index 6b1ebd87441..4a4da4c5c42 100644 --- a/.github/workflows/dart_native.yaml +++ b/.github/workflows/dart_native.yaml @@ -51,7 +51,10 @@ jobs: sdk: stable - name: Setup aft - run: dart pub global activate -spath packages/aft + run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch ) + dart pub global activate -spath packages/aft - name: Bootstrap id: bootstrap diff --git a/.github/workflows/dart_vm.yaml b/.github/workflows/dart_vm.yaml index 582ec320ea6..1187d5cba7a 100644 --- a/.github/workflows/dart_vm.yaml +++ b/.github/workflows/dart_vm.yaml @@ -47,7 +47,10 @@ jobs: sdk: ${{ matrix.sdk }} - name: Setup aft - run: dart pub global activate -spath packages/aft + run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch ) + dart pub global activate -spath packages/aft - name: Bootstrap id: bootstrap diff --git a/.github/workflows/smoke_test.yaml b/.github/workflows/smoke_test.yaml index d487fb483f3..0ffc054331d 100644 --- a/.github/workflows/smoke_test.yaml +++ b/.github/workflows/smoke_test.yaml @@ -27,6 +27,9 @@ jobs: - name: Git Checkout uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0 + - name: Git Submodules + run: git submodule update --init + - name: Setup Dart uses: dart-lang/setup-dart@196f54580e9eee2797c57e85e289339f85e6779d # main with: @@ -34,6 +37,8 @@ jobs: - name: Link Packages run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch ) dart pub global activate -spath packages/aft aft link diff --git a/.gitmodules b/.gitmodules index 6e7923f2641..81a2534ca56 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,3 +11,6 @@ path = packages/smithy/goldens/smithy url = https://github.com/awslabs/smithy.git branch = main +[submodule "packages/aft/external/libgit2dart"] + path = packages/aft/external/libgit2dart + url = https://github.com/SkinnyMind/libgit2dart.git diff --git a/aft.yaml b/aft.yaml index 4d4f3dbf34b..ebd3f305f81 100644 --- a/aft.yaml +++ b/aft.yaml @@ -20,6 +20,7 @@ dependencies: # Packages to ignore in all repo operations. ignore: - synthetic_package + - libgit2dart # Strongly connected components which should have version bumps happen # in unison, i.e. a version bump to one package cascades to all. diff --git a/packages/aft/analysis_options.yaml b/packages/aft/analysis_options.yaml index 46eb63b7b02..7d9efef6a15 100644 --- a/packages/aft/analysis_options.yaml +++ b/packages/aft/analysis_options.yaml @@ -5,3 +5,4 @@ analyzer: public_member_api_docs: ignore exclude: - '**/*.g.dart' + - external/ diff --git a/packages/aft/external/libgit2dart b/packages/aft/external/libgit2dart new file mode 160000 index 00000000000..34d492a9b67 --- /dev/null +++ b/packages/aft/external/libgit2dart @@ -0,0 +1 @@ +Subproject commit 34d492a9b6704a5d5bad7ece8970109df0f05752 diff --git a/packages/aft/external/libgit2dart.patch b/packages/aft/external/libgit2dart.patch new file mode 100644 index 00000000000..b9465a2206d --- /dev/null +++ b/packages/aft/external/libgit2dart.patch @@ -0,0 +1,29 @@ +diff --git a/pubspec.yaml b/pubspec.yaml +index 5acda72..2831e58 100644 +--- a/pubspec.yaml ++++ b/pubspec.yaml +@@ -8,7 +8,6 @@ homepage: https://github.com/SkinnyMind/libgit2dart + + environment: + sdk: ">=2.18.0 <3.0.0" +- flutter: ">=3.3.0" + + dependencies: + args: ^2.3.0 +@@ -23,16 +22,6 @@ dev_dependencies: + lints: ^2.0.0 + test: ^1.20.0 + +-flutter: +- plugin: +- platforms: +- linux: +- pluginClass: Libgit2dartPlugin +- macos: +- pluginClass: Libgit2dartPlugin +- windows: +- pluginClass: Libgit2dartPlugin +- + ffigen: + output: "lib/src/bindings/libgit2_bindings.dart" + headers: diff --git a/packages/aft/pubspec.yaml b/packages/aft/pubspec.yaml index b302a733220..51c5c3f39fc 100644 --- a/packages/aft/pubspec.yaml +++ b/packages/aft/pubspec.yaml @@ -27,9 +27,7 @@ dependencies: http: ^0.13.0 json_annotation: ^4.7.0 libgit2dart: - git: - url: https://github.com/SkinnyMind/libgit2dart - ref: d55742d6d7725fa190df0caf3c1cbe60b7b481aa + path: external/libgit2dart markdown: ^5.0.0 meta: ^1.7.0 path: any diff --git a/packages/aft/workflow.yaml b/packages/aft/workflow.yaml new file mode 100644 index 00000000000..fcdb1d1cf42 --- /dev/null +++ b/packages/aft/workflow.yaml @@ -0,0 +1,47 @@ +name: aft +on: + push: + branches: + - main + - stable + - next + paths: + - 'packages/aft/**/*.dart' + pull_request: + paths: + - 'packages/aft/**/*.dart' + schedule: + - cron: "0 0 * * 0" # Every Sunday at 00:00 +defaults: + run: + shell: bash +permissions: read-all + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Git Checkout + uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0 + + - name: Git Submodules + run: git submodule update --init + + - name: Setup Dart + uses: dart-lang/setup-dart@196f54580e9eee2797c57e85e289339f85e6779d # main + with: + sdk: stable + + - name: Get Packages + working-directory: packages/aft + run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd /external/libgit2dart; git apply ../libgit2dart.patch ) + dart pub upgrade + sudo apt-get install libgit2-dev + dart run libgit2dart:setup + + - name: Run Tests + working-directory: packages/aft + run: dart test diff --git a/packages/aws_sdk/smoke_test/workflow.yaml b/packages/aws_sdk/smoke_test/workflow.yaml index d487fb483f3..0ffc054331d 100644 --- a/packages/aws_sdk/smoke_test/workflow.yaml +++ b/packages/aws_sdk/smoke_test/workflow.yaml @@ -27,6 +27,9 @@ jobs: - name: Git Checkout uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0 + - name: Git Submodules + run: git submodule update --init + - name: Setup Dart uses: dart-lang/setup-dart@196f54580e9eee2797c57e85e289339f85e6779d # main with: @@ -34,6 +37,8 @@ jobs: - name: Link Packages run: | + # Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563) + ( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch ) dart pub global activate -spath packages/aft aft link