From 1729fc161261128f3d676072c9b7510fb0e5b83d Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Wed, 26 Jun 2024 18:04:23 +0100 Subject: [PATCH] github: remove simulator dependency in release builds --- .github/workflows/android-play-store.yml | 3 +++ .github/workflows/android.yml | 6 ++++++ .github/workflows/ios.yml | 3 +++ .github/workflows/linux.yml | 6 ++++++ .github/workflows/macos.yml | 3 +++ .github/workflows/onyxsdk_pen_tests.yml | 3 +++ .github/workflows/tests.yml | 3 +++ .github/workflows/windows.yml | 4 ++++ patches/remove_simulator_dependency.sh | 7 +++++++ 9 files changed, 38 insertions(+) create mode 100755 patches/remove_simulator_dependency.sh diff --git a/.github/workflows/android-play-store.yml b/.github/workflows/android-play-store.yml index f88407466..d008439ac 100644 --- a/.github/workflows/android-play-store.yml +++ b/.github/workflows/android-play-store.yml @@ -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 diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6a2c9987a..a422ce0fe 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -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 @@ -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 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 093e5331f..3bf6b5a49 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7ccd83516..85250e8c8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 @@ -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 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7ff5dc3bb..c154b2056 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 diff --git a/.github/workflows/onyxsdk_pen_tests.yml b/.github/workflows/onyxsdk_pen_tests.yml index 2b5c81361..ab2b5d8b8 100644 --- a/.github/workflows/onyxsdk_pen_tests.yml +++ b/.github/workflows/onyxsdk_pen_tests.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b7c93e44..f4a16aa0f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4b283500b..855370d3f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 diff --git a/patches/remove_simulator_dependency.sh b/patches/remove_simulator_dependency.sh new file mode 100755 index 000000000..6e34e22cb --- /dev/null +++ b/patches/remove_simulator_dependency.sh @@ -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