diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f540ce20ab..f1834b3d1c 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-22.04 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..9af62a6bf8 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-22.04 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..c1ee5375f0 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-22.04 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-22.04 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-22.04 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-22.04 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-22.04 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..c919b374b6 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-22.04 # 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..706a30515a 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-22.04 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-22.04, macos-13] include: - - os: ubuntu-20.04 + - os: ubuntu-22.04 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-22.04 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-22.04, 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-22.04 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-22.04 msvc_runtime: "dynamic" - - os: ubuntu-20.04 + - os: ubuntu-22.04 build_type: "Debug" - - os: ubuntu-20.04 + - os: ubuntu-22.04 architecture: "arm64" - os: windows-latest architecture: "arm64" @@ -409,7 +409,6 @@ jobs: max_attempts: 3 command: | python scripts/gha/install_prereqs_desktop.py --gha_build --arch '${{ matrix.architecture }}' --ssl boringssl - - name: Export verbose flag shell: bash run: | @@ -465,40 +464,40 @@ jobs: matrix: sdk_platform: [linux, darwin, windows] suffix: [''] - runs_on_platform: [ubuntu-20.04] + runs_on_platform: [ubuntu-22.04] include: # Split windows packaging into multiple runners. - sdk_platform: windows suffix: '-x86-Release-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x86-Release-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x64-Release-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x64-Release-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x86-Debug-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x86-Debug-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x64-Debug-static' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - sdk_platform: windows suffix: '-x64-Debug-dynamic' - runs_on_platform: ubuntu-20.04 + runs_on_platform: ubuntu-22.04 - 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-22.04 steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' @@ -656,7 +655,7 @@ jobs: download_sdk_package: name: download-sdk-package - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [log_inputs] if: ${{ github.event.inputs.downloadPublicVersion != '' || github.event.inputs.downloadPreviousRun != '' }} steps: @@ -706,7 +705,7 @@ jobs: merge_packages: name: final-merge-packages - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 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 +766,7 @@ jobs: create_windows_only_package: name: create-windows-only-package - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [merge_packages] steps: - name: download SDK zip @@ -814,7 +813,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-22.04 needs: [merge_packages] if: | ( @@ -835,7 +834,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-22.04 steps: - name: Checkout repo uses: actions/checkout@v3 @@ -904,7 +903,7 @@ jobs: attempt_retry: name: "attempt-retry" needs: [trigger_integration_tests] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: ${{ failure() && !cancelled() && github.event_name == 'schedule' }} steps: - name: Checkout repo diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 855fbd8123..fa1b792cad 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-22.04 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-22.04 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-22.04 xcode_version: "11.7" - os: windows-latest xcode_version: "11.7" - - os: ubuntu-20.04 + - os: ubuntu-22.04 xcode_version: "12.5.1" - os: windows-latest xcode_version: "12.5.1" # arm64 is only for macos - - os: ubuntu-20.04 + - os: ubuntu-22.04 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-22.04 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-22.04-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-22.04-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-22.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-22.04-openssl --logfile_name "desktop-ubuntu-22.04-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-22.04-openssl/test-results-desktop-ubuntu-22.04-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..25eefdf7f6 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-22.04,windows-latest,macos-13' required: true desktop_ssl_variants: description: 'CSV of desktop SSL variants to use' @@ -42,6 +42,8 @@ on: firestore_dep_source: description: 'Optional: Where to get firestore iOS SDK from: "RELEASED", "TIP" or " from firestore-ios-sdk"' +permissions: write-all + env: triggerLabelPrefix: "tests-requested: " triggerLabelFull: "tests-requested: full" @@ -58,7 +60,7 @@ env: jobs: check_and_prepare: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: trigger: ${{ steps.set_outputs.outputs.trigger }} github_ref: ${{ steps.set_outputs.outputs.github_ref }} @@ -204,7 +206,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-22.04,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 +270,7 @@ jobs: # Do not attempt to use arm64 on Windows or Linux. - os: windows-latest arch: arm64 - - os: ubuntu-20.04 + - os: ubuntu-22.04 arch: arm64 # Do not attempt to use x86 on Mac. - os: macos-13 @@ -750,7 +752,7 @@ jobs: # Do not attempt to use arm64 on Windows or Linux. - os: windows-latest arch: arm64 - - os: ubuntu-20.04 + - os: ubuntu-22.04 arch: arm64 # Do not attempt to use x86 on Mac. - os: macos-13 @@ -867,7 +869,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-22.04 if: contains(needs.check_and_prepare.outputs.matrix_platform, 'Android') && needs.check_and_prepare.outputs.apis != '' && !cancelled() strategy: fail-fast: false @@ -1313,7 +1315,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-22.04 if: ${{ !cancelled() }} steps: - uses: actions/checkout@v3 @@ -1381,7 +1383,7 @@ jobs: attempt_retry: name: "attempt-retry" needs: [check_and_prepare, summarize_results] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 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..45dbe79caf 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-22.04 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..dbe4114141 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-22.04 steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/retry-test-failures.yml b/.github/workflows/retry-test-failures.yml index c49ce7f8bd..188e4ae7a7 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-22.04 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..8388bd06e7 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-22.04 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..b39ad3e279 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-22.04 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-22.04 if: ${{ needs.list_feature_branches.outputs.branch_list != '[]' }} strategy: fail-fast: false diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ad88486501..e41c70f5ac 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -73,7 +73,7 @@ PARAMETERS = { "desktop": { "matrix": { - "os": ["ubuntu-20.04", "macos-13"], + "os": ["ubuntu-22.04", "macos-13"], "build_type": ["Release", "Debug"], "architecture": ["x64", "x86"], "msvc_runtime": ["static","dynamic"], @@ -81,7 +81,7 @@ "python_version": ["3.7"], EXPANDED_KEY: { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"], + "os": ["ubuntu-22.04", "macos-13", "windows-latest"], "xcode_version": ["15.1"], } } @@ -89,19 +89,19 @@ "android": { "matrix": { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"], + "os": ["ubuntu-22.04", "macos-13", "windows-latest"], "architecture": ["x64"], "python_version": ["3.7"], EXPANDED_KEY: { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"] + "os": ["ubuntu-22.04", "macos-13", "windows-latest"] } } }, "integration_tests": { "matrix": { - "os": ["ubuntu-20.04", "macos-13", "windows-latest"], + "os": ["ubuntu-22.04", "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-22.04"], "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-22.04", "macos-latest", "windows-latest"] # print(repr(json.dumps)) -> - # '["ubuntu-20.04", "macos-latest", "windows-latest"]' + # '["ubuntu-22.04", "macos-latest", "windows-latest"]' # Eg: for strings # print(json.dumps) -> "flame" diff --git a/scripts/gha/utils.py b/scripts/gha/utils.py index adeb805d35..0bddfc7bff 100644 --- a/scripts/gha/utils.py +++ b/scripts/gha/utils.py @@ -235,9 +235,10 @@ def install_x86_support_libraries(gha_build=False): downgrading Ubuntu packages). """ if is_linux_os(): - packages = ['gcc-multilib', 'g++-multilib', 'libglib2.0-dev:i386', + packages = ['gcc-10-multilib', 'g++-10-multilib', 'libglib2.0-dev:i386', 'libsecret-1-dev:i386', 'libpthread-stubs0-dev:i386', - 'libssl-dev:i386', 'libsecret-1-0:i386'] + 'libssl-dev:i386', 'libsecret-1-0:i386', 'libgcc-s1:i386', + 'gcc-10-base:i386'] remove_packages = [] # First check if these packages exist on the machine already @@ -255,8 +256,8 @@ def install_x86_support_libraries(gha_build=False): if gha_build: # Remove libpcre to prevent package conflicts. # Only remove packages on GitHub runners. - remove_packages = ['libpcre2-dev:amd64', 'libpcre2-32-0:amd64', - 'libpcre2-8-0:amd64', 'libpcre2-16-0:amd64'] + remove_packages = ['libpcre2-16-0:amd64', 'libpcre2-32-0:amd64', 'libpcre2-8-0:amd64', + 'libpcre2-posix3:amd64', 'libpcre2-dev:amd64', 'pcre2-utils:amd64'] # Note: With aptitude, you can remove package 'xyz' by specifying 'xyz-' # in the package list. run_command(['aptitude', 'install', '-V', '-y'] + packages +