From adbe7798bf8fa81cb536d9bf1683b777a2c74347 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 5 Dec 2023 14:07:15 -0800 Subject: [PATCH] [ffigen] Run ffigen CI less often on Apple silicon (#847) * Run ffigen CI less often on Apple silicon * Daco's comments --- .github/workflows/ffigen.yml | 11 ++-------- .github/workflows/ffigen_weekly.yml | 31 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/ffigen_weekly.yml diff --git a/.github/workflows/ffigen.yml b/.github/workflows/ffigen.yml index 996e2c79c..945cca21c 100644 --- a/.github/workflows/ffigen.yml +++ b/.github/workflows/ffigen.yml @@ -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/ @@ -90,7 +86,6 @@ 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: @@ -98,14 +93,12 @@ jobs: 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 diff --git a/.github/workflows/ffigen_weekly.yml b/.github/workflows/ffigen_weekly.yml new file mode 100644 index 000000000..4d8d1060a --- /dev/null +++ b/.github/workflows/ffigen_weekly.yml @@ -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