Skip to content

Commit

Permalink
github: remove simulator dependency in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Jun 26, 2024
1 parent 8af830c commit 1729fc1
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/android-play-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:

- name: Remove REQUEST_INSTALL_PACKAGES permission
run: ./patches/remove_request_install_packages_permission.sh

- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
restore-keys: |
${{ runner.OS }}-saber-
- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -110,6 +113,9 @@ jobs:
- name: Remove proprietary dependencies
run: ./patches/remove_proprietary_dependencies.sh

- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
restore-keys: |
${{ runner.OS }}-saber-
- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Install Flutter
uses: subosito/flutter-action@v2
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
restore-keys: |
${{ runner.OS }}-saber-
- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -196,6 +199,9 @@ jobs:
export RUSTUP_HOME=/opt/rustup
export PUB_CACHE=build/pub_cache
echo Removing simulator dependency
./patches/remove_simulator_dependency.sh
echo flutter pub get
unsudo flutter pub get
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
restore-keys: |
${{ runner.OS }}-saber-
- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Install Flutter
uses: subosito/flutter-action@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/onyxsdk_pen_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
packages: libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev libsecret-1-dev libjsoncpp-dev ghostscript libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev
version: 1.0
execute_install_scripts: true

- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
restore-keys: |
${{ runner.OS }}-saber-
- name: Remove simulator dependency
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
key: ${{ runner.OS }}-saber-${{ hashFiles('**/pubspec.lock') }}-${{ hashFiles('**/*.dart') }}
restore-keys: |
${{ runner.OS }}-saber-
- name: Remove simulator dependency
shell: bash
run: ./patches/remove_simulator_dependency.sh

- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down
7 changes: 7 additions & 0 deletions patches/remove_simulator_dependency.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Remove `simulator` from pubspec.yaml
sed -i -e '/simulator/d' pubspec.yaml

# Delete `main_simulator.dart` entry point
rm lib/main_simulator.dart

0 comments on commit 1729fc1

Please sign in to comment.