| # 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. |
| push: |
| branches: [main, stable] |
| paths: |
| - '.github/workflows/ffigen_weekly.yml' |
| pull_request: |
| branches: [main, stable] |
| paths: |
| - '.github/workflows/ffigen_weekly.yml' |
| 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-14-large' # x64 |
| defaults: |
| run: |
| working-directory: pkgs/ffigen/ |
| steps: |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e |
| with: |
| channel: 'stable' |
| - name: Install dependencies |
| run: flutter pub get && flutter pub get --directory="../objective_c" && flutter pub get --directory="../jni" |
| - name: Install clang-format |
| uses: ConorMacBride/install-package@3e7ad059e07782ee54fa35f827df52aae0626f30 |
| with: |
| brew: clang-format |
| - name: Build test dylib and bindings |
| run: dart --enable-asserts test/setup.dart --main-thread-dispatcher |
| - name: Run VM tests |
| run: flutter test |
| - name: Generate package:jni bindings |
| run: dart --enable-asserts run tool/generate_ffi_bindings.dart |
| working-directory: pkgs/jni/ |