Update stockfish to 16.1 (#40) #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
env: | |
SCRIPT: ./example/integration_test/execute.sh | |
jobs: | |
android: | |
name: Android integration tests | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- avd-api-level: 21 | |
avd-target: google_apis | |
flutter-version: 3.0.0 | |
macos-version: macos-11 | |
- avd-api-level: 34 | |
avd-target: google_apis | |
flutter-version: any | |
macos-version: macos-latest | |
runs-on: ${{ matrix.macos-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: flutter-action | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Cache pub get | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.PUB_CACHE }} | |
key: pub-cache-${{ steps.flutter-action.outputs.VERSION }}-${{ hashFiles('example/pubspec.lock') }} | |
# pre-build the app to (hopefully) speed up the test execution time, | |
# avoiding the `Test timed out after 12 minutes.` error. | |
# Apparently the timeout could not be configured, see https://github.com/flutter/flutter/issues/105913 | |
- name: Run flutter build apk | |
run: | | |
set -e | |
# use pre-installed Java 11 | |
export JAVA_HOME=$JAVA_HOME_11_X64 | |
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
flutter build apk --debug --target=integration_test/app_test.dart | |
working-directory: example | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.avd-api-level }}-${{ matrix.avd-target }} | |
- name: Create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.avd-api-level }} | |
arch: x86_64 | |
disk-size: 2G | |
target: ${{ matrix.avd-target }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: RUN ${{ env.SCRIPT }} | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.avd-api-level }} | |
arch: x86_64 | |
disk-size: 2G | |
target: ${{ matrix.avd-target }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ${{ env.SCRIPT }} | |
ios: | |
name: iOS integration tests | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- flutter-version: 3.0.0 | |
macos-version: macos-11 | |
- flutter-version: any | |
macos-version: macos-latest | |
runs-on: ${{ matrix.macos-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: flutter-action | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Cache pub get | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.PUB_CACHE }} | |
key: pub-cache-${{ steps.flutter-action.outputs.VERSION }}-${{ hashFiles('example/pubspec.lock') }} | |
- name: Cache CocoaPods | |
uses: actions/cache@v3 | |
with: | |
path: example/ios/Pods | |
key: example-ios-pods-${{ matrix.macos-version }}-${{ steps.flutter-action.outputs.VERSION }}-${{ hashFiles('example/ios/Podfile.lock') }} | |
- name: Create iOS simulator | |
run: | | |
set -e | |
_runtime=$(xcrun simctl list runtimes ios -j | jq -r '.runtimes[-1]') | |
_runtimeId=$(echo $_runtime | jq -r .identifier) | |
echo "_runtimeId=$_runtimeId" | |
_deviceType=$(echo $_runtime | jq -r '.supportedDeviceTypes[-1]') | |
_deviceTypeName=$(echo $_deviceType | jq -r .name) | |
echo "_deviceTypeName=$_deviceTypeName" | |
_deviceTypeId=$(echo $_deviceType | jq -r .identifier) | |
echo "_deviceTypeId=$_deviceTypeId" | |
xcrun simctl create "$_deviceTypeName" "$_deviceTypeId" "$_runtimeId" | xargs xcrun simctl boot | |
# https://github.com/flutter/flutter/issues/105913 | |
- run: flutter build ios --simulator --target=integration_test/app_test.dart | |
working-directory: example | |
- run: ${{ env.SCRIPT }} |