Skip to content

Commit

Permalink
chore: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ttypic committed Oct 8, 2024
1 parent 9d05fef commit 5806925
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.x'
flutter-version: '3.24'
cache: true

# This step requires fetch of test_integration packages because flutter format and
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
deployments: write
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.x'
flutter-version: '3.24'
cache: true

- name: Use Intro Blurb As Homepage
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/flutter_example_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
ios:
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.0.x"
flutter-version: "3.24"
cache: true

- name: "Build example app for iOS"
Expand All @@ -23,16 +23,11 @@ jobs:
android:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.0.x"
flutter-version: "3.24"
cache: true

- name: "Build example app for Android"
Expand Down
49 changes: 34 additions & 15 deletions .github/workflows/flutter_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ jobs:
strategy:
matrix:
device: # Device names must be shown in `xcrun simctl list devices`
- 'iPhone 12' # we are not specifying the iOS version as it tends to change
- 'iPhone 16' # we are not specifying the iOS version as it tends to change
fail-fast: false
runs-on: 'macos-11'
runs-on: macos-latest
steps:
- name: 'List Simulators'
run: 'xcrun simctl list devices'

- name: 'Start Simulator'
run: xcrun simctl boot "${{ matrix.device }}"

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.x'
flutter-version: '3.24'
cache: true

# test_integration package depends on ably_flutter, so before we run integration
Expand All @@ -38,31 +38,50 @@ jobs:
cd test_integration && ./run_integration_tests.sh
android:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [24, 29]
api-level: [24, 29, 33]
fail-fast: false

runs-on: 'macos-11'

steps:
- uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.x'
flutter-version: '3.24'
cache: true

- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}

- 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.api-level }}
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 Flutter Driver tests'
timeout-minutes: 30
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
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: |
Expand Down

0 comments on commit 5806925

Please sign in to comment.