Skip to content

Commit

Permalink
[ffigen] Run ffigen CI less often on Apple silicon (#847)
Browse files Browse the repository at this point in the history
* Run ffigen CI less often on Apple silicon

* Daco's comments
  • Loading branch information
liamappelbe authored Dec 5, 2023
1 parent a0949f5 commit adbe779
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ffigen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,10 @@ jobs:
- name: Run VM tests
run: dart test --platform vm --concurrency=1

# Keep in sync with ffigen_weekly.yaml:test-mac-arm64
test-mac:
needs: analyze
strategy:
matrix:
host:
- 'macos-latest'
- 'macos-latest-xlarge' # Arm64.
runs-on: ${{ matrix.host }}
runs-on: 'macos-latest'
defaults:
run:
working-directory: pkgs/ffigen/
Expand All @@ -90,22 +86,19 @@ jobs:
run: dart test --platform vm --concurrency=1
- name: Collect coverage
run: ./tool/coverage.sh
if: ${{ matrix.host == 'macos-latest' }}
- name: Upload coverage
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949
with:
flag-name: ffigen_macos
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: pkgs/ffigen/lcov.info
if: ${{ matrix.host == 'macos-latest' }}
- name: Upload coverage
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949
with:
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"
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
if: ${{ matrix.host == 'macos-latest' }}

test-windows:
needs: analyze
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ffigen_weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Run the ffigen tests on apple silicon once a week. Unlike the other GitHub
# CI hosts, this one isn't free, so we don't run it on every commit.

name: ffigen_weekly

on:
# Run once a week.
schedule:
- cron: "0 0 * * 0"

env:
PUB_ENVIRONMENT: bot.github

jobs:
# Keep in sync with ffigen.yaml:test-mac
test-mac-arm64:
runs-on: 'macos-latest-xlarge' # Arm64.
defaults:
run:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
with:
sdk: 3.2.0
- name: Install dependencies
run: dart pub get
- name: Build test dylib and bindings
run: dart test/setup.dart
- name: Run VM tests
run: dart test --platform vm --concurrency=1

0 comments on commit adbe779

Please sign in to comment.