[hooks_runner] [hooks] Shorten output dir paths (#2682) #2217
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CI for the native_* packages. | |
# | |
# Combined into a single workflow so that deps are configured and installed once. | |
name: native | |
permissions: read-all | |
on: | |
pull_request: | |
# No `branches:` to enable stacked PRs on GitHub. | |
paths: | |
- ".github/workflows/native.yaml" | |
- "pkgs/code_assets/**" | |
- "pkgs/data_assets/**" | |
- "pkgs/hooks_runner/**" | |
- "pkgs/hooks/**" | |
- "pkgs/json_syntax_generator/**" | |
- "pkgs/native_test_helpers/**" | |
- "pkgs/native_toolchain_c/**" | |
- "pkgs/repo_lint_rules/**" | |
- "tool/**" | |
push: | |
branches: [main] | |
paths: | |
- ".github/workflows/native.yaml" | |
- "pkgs/code_assets/**" | |
- "pkgs/data_assets/**" | |
- "pkgs/hooks_runner/**" | |
- "pkgs/hooks/**" | |
- "pkgs/json_syntax_generator/**" | |
- "pkgs/native_test_helpers/**" | |
- "pkgs/native_toolchain_c/**" | |
- "pkgs/repo_lint_rules/**" | |
- "tool/**" | |
schedule: | |
- cron: "0 0 * * 0" # weekly | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
sdk: [dev, stable] | |
runs-on: ${{ matrix.os }}-latest | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
with: | |
sdk: ${{ matrix.sdk }} | |
- uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 | |
with: | |
ndk-version: r27 | |
if: ${{ matrix.os != 'macos' }} | |
- name: Install native toolchains | |
run: sudo apt-get update && sudo apt-get install clang-15 gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-riscv64-linux-gnu | |
if: ${{ matrix.os == 'ubuntu' }} | |
- run: dart pub get | |
- name: Run pub get, analysis, formatting, generators, and tests. | |
# Don't run examples on stable, the experiment is not available on stable. | |
run: dart tool/ci.dart --all --no-example | |
if: ${{ matrix.sdk == 'stable' }} | |
- name: Run pub get, analysis, formatting, generators, tests, and examples. | |
run: dart tool/ci.dart --all | |
if: ${{ matrix.sdk != 'stable' }} | |
- name: Upload coverage | |
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b | |
with: | |
flag-name: native_pkgs_${{ matrix.os }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel: true | |
coverage-finished: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload coverage | |
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b | |
with: | |
carryforward: "ffigen,jni,jnigen,native_pkgs_macos,native_pkgs_ubuntu,native_pkgs_windows,objective_c,swift2objc,swiftgen" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |