diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml new file mode 100644 index 000000000..05cb8279a --- /dev/null +++ b/.github/workflows/benchmark.yaml @@ -0,0 +1,46 @@ +name: benchmarks +permissions: read-all + +on: + pull_request: + branches: + paths: + - '.github/workflows/benchmarks.yaml' + - 'benchmarks/**' + - 'tool/setup.sh' + push: + branches: [ master ] + paths: + - '.github/workflows/benchmarks.yaml' + - 'benchmarks/**' + - 'tool/setup.sh' + schedule: + - cron: '0 0 * * 0' # weekly + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: benchmarks + strategy: + matrix: + sdk: dev + + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{matrix.sdk}} + + - run: dart pub get + + - run: dart analyze --fatal-infos + + - run: dart format --output=none --set-exit-if-changed . + + - run: ./../tool/setup.sh + + - run: ./tool/compile_protos.sh + + - run: dart tool/compile_benchmarks.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml deleted file mode 100644 index b6fe5a8ab..000000000 --- a/.github/workflows/dart.yml +++ /dev/null @@ -1,475 +0,0 @@ -# Created with package:mono_repo v6.6.3 -name: Dart CI -on: - push: - branches: master - pull_request: - schedule: - - cron: "0 0 * * 0" -defaults: - run: - shell: bash -env: - PUB_ENVIRONMENT: bot.github -permissions: read-all - -jobs: - job_001: - name: mono_repo self validate - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: stable - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.3 - - name: mono_repo self validate - run: dart pub global run mono_repo generate --validate - job_002: - name: "format_analyze; linux; Dart 3.7.0; PKG: protobuf; `dart analyze lib`, `dart analyze test`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0;packages:protobuf;commands:analyze_1-analyze_2" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0;packages:protobuf - os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.7.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart analyze lib - run: dart analyze lib - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart analyze test - run: dart analyze test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - job_003: - name: "format_analyze; linux; Dart dev; PKG: benchmarks; `dart format --output=none --set-exit-if-changed .`, `./../tool/setup.sh`, `./tool/compile_protos.sh`, `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks;commands:format_0-command_0-command_1-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: benchmarks_pub_upgrade - name: benchmarks; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: benchmarks - - name: "benchmarks; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.benchmarks_pub_upgrade.conclusion == 'success'" - working-directory: benchmarks - - name: benchmarks; ./../tool/setup.sh - run: ./../tool/setup.sh - if: "always() && steps.benchmarks_pub_upgrade.conclusion == 'success'" - working-directory: benchmarks - - name: benchmarks; ./tool/compile_protos.sh - run: ./tool/compile_protos.sh - if: "always() && steps.benchmarks_pub_upgrade.conclusion == 'success'" - working-directory: benchmarks - - name: "benchmarks; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.benchmarks_pub_upgrade.conclusion == 'success'" - working-directory: benchmarks - job_004: - name: "format_analyze; linux; Dart dev; PKG: protobuf; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:format_0-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: "protobuf; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - - name: "protobuf; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - job_005: - name: "format_analyze; linux; Dart dev; PKG: protoc_plugin; `dart format --output=none --set-exit-if-changed lib`, `./../tool/setup.sh`, `make protos`, `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin;commands:format_1-command_0-command_2-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protoc_plugin_pub_upgrade - name: protoc_plugin; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protoc_plugin - - name: "protoc_plugin; dart format --output=none --set-exit-if-changed lib" - run: "dart format --output=none --set-exit-if-changed lib" - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; ./../tool/setup.sh - run: ./../tool/setup.sh - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; make protos - run: make protos - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: "protoc_plugin; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - job_006: - name: "run_tests; linux; Dart 3.7.0; PKG: protobuf; `dart test`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0;packages:protobuf;commands:test" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0;packages:protobuf - os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.7.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart test - run: dart test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_007: - name: "run_tests; linux; Dart 3.7.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0;packages:protoc_plugin;commands:command_0-command_2-test" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0;packages:protoc_plugin - os:ubuntu-latest;pub-cache-hosted;sdk:3.7.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.7.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protoc_plugin_pub_upgrade - name: protoc_plugin; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; ./../tool/setup.sh - run: ./../tool/setup.sh - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; make protos - run: make protos - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; dart test - run: dart test - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_008: - name: "run_tests; linux; Dart dev; PKG: protobuf; `dart test`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:test" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart test - run: dart test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_009: - name: "run_tests; linux; Dart dev; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin;commands:command_0-command_2-test" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin - os:ubuntu-latest;pub-cache-hosted;sdk:dev - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protoc_plugin_pub_upgrade - name: protoc_plugin; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; ./../tool/setup.sh - run: ./../tool/setup.sh - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; make protos - run: make protos - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - - name: protoc_plugin; dart test - run: dart test - if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'" - working-directory: protoc_plugin - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_010: - name: "run_tests; osx; Dart 3.7.0; PKG: protobuf; `dart test`" - runs-on: macos-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:macos-latest;pub-cache-hosted;sdk:3.7.0;packages:protobuf;commands:test" - restore-keys: | - os:macos-latest;pub-cache-hosted;sdk:3.7.0;packages:protobuf - os:macos-latest;pub-cache-hosted;sdk:3.7.0 - os:macos-latest;pub-cache-hosted - os:macos-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.7.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart test - run: dart test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_011: - name: "run_tests; osx; Dart dev; PKG: protobuf; `dart test`" - runs-on: macos-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: "~/.pub-cache/hosted" - key: "os:macos-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:test" - restore-keys: | - os:macos-latest;pub-cache-hosted;sdk:dev;packages:protobuf - os:macos-latest;pub-cache-hosted;sdk:dev - os:macos-latest;pub-cache-hosted - os:macos-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart test - run: dart test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_012: - name: "run_tests; windows; Dart 3.7.0; PKG: protobuf; `dart test`" - runs-on: windows-latest - steps: - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.7.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart test - run: dart test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_013: - name: "run_tests; windows; Dart dev; PKG: protobuf; `dart test`" - runs-on: windows-latest - steps: - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: dev - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: protobuf_pub_upgrade - name: protobuf; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: protobuf - - name: protobuf; dart test - run: dart test - if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" - working-directory: protobuf - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 diff --git a/.github/workflows/protobuf.yaml b/.github/workflows/protobuf.yaml new file mode 100644 index 000000000..70ff90713 --- /dev/null +++ b/.github/workflows/protobuf.yaml @@ -0,0 +1,46 @@ +name: protobuf +permissions: read-all + +on: + pull_request: + branches: + paths: + - '.github/workflows/protobuf.yaml' + - 'protobuf/**' + push: + branches: [ master ] + paths: + - '.github/workflows/protobuf.yaml' + - 'protobuf/**' + schedule: + - cron: '0 0 * * 0' # weekly + +jobs: + validate-protobuf: + defaults: + run: + working-directory: protobuf + strategy: + matrix: + sdk: [stable, dev] + os: [ubuntu-latest, macos-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{matrix.sdk}} + + - run: dart pub get + + - run: dart analyze --fatal-infos + + - run: dart format --output=none --set-exit-if-changed . + + - run: dart test + + - run: dart test -p chrome -c dart2js + + - run: dart test -p chrome -c dart2wasm diff --git a/.github/workflows/protoc_plugin.yaml b/.github/workflows/protoc_plugin.yaml new file mode 100644 index 000000000..4d561c906 --- /dev/null +++ b/.github/workflows/protoc_plugin.yaml @@ -0,0 +1,45 @@ +name: protoc_plugin +permissions: read-all + +on: + pull_request: + branches: + paths: + - '.github/workflows/protoc_plugin.yaml' + - 'protoc_plugin/**' + - 'tool/setup.sh' + push: + branches: [ master ] + paths: + - '.github/workflows/protoc_plugin.yaml' + - 'protoc_plugin/**' + - 'tool/setup.sh' + schedule: + - cron: '0 0 * * 0' # weekly + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: protoc_plugin + strategy: + matrix: + sdk: [stable, dev] + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{matrix.sdk}} + + - run: dart pub get + + - run: ./../tool/setup.sh + + - run: make protos + + - run: dart analyze --fatal-infos + + - run: dart format --output=none --set-exit-if-changed lib + + - run: dart test diff --git a/benchmarks/mono_pkg.yaml b/benchmarks/mono_pkg.yaml deleted file mode 100644 index df3f45473..000000000 --- a/benchmarks/mono_pkg.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# See https://github.com/dart-lang/mono_repo for details - -stages: - - format_analyze: - - group: - - format - - command: ./../tool/setup.sh - - command: ./tool/compile_protos.sh - - analyze: --fatal-infos - sdk: dev diff --git a/mono_repo.yaml b/mono_repo.yaml deleted file mode 100644 index 565f3074d..000000000 --- a/mono_repo.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# See https://github.com/google/mono_repo.dart for details on this file -self_validate: format_analyze - -github: - on: - # Run CI on pushes to the master branch, and on PRs against master. - push: - branches: master - pull_request: - schedule: - - cron: "0 0 * * 0" - -merge_stages: -- format_analyze -- run_tests diff --git a/protobuf/mono_pkg.yaml b/protobuf/mono_pkg.yaml deleted file mode 100644 index 4d9ca7b6c..000000000 --- a/protobuf/mono_pkg.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# See https://github.com/dart-lang/mono_repo for details - -stages: - - format_analyze: - - group: - - format - - analyze: --fatal-infos - sdk: [dev] - - group: - - analyze: lib - - analyze: test - sdk: [pubspec] - - run_tests: - - group: [test] - sdk: [pubspec, dev] - os: [linux, osx, windows] diff --git a/protoc_plugin/mono_pkg.yaml b/protoc_plugin/mono_pkg.yaml deleted file mode 100644 index 01f1e8980..000000000 --- a/protoc_plugin/mono_pkg.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# See https://github.com/dart-lang/mono_repo for details -stages: - - format_analyze: - - group: - - format: --output=none --set-exit-if-changed lib - - command: ./../tool/setup.sh - - command: make protos - - analyze: --fatal-infos - sdk: [dev] - - run_tests: - - group: - - command: ./../tool/setup.sh - - command: make protos - - test - sdk: [pubspec, dev] diff --git a/tool/ci.sh b/tool/ci.sh deleted file mode 100755 index 1b123cce0..000000000 --- a/tool/ci.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/bash -# Created with package:mono_repo v6.6.3 - -# Support built in commands on windows out of the box. - -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter pub" is called instead of "dart pub". -# This assumes that the Flutter SDK has been installed in a previous step. -function pub() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter pub "$@" - else - command dart pub "$@" - fi -} - -function format() { - command dart format "$@" -} - -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter analyze" is called instead of "dart analyze". -# This assumes that the Flutter SDK has been installed in a previous step. -function analyze() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter analyze "$@" - else - command dart analyze "$@" - fi -} - -if [[ -z ${PKGS} ]]; then - echo -e '\033[31mPKGS environment variable must be set! - TERMINATING JOB\033[0m' - exit 64 -fi - -if [[ "$#" == "0" ]]; then - echo -e '\033[31mAt least one task argument must be provided! - TERMINATING JOB\033[0m' - exit 64 -fi - -SUCCESS_COUNT=0 -declare -a FAILURES - -for PKG in ${PKGS}; do - echo -e "\033[1mPKG: ${PKG}\033[22m" - EXIT_CODE=0 - pushd "${PKG}" >/dev/null || EXIT_CODE=$? - - if [[ ${EXIT_CODE} -ne 0 ]]; then - echo -e "\033[31mPKG: '${PKG}' does not exist - TERMINATING JOB\033[0m" - exit 64 - fi - - dart pub upgrade || EXIT_CODE=$? - - if [[ ${EXIT_CODE} -ne 0 ]]; then - echo -e "\033[31mPKG: ${PKG}; 'dart pub upgrade' - FAILED (${EXIT_CODE})\033[0m" - FAILURES+=("${PKG}; 'dart pub upgrade'") - else - for TASK in "$@"; do - EXIT_CODE=0 - echo - echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m" - case ${TASK} in - analyze_0) - echo 'dart analyze --fatal-infos' - dart analyze --fatal-infos || EXIT_CODE=$? - ;; - analyze_1) - echo 'dart analyze lib' - dart analyze lib || EXIT_CODE=$? - ;; - analyze_2) - echo 'dart analyze test' - dart analyze test || EXIT_CODE=$? - ;; - command_0) - echo './../tool/setup.sh' - ./../tool/setup.sh || EXIT_CODE=$? - ;; - command_1) - echo './tool/compile_protos.sh' - ./tool/compile_protos.sh || EXIT_CODE=$? - ;; - command_2) - echo 'make protos' - make protos || EXIT_CODE=$? - ;; - format_0) - echo 'dart format --output=none --set-exit-if-changed .' - dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? - ;; - format_1) - echo 'dart format --output=none --set-exit-if-changed lib' - dart format --output=none --set-exit-if-changed lib || EXIT_CODE=$? - ;; - test) - echo 'dart test' - dart test || EXIT_CODE=$? - ;; - *) - echo -e "\033[31mUnknown TASK '${TASK}' - TERMINATING JOB\033[0m" - exit 64 - ;; - esac - - if [[ ${EXIT_CODE} -ne 0 ]]; then - echo -e "\033[31mPKG: ${PKG}; TASK: ${TASK} - FAILED (${EXIT_CODE})\033[0m" - FAILURES+=("${PKG}; TASK: ${TASK}") - else - echo -e "\033[32mPKG: ${PKG}; TASK: ${TASK} - SUCCEEDED\033[0m" - SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) - fi - - done - fi - - echo - echo -e "\033[32mSUCCESS COUNT: ${SUCCESS_COUNT}\033[0m" - - if [ ${#FAILURES[@]} -ne 0 ]; then - echo -e "\033[31mFAILURES: ${#FAILURES[@]}\033[0m" - for i in "${FAILURES[@]}"; do - echo -e "\033[31m $i\033[0m" - done - fi - - popd >/dev/null || exit 70 - echo -done - -if [ ${#FAILURES[@]} -ne 0 ]; then - exit 1 -fi