-
Notifications
You must be signed in to change notification settings - Fork 50
97 lines (92 loc) · 3.44 KB
/
objective_c.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: objective_c
on:
# Run on PRs and pushes to the default branch.
push:
branches: [main, stable]
paths:
- '.github/workflows/objective_c.yaml'
- 'pkgs/ffigen/**'
- 'pkgs/objective_c/**'
pull_request:
branches: [main, stable]
paths:
- '.github/workflows/objective_c.yaml'
- 'pkgs/ffigen/**'
- 'pkgs/objective_c/**'
schedule:
- cron: "0 0 * * 0"
env:
PUB_ENVIRONMENT: bot.github
jobs:
# Check code formatting and static analysis.
analyze:
runs-on: macos-latest
defaults:
run:
working-directory: pkgs/objective_c/
strategy:
fail-fast: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
channel: 'stable'
- id: install
name: Install dependencies
run: flutter pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: flutter analyze --fatal-infos
if: always() && steps.install.outcome == 'success'
test-mac:
needs: analyze
runs-on: 'macos-latest'
defaults:
run:
working-directory: pkgs/objective_c/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Build test dylib
# TODO(https://github.com/dart-lang/native/issues/1068): Remove this.
run: dart test/setup.dart
- name: Run VM tests and collect coverage
run: dart run coverage:test_with_coverage --scope-output=ffigen --scope-output=objective_c
- name: Verify generated code is up to date
# test/generate_code_test.dart runs the code generator, so if there are
# any git-diffs at this point, it means the generated code is outdated.
run: if [[ -n $(git status --porcelain | tee /dev/stderr) ]]; then echo -e "\nDIFF:"; git diff; false; fi
- name: Upload coverage
uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8
with:
flag-name: objective_c
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: pkgs/objective_c/coverage/lcov.info
- name: Upload coverage
uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8
with:
carryforward: "ffigen,jni,jnigen,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows,objective_c,swift2objc"
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
build-example:
needs: analyze
runs-on: 'macos-latest'
defaults:
run:
working-directory: pkgs/objective_c/example/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Build the example app
run: flutter build macos