Skip to content

Commit

Permalink
Fix CI stages (google#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Jun 8, 2021
1 parent ea28b9c commit 77575f7
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 89 deletions.
167 changes: 81 additions & 86 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
job_001:
name: "analyze; linux; Dart 2.10.5; PKG: protobuf; `dart analyze lib`, `dart analyze test`"
name: "format_analyze; linux; Dart 2.10.5; PKG: protobuf; `dart analyze lib`, `dart analyze test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
working-directory: protobuf
run: dart analyze test
job_002:
name: "analyze; linux; Dart 2.10.5; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart analyze`"
name: "format_analyze; linux; Dart 2.10.5; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart analyze`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
Expand Down Expand Up @@ -87,7 +87,68 @@ jobs:
working-directory: protoc_plugin
run: dart analyze
job_003:
name: "analyze; linux; Dart dev; PKG: protobuf; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos lib`, `dart analyze --fatal-infos test`"
name: "format_analyze; linux; Dart dev; PKGS: api_benchmark, query_benchmark; `./../tool/setup.sh`, `./compile_protos.sh`, `dart format --output=none --set-exit-if-changed .`, `dart analyze`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/[email protected]
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:api_benchmark-query_benchmark;commands:command_0-command_1-dartfmt-dartanalyzer_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:api_benchmark-query_benchmark
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/[email protected]
with:
sdk: dev
- id: checkout
uses: actions/[email protected]
- id: api_benchmark_pub_upgrade
name: api_benchmark; pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: api_benchmark
run: pub upgrade
- name: api_benchmark; ./../tool/setup.sh
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: ./../tool/setup.sh
- name: api_benchmark; ./compile_protos.sh
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: ./compile_protos.sh
- name: "api_benchmark; dart format --output=none --set-exit-if-changed ."
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: "dart format --output=none --set-exit-if-changed ."
- name: api_benchmark; dart analyze
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: dart analyze
- id: query_benchmark_pub_upgrade
name: query_benchmark; pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: query_benchmark
run: pub upgrade
- name: query_benchmark; ./../tool/setup.sh
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: ./../tool/setup.sh
- name: query_benchmark; ./compile_protos.sh
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: ./compile_protos.sh
- name: "query_benchmark; dart format --output=none --set-exit-if-changed ."
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: "dart format --output=none --set-exit-if-changed ."
- name: query_benchmark; dart analyze
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: dart analyze
job_004:
name: "format_analyze; linux; Dart dev; PKG: protobuf; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos lib`, `dart analyze --fatal-infos test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
Expand Down Expand Up @@ -122,8 +183,8 @@ jobs:
if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'"
working-directory: protobuf
run: dart analyze --fatal-infos test
job_004:
name: "analyze; linux; Dart dev; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos`"
job_005:
name: "format_analyze; linux; Dart dev; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
Expand Down Expand Up @@ -162,7 +223,7 @@ jobs:
if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'"
working-directory: protoc_plugin
run: dart analyze --fatal-infos
job_005:
job_006:
name: "run_tests; linux; Dart 2.10.5; PKG: protobuf; `dart test`"
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -195,7 +256,8 @@ jobs:
- job_002
- job_003
- job_004
job_006:
- job_005
job_007:
name: "run_tests; linux; Dart 2.10.5; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`"
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -236,7 +298,8 @@ jobs:
- job_002
- job_003
- job_004
job_007:
- job_005
job_008:
name: "run_tests; linux; Dart dev; PKG: protobuf; `dart test`"
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -269,7 +332,8 @@ jobs:
- job_002
- job_003
- job_004
job_008:
- 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:
Expand Down Expand Up @@ -310,7 +374,8 @@ jobs:
- job_002
- job_003
- job_004
job_009:
- job_005
job_010:
name: "run_tests; osx; Dart 2.10.5; PKG: protobuf; `dart test`"
runs-on: macos-latest
steps:
Expand Down Expand Up @@ -343,7 +408,8 @@ jobs:
- job_002
- job_003
- job_004
job_010:
- job_005
job_011:
name: "run_tests; osx; Dart dev; PKG: protobuf; `dart test`"
runs-on: macos-latest
steps:
Expand Down Expand Up @@ -376,7 +442,8 @@ jobs:
- job_002
- job_003
- job_004
job_011:
- job_005
job_012:
name: "run_tests; windows; Dart 2.10.5; PKG: protobuf; `dart test`"
runs-on: windows-latest
steps:
Expand All @@ -399,7 +466,8 @@ jobs:
- job_002
- job_003
- job_004
job_012:
- job_005
job_013:
name: "run_tests; windows; Dart dev; PKG: protobuf; `dart test`"
runs-on: windows-latest
steps:
Expand All @@ -422,77 +490,4 @@ jobs:
- job_002
- job_003
- job_004
job_013:
name: "format_analyze; linux; Dart dev; PKGS: api_benchmark, query_benchmark; `./../tool/setup.sh`, `./compile_protos.sh`, `dart format --output=none --set-exit-if-changed .`, `dart analyze`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/[email protected]
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:api_benchmark-query_benchmark;commands:command_0-command_1-dartfmt-dartanalyzer_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:api_benchmark-query_benchmark
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/[email protected]
with:
sdk: dev
- id: checkout
uses: actions/[email protected]
- id: api_benchmark_pub_upgrade
name: api_benchmark; pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: api_benchmark
run: pub upgrade
- name: api_benchmark; ./../tool/setup.sh
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: ./../tool/setup.sh
- name: api_benchmark; ./compile_protos.sh
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: ./compile_protos.sh
- name: "api_benchmark; dart format --output=none --set-exit-if-changed ."
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: "dart format --output=none --set-exit-if-changed ."
- name: api_benchmark; dart analyze
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: api_benchmark
run: dart analyze
- id: query_benchmark_pub_upgrade
name: query_benchmark; pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: query_benchmark
run: pub upgrade
- name: query_benchmark; ./../tool/setup.sh
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: ./../tool/setup.sh
- name: query_benchmark; ./compile_protos.sh
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: ./compile_protos.sh
- name: "query_benchmark; dart format --output=none --set-exit-if-changed ."
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: "dart format --output=none --set-exit-if-changed ."
- name: query_benchmark; dart analyze
if: "always() && steps.query_benchmark_pub_upgrade.conclusion == 'success'"
working-directory: query_benchmark
run: dart analyze
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
1 change: 0 additions & 1 deletion mono_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ github:

merge_stages:
- format_analyze
- analyze
- run_tests
2 changes: 1 addition & 1 deletion protobuf/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# - test stage runs for all oses and all sdks

stages:
- analyze:
- format_analyze:
- group:
- dartfmt
- dartanalyzer: --fatal-infos lib
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://github.com/dart-lang/mono_repo for details
stages:
- analyze:
- format_analyze:
- group:
- command: ./../tool/setup.sh
- command: make protos
Expand Down

0 comments on commit 77575f7

Please sign in to comment.