diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml deleted file mode 100644 index 43ac927a..00000000 --- a/.github/workflows/dart.yml +++ /dev/null @@ -1,503 +0,0 @@ -# Created with package:mono_repo v6.6.3 -name: Dart CI -on: - push: - branches: - - main - - 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: "analyze_and_format; Dart 3.4.0; PKG: web; `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:3.4.0;packages:web;commands:analyze" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:web - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.4.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - job_003: - name: "analyze_and_format; Dart 3.4.0; PKG: web; `dart format --output=none --set-exit-if-changed .`" - 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.4.0;packages:web;commands:format" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:web - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.4.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - job_004: - name: "analyze_and_format; Dart dev; PKGS: web, web_generator; `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:web-web_generator;commands:analyze" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web-web_generator - 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: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - - id: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - job_005: - name: "analyze_and_format; Dart dev; PKGS: web, web_generator; `dart format --output=none --set-exit-if-changed .`" - 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:web-web_generator;commands:format" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web-web_generator - 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: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - - id: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - job_006: - name: "unit_test; Dart 3.4.0; PKG: web; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" - 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.4.0;packages:web;commands:test_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:web - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.4.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" - run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_007: - name: "unit_test; Dart 3.4.0; PKG: web; `dart test --test-randomize-ordering-seed=random -p chrome`" - 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.4.0;packages:web;commands:test_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:web - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.4.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart test --test-randomize-ordering-seed=random -p chrome" - run: "dart test --test-randomize-ordering-seed=random -p chrome" - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_008: - name: "unit_test; Dart dev; PKGS: web, web_generator; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" - 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:web-web_generator;commands:test_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web-web_generator - 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: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" - run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - - id: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" - run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_009: - name: "unit_test; Dart dev; PKGS: web, web_generator; `dart test --test-randomize-ordering-seed=random -p chrome`" - 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:web-web_generator;commands:test_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web-web_generator - 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: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart test --test-randomize-ordering-seed=random -p chrome" - run: "dart test --test-randomize-ordering-seed=random -p chrome" - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - - id: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart test --test-randomize-ordering-seed=random -p chrome" - run: "dart test --test-randomize-ordering-seed=random -p chrome" - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_010: - name: "unit_test; Dart dev; PKG: web_generator; `dart test --test-randomize-ordering-seed=random`" - 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:web_generator;commands:test_2" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web_generator - 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: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart test --test-randomize-ordering-seed=random" - run: "dart test --test-randomize-ordering-seed=random" - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_011: - name: "generate_and_analyze; Dart dev; PKG: web_generator; `dart pub -C ../web get && dart bin/update_idl_bindings.dart && dart analyze --fatal-infos ../web`" - 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:web_generator;commands:command_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web_generator - 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: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart pub -C ../web get && dart bin/update_idl_bindings.dart && dart analyze --fatal-infos ../web" - run: "dart pub -C ../web get && dart bin/update_idl_bindings.dart && dart analyze --fatal-infos ../web" - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - - job_009 - - job_010 - job_012: - name: "generate_all_and_analyze; Dart dev; PKG: web_generator; `dart pub -C ../web get && dart bin/update_idl_bindings.dart --generate-all && dart analyze --fatal-infos ../web`" - 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:web_generator;commands:command_2" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:web_generator - 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: web_generator_pub_upgrade - name: web_generator; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web_generator - - name: "web_generator; dart pub -C ../web get && dart bin/update_idl_bindings.dart --generate-all && dart analyze --fatal-infos ../web" - run: "dart pub -C ../web get && dart bin/update_idl_bindings.dart --generate-all && dart analyze --fatal-infos ../web" - if: "always() && steps.web_generator_pub_upgrade.conclusion == 'success'" - working-directory: web_generator - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - - job_009 - - job_010 - - job_011 - job_013: - name: "dart_fixes; Dart main; PKG: web; `dart fix --compare-to-golden test_fixes`" - 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:main;packages:web;commands:command_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:main;packages:web - os:ubuntu-latest;pub-cache-hosted;sdk:main - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: main - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: web_pub_upgrade - name: web; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: web - - name: "web; dart fix --compare-to-golden test_fixes" - run: dart fix --compare-to-golden test_fixes - if: "always() && steps.web_pub_upgrade.conclusion == 'success'" - working-directory: web - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - - job_009 - - job_010 - - job_011 - - job_012 diff --git a/.github/workflows/web.yaml b/.github/workflows/web.yaml new file mode 100644 index 00000000..391a1cff --- /dev/null +++ b/.github/workflows/web.yaml @@ -0,0 +1,44 @@ +name: package:web +permissions: read-all + +on: + # Run CI on pushes to the main branch and on PRs. + push: + branches: [ main ] + paths: + - '.github/workflows/web.yaml' + - 'web/**' + pull_request: + paths: + - '.github/workflows/web.yaml' + - 'web/**' + schedule: + - cron: "0 0 * * 0" + +defaults: + run: + working-directory: web/ + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [3.4, beta, dev] + test_config: ['-p chrome', '-p chrome -c dart2wasm'] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{ matrix.sdk }} + + - run: dart pub get + - run: dart format --output=none --set-exit-if-changed . + if: ${{ matrix.sdk == 'dev' }} + - run: dart analyze --fatal-infos + - run: dart test ${{ matrix.test_config }} + + # Validate the 'dart fix' metadata. + - run: dart fix --compare-to-golden test_fixes diff --git a/.github/workflows/web_generator.yaml b/.github/workflows/web_generator.yaml new file mode 100644 index 00000000..398cc5b2 --- /dev/null +++ b/.github/workflows/web_generator.yaml @@ -0,0 +1,66 @@ +name: package:web_generator +permissions: read-all + +on: + # Run CI on pushes to the main branch and on PRs. + push: + branches: [ main ] + paths: + - '.github/workflows/web_generator.yaml' + - 'web_generator/**' + pull_request: + paths: + - '.github/workflows/web_generator.yaml' + - 'web_generator/**' + schedule: + - cron: "0 0 * * 0" + +defaults: + run: + working-directory: web_generator/ + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev] + test_config: ['', '-p chrome', '-p chrome -c dart2wasm'] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{ matrix.sdk }} + + - run: dart pub get + - run: dart format --output=none --set-exit-if-changed . + - run: dart analyze --fatal-infos + - run: dart test ${{ matrix.test_config }} + + # test bin/update_idl_bindings.dart + test_generate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + + - run: dart pub get + - run: dart pub -C ../web get + - run: dart bin/update_idl_bindings.dart + - run: dart analyze --fatal-infos ../web + + # test bin/update_idl_bindings.dart --generate-all + test_generate_all: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + + - run: dart pub get + - run: dart pub -C ../web get + - run: dart bin/update_idl_bindings.dart --generate-all + - run: dart analyze --fatal-infos ../web diff --git a/mono_repo.yaml b/mono_repo.yaml deleted file mode 100644 index 3b7023b5..00000000 --- a/mono_repo.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# See https://github.com/google/mono_repo.dart for details on this file -self_validate: analyze_and_format - -github: - cron: "0 0 * * 0" - -merge_stages: - - analyze_and_format - - unit_test - - dart_fixes - - generate_and_analyze - - generate_all_and_analyze diff --git a/tool/ci.sh b/tool/ci.sh deleted file mode 100755 index 1122df9b..00000000 --- a/tool/ci.sh +++ /dev/null @@ -1,131 +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) - echo 'dart analyze --fatal-infos .' - dart analyze --fatal-infos . || EXIT_CODE=$? - ;; - command_0) - echo 'dart fix --compare-to-golden test_fixes' - dart fix --compare-to-golden test_fixes || EXIT_CODE=$? - ;; - command_1) - echo 'dart pub -C ../web get && dart bin/update_idl_bindings.dart && dart analyze --fatal-infos ../web' - dart pub -C ../web get && dart bin/update_idl_bindings.dart && dart analyze --fatal-infos ../web || EXIT_CODE=$? - ;; - command_2) - echo 'dart pub -C ../web get && dart bin/update_idl_bindings.dart --generate-all && dart analyze --fatal-infos ../web' - dart pub -C ../web get && dart bin/update_idl_bindings.dart --generate-all && dart analyze --fatal-infos ../web || EXIT_CODE=$? - ;; - format) - echo 'dart format --output=none --set-exit-if-changed .' - dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? - ;; - test_0) - echo 'dart test --test-randomize-ordering-seed=random -p chrome' - dart test --test-randomize-ordering-seed=random -p chrome || EXIT_CODE=$? - ;; - test_1) - echo 'dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm' - dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm || EXIT_CODE=$? - ;; - test_2) - echo 'dart test --test-randomize-ordering-seed=random' - dart test --test-randomize-ordering-seed=random || 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 diff --git a/web/mono_pkg.yaml b/web/mono_pkg.yaml deleted file mode 100644 index 18963f16..00000000 --- a/web/mono_pkg.yaml +++ /dev/null @@ -1,14 +0,0 @@ -sdk: - - dev - - pubspec - -stages: -- analyze_and_format: - - analyze: --fatal-infos . - - format: -- unit_test: - - test: --test-randomize-ordering-seed=random -p chrome - - test: --test-randomize-ordering-seed=random -p chrome -c dart2wasm -- dart_fixes: - - command: dart fix --compare-to-golden test_fixes - sdk: main diff --git a/web_generator/mono_pkg.yaml b/web_generator/mono_pkg.yaml deleted file mode 100644 index 7aaf1789..00000000 --- a/web_generator/mono_pkg.yaml +++ /dev/null @@ -1,21 +0,0 @@ -sdk: -- dev - -stages: -- analyze_and_format: - - analyze: --fatal-infos . - - format: -- unit_test: - - test: --test-randomize-ordering-seed=random -p chrome - - test: --test-randomize-ordering-seed=random -p chrome -c dart2wasm - - test: --test-randomize-ordering-seed=random -- generate_and_analyze: - - command: - - dart pub -C ../web get - - dart bin/update_idl_bindings.dart - - dart analyze --fatal-infos ../web -- generate_all_and_analyze: - - command: - - dart pub -C ../web get - - dart bin/update_idl_bindings.dart --generate-all - - dart analyze --fatal-infos ../web