diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f540ce20ab..00db24e657 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -21,7 +21,7 @@ concurrency: jobs: prepare_matrix: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest outputs: matrix_os: ${{ steps.export-result.outputs.matrix_os }} matrix_architecture: ${{ steps.export-result.outputs.matrix_architecture }} diff --git a/.github/workflows/build-report.yml b/.github/workflows/build-report.yml index 1c8db7c800..d9fda19c0c 100644 --- a/.github/workflows/build-report.yml +++ b/.github/workflows/build-report.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: test_set: [ general, firestore ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: generate-report-${{ matrix.test_set }} steps: - name: Pause 5 minutes to offset Firestore fetches. diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 235fd4dae0..ac8644606e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -17,7 +17,7 @@ concurrency: jobs: file_format_check: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: @@ -40,7 +40,7 @@ jobs: check_integration_test_labels: # This check fails if integration tests are queued, in progress, or failed. - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: docker://agilepathway/pull-request-label-checker:latest with: @@ -49,7 +49,7 @@ jobs: generated_docs_check: # This check succeeds if Doxygen documentation generates without errors. - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: @@ -88,7 +88,7 @@ jobs: copyright_check: # Check for Google copyright in each file. - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: @@ -100,7 +100,7 @@ jobs: release_notes_check: # Check that the readme was updated, unless the PR has a specific label set (env.skipReleaseNotesLabel). - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 # Skip this if the PR has the skipReleaseNotes label or if it's a merge to other than main. diff --git a/.github/workflows/checks_secure.yml b/.github/workflows/checks_secure.yml index aada0f81ac..730caf547e 100644 --- a/.github/workflows/checks_secure.yml +++ b/.github/workflows/checks_secure.yml @@ -12,7 +12,7 @@ concurrency: jobs: dismiss_stale_approvals: # Dismiss stale approvals for users without write access, or if this PR comes from a fork. - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest # Only if another commit was added to the PR. steps: - name: Check user permission diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index dd8fff4217..785fb88fa5 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -42,7 +42,7 @@ env: jobs: log_inputs: name: log-inputs - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: log run inputs run: | @@ -79,9 +79,9 @@ jobs: if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} strategy: matrix: - os: [ubuntu-20.04, macos-13] + os: [ubuntu-latest, macos-13] include: - - os: ubuntu-20.04 + - os: ubuntu-latest tools_platform: linux # Binutils 2.35.1 released Sep 19, 2020 binutils_version: "2.35.1" @@ -243,7 +243,7 @@ jobs: build_and_package_android: name: build-and-package-android - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} strategy: fail-fast: false @@ -308,7 +308,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-20.04, macos-13] + os: [windows-latest, ubuntu-latest, macos-13] build_type: ["Release", "Debug"] architecture: ["x64", "x86", "arm64"] msvc_runtime: ["static", "dynamic"] @@ -322,7 +322,7 @@ jobs: msvc_runtime: "dynamic" vcpkg_triplet_suffix: "windows-static-md" sdk_platform: "windows" - - os: ubuntu-20.04 + - os: ubuntu-latest vcpkg_triplet_suffix: "linux" additional_build_flags: "" sdk_platform: "linux" @@ -342,11 +342,11 @@ jobs: linux_abi: "c++11" - os: macos-13 build_type: "Debug" - - os: ubuntu-20.04 + - os: ubuntu-latest msvc_runtime: "dynamic" - - os: ubuntu-20.04 + - os: ubuntu-latest build_type: "Debug" - - os: ubuntu-20.04 + - os: ubuntu-latest architecture: "arm64" - os: windows-latest architecture: "arm64" @@ -465,40 +465,40 @@ jobs: matrix: sdk_platform: [linux, darwin, windows] suffix: [''] - runs_on_platform: [ubuntu-20.04] + runs_on_platform: [ubuntu-latest] include: # Split windows packaging into multiple runners. - sdk_platform: windows suffix: '-x86-Release-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x86-Release-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x64-Release-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x64-Release-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x86-Debug-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x86-Debug-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x64-Debug-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: windows suffix: '-x64-Debug-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest - sdk_platform: darwin runs_on_platform: macos-13 exclude: - sdk_platform: windows suffix: '' - sdk_platform: darwin - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-latest steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' @@ -656,7 +656,7 @@ jobs: download_sdk_package: name: download-sdk-package - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [log_inputs] if: ${{ github.event.inputs.downloadPublicVersion != '' || github.event.inputs.downloadPreviousRun != '' }} steps: @@ -706,7 +706,7 @@ jobs: merge_packages: name: final-merge-packages - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} needs: [build_and_package_ios_tvos, build_and_package_android, package_desktop, log_inputs] steps: @@ -767,7 +767,7 @@ jobs: create_windows_only_package: name: create-windows-only-package - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [merge_packages] steps: - name: download SDK zip @@ -814,7 +814,7 @@ jobs: # Clean up intermediate artifacts from packaging step. # This can happen after the final package merge is finished. name: cleanup-packaging-artifacts - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [merge_packages] if: | ( @@ -835,7 +835,7 @@ jobs: # Trigger the integration_tests workflow. needs: [merge_packages, download_sdk_package, create_windows_only_package, cleanup_packaging_artifacts] if: (github.event.inputs.skipIntegrationTests == 0 || github.event.inputs.skipIntegrationTests == '') && !cancelled() && !failure() - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 @@ -904,7 +904,7 @@ jobs: attempt_retry: name: "attempt-retry" needs: [trigger_integration_tests] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{ failure() && !cancelled() && github.event_name == 'schedule' }} steps: - name: Checkout repo diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index a1bd06c5ae..d008aabc84 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -20,7 +20,7 @@ concurrency: jobs: prepare_matrix: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest outputs: matrix_os: ${{ steps.export-result.outputs.matrix_os }} matrix_build_type: ${{ steps.export-result.outputs.matrix_build_type }} @@ -70,7 +70,7 @@ jobs: msvc_runtime: "dynamic" exclude: # msvc_runtime excludes - - os: ubuntu-20.04 + - os: ubuntu-latest msvc_runtime: "dynamic" - os: macos-13 msvc_runtime: "dynamic" @@ -78,16 +78,16 @@ jobs: - os: macos-13 architecture: "x86" # Xcode excludes -- allow only one on osx and linux - - os: ubuntu-20.04 + - os: ubuntu-latest xcode_version: "11.7" - os: windows-latest xcode_version: "11.7" - - os: ubuntu-20.04 + - os: ubuntu-latest xcode_version: "12.5.1" - os: windows-latest xcode_version: "12.5.1" # arm64 is only for macos - - os: ubuntu-20.04 + - os: ubuntu-latest architecture: "arm64" - os: windows-latest architecture: "arm64" @@ -292,7 +292,7 @@ jobs: ### It's possible to add more apps here once integration tests are less flaky. name: local-integration-tests-linux-openssl needs: prepare_matrix - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false steps: @@ -331,7 +331,7 @@ jobs: python scripts/gha/build_testapps.py --p Desktop \ --t ${apis} \ --output_directory "${{ github.workspace }}" \ - --artifact_name "desktop-ubuntu-20.04-openssl" \ + --artifact_name "desktop-ubuntu-latest-openssl" \ --noadd_timestamp \ --short_output_paths \ --cmake_flag=-DFIREBASE_QUICK_TEST=ON @@ -339,7 +339,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat build-results-desktop-ubuntu-20.04-openssl.log + cat build-results-desktop-ubuntu-latest-openssl.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi @@ -361,15 +361,15 @@ jobs: java-version: '17' - name: Run Desktop integration tests run: | - cp scripts/gha/integration_testing/google-services.json testapps-desktop-ubuntu-20.04-openssl/firestore/google-services.json - firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps-desktop-ubuntu-20.04-openssl --logfile_name "desktop-ubuntu-20.04-openssl"' + cp scripts/gha/integration_testing/google-services.json testapps-desktop-ubuntu-latest-openssl/firestore/google-services.json + firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps-desktop-ubuntu-latest-openssl --logfile_name "desktop-ubuntu-latest-openssl"' env: USE_FIRESTORE_EMULATOR: true - name: Summarize test results if: ${{ !cancelled() }} shell: bash run: | - cat testapps-desktop-ubuntu-20.04-openssl/test-results-desktop-ubuntu-20.04-openssl.log + cat testapps-desktop-ubuntu-latest-openssl/test-results-desktop-ubuntu-latest-openssl.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 634a93f6df..159cd29337 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -21,7 +21,7 @@ on: required: true operating_systems: description: 'CSV of VMs to run on' - default: 'ubuntu-20.04,windows-latest,macos-13' + default: 'ubuntu-latest,windows-latest,macos-13' required: true desktop_ssl_variants: description: 'CSV of desktop SSL variants to use' @@ -58,7 +58,7 @@ env: jobs: check_and_prepare: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest outputs: trigger: ${{ steps.set_outputs.outputs.trigger }} github_ref: ${{ steps.set_outputs.outputs.github_ref }} @@ -204,7 +204,7 @@ jobs: # at 3am PST/4am PDT. Running firestore desktop integration test aginst tip-of-tree ios repo echo "::warning ::Running against Firestore tip-of-tree" matrix_platform="Desktop" - matrix_os=$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k os -o "ubuntu-20.04,macos-13") + matrix_os=$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k os -o "ubuntu-latest,macos-13") else matrix_platform=$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k platform -o "${{github.event.inputs.platforms}}" --apis ${apis} ) matrix_os=$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k os -o "${{github.event.inputs.operating_systems}}") @@ -268,7 +268,7 @@ jobs: # Do not attempt to use arm64 on Windows or Linux. - os: windows-latest arch: arm64 - - os: ubuntu-20.04 + - os: ubuntu-latest arch: arm64 # Do not attempt to use x86 on Mac. - os: macos-13 @@ -750,7 +750,7 @@ jobs: # Do not attempt to use arm64 on Windows or Linux. - os: windows-latest arch: arm64 - - os: ubuntu-20.04 + - os: ubuntu-latest arch: arm64 # Do not attempt to use x86 on Mac. - os: macos-13 @@ -867,7 +867,7 @@ jobs: test_android: name: test-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }} needs: [check_and_prepare, build_android] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: contains(needs.check_and_prepare.outputs.matrix_platform, 'Android') && needs.check_and_prepare.outputs.apis != '' && !cancelled() strategy: fail-fast: false @@ -1313,7 +1313,7 @@ jobs: summarize_results: name: "summarize-results" needs: [check_and_prepare, test_desktop, test_android, test_ios, test_tvos] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{ !cancelled() }} steps: - uses: actions/checkout@v3 @@ -1381,7 +1381,7 @@ jobs: attempt_retry: name: "attempt-retry" needs: [check_and_prepare, summarize_results] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{ failure() && needs.check_and_prepare.outputs.trigger == 'scheduled_trigger' }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index ce025f1adb..71c8abd36f 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -19,7 +19,7 @@ concurrency: jobs: prepare_matrix: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest outputs: matrix_xcode_version: ${{ steps.export-result.outputs.matrix_xcode_version }} steps: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d8f4149e56..6127a904ef 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ concurrency: jobs: lint_warnings_check_and_comment: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/retry-test-failures.yml b/.github/workflows/retry-test-failures.yml index c49ce7f8bd..788d4bb03c 100644 --- a/.github/workflows/retry-test-failures.yml +++ b/.github/workflows/retry-test-failures.yml @@ -10,7 +10,7 @@ on: jobs: check_results_and_retry_if_needed: name: check-results-and-retry-if-needed - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Get token for firebase-workflow-trigger uses: tibdex/github-app-token@v1 diff --git a/.github/workflows/reviewer-roulette.yml b/.github/workflows/reviewer-roulette.yml index e72efb7e91..a06b939966 100644 --- a/.github/workflows/reviewer-roulette.yml +++ b/.github/workflows/reviewer-roulette.yml @@ -10,7 +10,7 @@ env: jobs: assign_random_reviewer: if: github.event.action == 'labeled' && github.event.label.name == 'reviewer-roulette' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Unset label uses: buildsville/add-remove-label@v1 diff --git a/.github/workflows/update-feature-branches.yml b/.github/workflows/update-feature-branches.yml index 8f9c2023a2..b5a95894d1 100644 --- a/.github/workflows/update-feature-branches.yml +++ b/.github/workflows/update-feature-branches.yml @@ -23,7 +23,7 @@ env: jobs: list_feature_branches: name: list-feature-branches - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest outputs: branch_list: ${{ steps.get-branches.outputs.branch_list }} steps: @@ -57,7 +57,7 @@ jobs: create_merge_prs: name: create-merge-pr-${{ matrix.branch_name }} needs: [ list_feature_branches ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{ needs.list_feature_branches.outputs.branch_list != '[]' }} strategy: fail-fast: false diff --git a/build_scripts/android/install_prereqs.sh b/build_scripts/android/install_prereqs.sh index 396d2b85b8..7cb6647bd0 100755 --- a/build_scripts/android/install_prereqs.sh +++ b/build_scripts/android/install_prereqs.sh @@ -45,8 +45,11 @@ else echo "Installing python packages." set -x # On Windows bash shell, sudo doesn't exist - if [[ $(uname) == "Linux" ]] || [[ $(uname) == "Darwin" ]]; then + if [[ $(uname) == "Darwin" ]]; then sudo python3 -m pip install --upgrade pip + elif [[ $(uname) == "Linux" ]]; then + # Use ubuntu pip + sudo apt update else python3 -m pip install --upgrade pip fi diff --git a/scripts/gha/install_prereqs_desktop.py b/scripts/gha/install_prereqs_desktop.py index 65c01bc4f2..9a74bf2257 100644 --- a/scripts/gha/install_prereqs_desktop.py +++ b/scripts/gha/install_prereqs_desktop.py @@ -45,6 +45,14 @@ def main(): # brew install protobuf utils.run_command(['brew', 'install', 'protobuf']) + if not utils.is_command_installed('libsecret-1'): + if utils.is_linux_os(): + # sudo apt install protobuf-compiler + utils.run_command(['apt', 'install', '-y','libsecret-1-dev'], as_root=True) + elif utils.is_mac_os(): + # brew install protobuf + utils.run_command(['brew', 'install', 'libsecret']) + # Install go on linux/mac if its not installed already if not utils.is_command_installed('go'): if utils.is_linux_os(): diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ad88486501..055e1a7388 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -73,15 +73,15 @@ PARAMETERS = { "desktop": { "matrix": { - "os": ["ubuntu-20.04", "macos-13"], + "os": ["ubuntu-latest", "macos-13"], "build_type": ["Release", "Debug"], "architecture": ["x64", "x86"], "msvc_runtime": ["static","dynamic"], "xcode_version": ["15.1"], - "python_version": ["3.7"], + "python_version": ["3.11"], EXPANDED_KEY: { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"], + "os": ["ubuntu-latest", "macos-13", "windows-latest"], "xcode_version": ["15.1"], } } @@ -89,19 +89,19 @@ "android": { "matrix": { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"], + "os": ["ubuntu-latest", "macos-13", "windows-latest"], "architecture": ["x64"], - "python_version": ["3.7"], + "python_version": ["3.11"], EXPANDED_KEY: { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"] + "os": ["ubuntu-latest", "macos-13", "windows-latest"] } } }, "integration_tests": { "matrix": { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"], + "os": ["ubuntu-latest", "macos-13", "windows-latest"], "platform": ["Desktop", "Android", "iOS", "tvOS"], "ssl_lib": ["openssl"], "android_device": ["android_target", "emulator_ftl_target"], @@ -119,7 +119,7 @@ "build_tools_version": ["28.0.3"], MINIMAL_KEY: { - "os": ["ubuntu-20.04"], + "os": ["ubuntu-latest"], "platform": ["Desktop"], "apis": "firestore" }, @@ -299,9 +299,9 @@ def print_value(value): """ Print Json formatted string that can be consumed in Github workflow.""" # Eg: for lists, # print(json.dumps) -> - # ["ubuntu-20.04", "macos-latest", "windows-latest"] + # ["ubuntu-latest", "macos-latest", "windows-latest"] # print(repr(json.dumps)) -> - # '["ubuntu-20.04", "macos-latest", "windows-latest"]' + # '["ubuntu-latest", "macos-latest", "windows-latest"]' # Eg: for strings # print(json.dumps) -> "flame"