Skip to content

[ffigen] Run ffigen CI less often on Apple silicon #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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