Skip to content

Commit adbe779

Browse files
authored
[ffigen] Run ffigen CI less often on Apple silicon (#847)
* Run ffigen CI less often on Apple silicon * Daco's comments
1 parent a0949f5 commit adbe779

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

.github/workflows/ffigen.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,10 @@ jobs:
6666
- name: Run VM tests
6767
run: dart test --platform vm --concurrency=1
6868

69+
# Keep in sync with ffigen_weekly.yaml:test-mac-arm64
6970
test-mac:
7071
needs: analyze
71-
strategy:
72-
matrix:
73-
host:
74-
- 'macos-latest'
75-
- 'macos-latest-xlarge' # Arm64.
76-
runs-on: ${{ matrix.host }}
72+
runs-on: 'macos-latest'
7773
defaults:
7874
run:
7975
working-directory: pkgs/ffigen/
@@ -90,22 +86,19 @@ jobs:
9086
run: dart test --platform vm --concurrency=1
9187
- name: Collect coverage
9288
run: ./tool/coverage.sh
93-
if: ${{ matrix.host == 'macos-latest' }}
9489
- name: Upload coverage
9590
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949
9691
with:
9792
flag-name: ffigen_macos
9893
github-token: ${{ secrets.GITHUB_TOKEN }}
9994
parallel: true
10095
path-to-lcov: pkgs/ffigen/lcov.info
101-
if: ${{ matrix.host == 'macos-latest' }}
10296
- name: Upload coverage
10397
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949
10498
with:
10599
carryforward: "jnigen_tests,jni_tests,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"
106100
github-token: ${{ secrets.GITHUB_TOKEN }}
107101
parallel-finished: true
108-
if: ${{ matrix.host == 'macos-latest' }}
109102

110103
test-windows:
111104
needs: analyze

.github/workflows/ffigen_weekly.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Run the ffigen tests on apple silicon once a week. Unlike the other GitHub
2+
# CI hosts, this one isn't free, so we don't run it on every commit.
3+
4+
name: ffigen_weekly
5+
6+
on:
7+
# Run once a week.
8+
schedule:
9+
- cron: "0 0 * * 0"
10+
11+
env:
12+
PUB_ENVIRONMENT: bot.github
13+
14+
jobs:
15+
# Keep in sync with ffigen.yaml:test-mac
16+
test-mac-arm64:
17+
runs-on: 'macos-latest-xlarge' # Arm64.
18+
defaults:
19+
run:
20+
working-directory: pkgs/ffigen/
21+
steps:
22+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
23+
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
24+
with:
25+
sdk: 3.2.0
26+
- name: Install dependencies
27+
run: dart pub get
28+
- name: Build test dylib and bindings
29+
run: dart test/setup.dart
30+
- name: Run VM tests
31+
run: dart test --platform vm --concurrency=1

0 commit comments

Comments
 (0)