-
Notifications
You must be signed in to change notification settings - Fork 238
82 lines (73 loc) · 2.59 KB
/
dart_dart2js.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Dart (dart2js)
on:
workflow_call:
inputs:
working-directory:
description: The working directory relative to the repo root
required: true
type: string
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
# Allows other matrix items to run if one fails
fail-fast: false
matrix:
sdk:
# Minimum supported Dart version
# TODO(dnys1): Remove when repo bump to 2.19 happens
# - 2.19.0
- stable
- beta
browser:
- chrome
- firefox
steps:
- name: Cache Pub dependencies
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
with:
path: |
~/.pub-cache/hosted
~/.pub-cache/git
key: os:ubuntu-latest;sdk:${{ matrix.sdk }};packages:${{ inputs.working-directory }}
restore-keys: |
os:ubuntu-latest;sdk:${{ matrix.sdk }};packages:${{ inputs.working-directory }}
os:ubuntu-latest;sdk:${{ matrix.sdk }}
os:ubuntu-latest
- name: Git Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0
- name: Git Submodules
run: git submodule update --init
- name: Setup Dart
uses: dart-lang/setup-dart@196f54580e9eee2797c57e85e289339f85e6779d # main
with:
sdk: ${{ matrix.sdk }}
- name: Setup 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
( cd packages/aft/external/libgit2dart; git reset --hard HEAD )
- name: Setup Firefox
if: ${{ matrix.browser == 'firefox' }}
uses: ./.github/composite_actions/setup_firefox
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bootstrap
id: bootstrap
timeout-minutes: 10
run: aft bootstrap
- name: Setup Package
if: "always() && steps.bootstrap.conclusion == 'success'"
shell: bash # Run in bash regardless of platform
working-directory: ${{ inputs.working-directory }}
run: |
if [ -e tool/setup.sh ]; then
./tool/setup.sh
fi
- name: Run Tests
if: "always() && steps.bootstrap.conclusion == 'success'"
run: dart run build_runner test --release --delete-conflicting-outputs -- -p ${{ matrix.browser }}
working-directory: ${{ inputs.working-directory }}