-
Notifications
You must be signed in to change notification settings - Fork 56
163 lines (155 loc) · 5.95 KB
/
ffigen.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: ffigen
on:
# Run on PRs and pushes to the default branch, in either the ffigen directory,
# or the objective_c directory.
push:
branches: [main, stable]
paths:
- '.github/workflows/ffigen.yml'
- 'pkgs/ffigen/**'
- 'pkgs/objective_c/**'
pull_request:
branches: [main, stable]
paths:
- '.github/workflows/ffigen.yml'
- 'pkgs/ffigen/**'
- 'pkgs/objective_c/**'
schedule:
- cron: "0 0 * * 0"
env:
PUB_ENVIRONMENT: bot.github
jobs:
# Check code formatting and static analysis on a single OS (macos).
# analyze:
# runs-on: macos-latest
# defaults:
# run:
# working-directory: pkgs/ffigen/
# strategy:
# fail-fast: false
# steps:
# - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
# - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
# with:
# channel: 'stable'
# - id: install
# name: Install dependencies
# run: flutter pub get && flutter pub get --directory="example/shared_bindings" && flutter pub get --directory="../objective_c"
# - name: Check formatting
# run: dart format --output=none --set-exit-if-changed .
# if: always() && steps.install.outcome == 'success'
# - name: Build test dylib and bindings
# run: dart test/setup.dart
# - name: Analyze code
# run: flutter analyze --fatal-infos
# test-linux:
# needs: analyze
# runs-on: ubuntu-22.04
# defaults:
# run:
# working-directory: pkgs/ffigen/
# steps:
# - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
# - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
# with:
# channel: 'stable'
# - name: Install dependencies
# run: flutter pub get
# - name: Install libclang-14-dev
# run: sudo apt-get install libclang-14-dev
# - name: Build test dylib and bindings
# run: dart test/setup.dart
# - name: Run VM tests
# run: dart test
# Keep in sync with ffigen_weekly.yaml:test-mac-arm64
test-mac:
# needs: analyze
runs-on: 'macos-latest'
defaults:
run:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get && flutter pub get --directory="../objective_c"
- name: Build test dylib and bindings
run: dart test/setup.dart
- name: Run VM tests
run: fail_count=0; for i in {1..10}; do dart test || ((fail_count++)); done; if ((fail_count > 0)); then echo "There were $fail_count failures"; exit 1; fi
# - name: Upload coverage
# uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63
# with:
# flag-name: ffigen
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel: true
# path-to-lcov: pkgs/ffigen/coverage/lcov.info
# - name: Upload coverage
# uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63
# 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
# test-mac-flutter:
# needs: analyze
# runs-on: 'macos-latest'
# defaults:
# run:
# working-directory: pkgs/ffigen/
# steps:
# - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
# - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
# with:
# channel: 'stable'
# - name: Install dependencies
# run: flutter pub get && flutter pub get --directory="../objective_c"
# - name: Build test dylib and bindings
# run: dart test/setup.dart --main-thread-dispatcher
# - name: Run Flutter tests
# run: flutter test
# test-windows:
# needs: analyze
# runs-on: windows-latest
# defaults:
# run:
# working-directory: pkgs/ffigen/
# steps:
# - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
# - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
# with:
# channel: 'stable'
# - name: Install dependencies
# run: flutter pub get
# - name: Build test dylib and bindings
# run: dart test/setup.dart
# - name: Run VM tests
# run: dart test
# Sanity check the latest `flutter create --template plugin_ffi`.
# This will break if we change the Flutter template or the generated code.
# But, getting libclang on the LUCI infrastructure has proven to be
# non-trivial. See discussion on
# https://github.com/flutter/flutter/issues/105513.
# If we need to change the generated code, we should temporarily disable this
# test, or temporarily disable the requirement for all bots to be green to
# merge PRs.
# Running this sanity check on one OS should be sufficient. Chosing Windows
# because it is the most likely to break.
# test-windows-flutter:
# needs: analyze
# runs-on: windows-latest
# defaults:
# run:
# working-directory: pkgs/ffigen/
# steps:
# - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
# - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
# with:
# channel: "master"
# - name: Install dependencies
# run: flutter pub get
# - name: Build test dylib and bindings
# run: dart test/setup.dart
# - name: Run VM tests
# run: flutter pub run test test_flutter/