From d1c659fc94a573e59f67f64daeba2bc038cf078a Mon Sep 17 00:00:00 2001 From: Mou Sun <69009538+sunmou99@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:06:09 -1000 Subject: [PATCH 1/4] Revert "Revert "Combine environment setting steps into one step with shell script (#1010)" (#1029)" This reverts commit 8b7b0674ea47ff4a4f05b723f139e2de90c96dca. --- .github/workflows/desktop.yml | 15 +- .github/workflows/integration_tests.yml | 226 +++--------------- scripts/gha/install_test_workflow_prereqs.sh | 86 +++++++ ...quirements.txt => python_requirements.txt} | 2 +- 4 files changed, 130 insertions(+), 199 deletions(-) create mode 100755 scripts/gha/install_test_workflow_prereqs.sh rename scripts/gha/{requirements.txt => python_requirements.txt} (100%) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 87e7ed7622..3d5c5073dd 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -312,10 +312,6 @@ jobs: with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true - - name: Set env vars - run: | - echo "VCPKG_TRIPLET=x64-linux" >> $GITHUB_ENV - echo "VCPKG_RESPONSE_FILE=external/vcpkg_${{ env.VCPKG_TRIPLET }}_response_file.txt" >> $GITHUB_ENV - name: Cache vcpkg C++ dependencies id: cache_vcpkg uses: actions/cache@v2 @@ -332,11 +328,12 @@ jobs: with: python-version: ${{ fromJson(needs.prepare_matrix.outputs.matrix_python_version)[0] }} - name: Prepare for integration tests - run: | - pip install -r scripts/gha/requirements.txt - - name: Install OpenSSL - run: | - sudo apt install openssl + uses: nick-invision/retry@v2 + with: + shell: bash + timeout_minutes: 15 + max_attempts: 3 + command: scripts/gha/install_test_workflow_prereqs.sh -p Desktop -a 'x64' -s 'openssl' - name: Build integration tests shell: bash env: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 1f3fd84eb0..926aa81352 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -44,6 +44,7 @@ env: triggerLabelFull: "tests-requested: full" triggerLabelQuick: "tests-requested: quick" pythonVersion: '3.7' + xcodeVersion: '13.3.1' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} # All self-hosted ARM Mac runners should have this label. Due to how @@ -158,7 +159,7 @@ jobs: timeout_minutes: 1 max_attempts: 3 shell: bash - command: pip install -r scripts/gha/requirements.txt + command: pip install -r scripts/gha/python_requirements.txt - id: matrix_config run: | if [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "expanded" ]]; then @@ -264,93 +265,30 @@ jobs: ssl_variant: openssl arch: arm64 steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true - - name: Store git credentials for all git commands - # Forces all git commands to use authenticated https, to prevent throttling. - shell: bash - run: | - git config --global credential.helper 'store --file /tmp/git-credentials' - echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - - name: Enable Git Long-paths Support - if: runner.os == 'Windows' - run: git config --system core.longpaths true - - name: Set env vars (Linux) - if: startsWith(matrix.os, 'ubuntu') - run: echo "VCPKG_TRIPLET=x64-linux" >> $GITHUB_ENV - - name: Set env vars (macOS) - if: startsWith(matrix.os, 'macos') - run: echo "VCPKG_TRIPLET=x64-osx" >> $GITHUB_ENV - - name: Set env vars (Windows) - shell: bash - if: startsWith(matrix.os, 'windows') - run: echo "VCPKG_TRIPLET=x64-windows-static" >> $GITHUB_ENV - - name: Set env vars (all) - shell: bash - run: echo "VCPKG_RESPONSE_FILE=external/vcpkg_${{ env.VCPKG_TRIPLET }}_response_file.txt" >> $GITHUB_ENV - - name: Add msbuild to PATH (Windows) - if: startsWith(matrix.os, 'windows') - uses: microsoft/setup-msbuild@v1.0.2 - - name: Cache vcpkg C++ dependencies - id: cache_vcpkg - uses: actions/cache@v2 - with: - path: external/vcpkg/installed - key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} - name: Setup python uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Update homebrew (avoid bintray errors) - uses: nick-invision/retry@v2 - if: startsWith(matrix.os, 'macos') - with: - timeout_minutes: 10 - max_attempts: 3 - command: | - # Temporarily here until Github runners have updated their version of - # homebrew. This prevents errors arising from the shut down of - # binutils, used by older version of homebrew for hosting packages. - brew update - name: Install Desktop SDK & integration tests prerequisites uses: nick-invision/retry@v2 with: - timeout_minutes: 15 - max_attempts: 3 - command: | - python scripts/gha/install_prereqs_desktop.py --gha_build --arch '${{ matrix.arch }}' --ssl '${{ matrix.ssl_variant }}' - pip install -r scripts/gha/requirements.txt - python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" - - name: Install OpenSSL (Windows) - if: matrix.ssl_variant == 'openssl' && startsWith(matrix.os, 'windows') - uses: nick-invision/retry@v2 - with: - timeout_minutes: 4 - max_attempts: 3 shell: bash - command: choco install openssl -r - - name: Install OpenSSL (macOS) - if: matrix.ssl_variant == 'openssl' && startsWith(matrix.os, 'macos') - uses: nick-invision/retry@v2 - with: - timeout_minutes: 2 + timeout_minutes: 15 max_attempts: 3 - command: | - brew install openssl - # brew won't overwrite MacOS system default OpenSSL, so force it here. - echo "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1" >> $GITHUB_ENV - - name: Install OpenSSL (Linux) - if: matrix.ssl_variant == 'openssl' && startsWith(matrix.os, 'ubuntu') - uses: nick-invision/retry@v2 + command: scripts/gha/install_test_workflow_prereqs.sh -p Desktop -a '${{ matrix.arch }}' -s '${{ matrix.ssl_variant }}' + - name: Add msbuild to PATH (Windows) + if: startsWith(matrix.os, 'windows') + uses: microsoft/setup-msbuild@v1.0.2 + - name: Cache vcpkg C++ dependencies + id: cache_vcpkg + uses: actions/cache@v2 with: - timeout_minutes: 2 - max_attempts: 3 - command: sudo apt install openssl + path: external/vcpkg/installed + key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} - name: Fetch prebuilt packaged SDK from previous run uses: dawidd6/action-download-artifact@v2 if: ${{ github.event.inputs.test_packaged_sdk != '' }} @@ -363,6 +301,7 @@ jobs: env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir run: | + python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" declare -a additional_flags if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then # Building integration tests against a packaged SDK. @@ -445,22 +384,10 @@ jobs: matrix: os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }} steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true - - name: Store git credentials for all git commands - # Forces all git commands to use authenticated https, to prevent throttling. - shell: bash - run: | - git config --global credential.helper 'store --file /tmp/git-credentials' - echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - - name: Enable Git Long-paths Support - if: runner.os == 'Windows' - run: git config --system core.longpaths true - name: Add msbuild to PATH (Windows) if: startsWith(matrix.os, 'windows') uses: microsoft/setup-msbuild@v1.0.2 @@ -474,29 +401,13 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Update homebrew (avoid bintray errors) - uses: nick-invision/retry@v2 - if: startsWith(matrix.os, 'macos') - with: - timeout_minutes: 10 - max_attempts: 3 - command: | - # Temporarily here until Github runners have updated their version of - # homebrew. This prevents errors arising from the shut down of - # binutils, used by older version of homebrew for hosting packages. - brew update - name: Install Android SDK & integration tests prerequisites uses: nick-invision/retry@v2 with: + shell: bash timeout_minutes: 10 max_attempts: 3 - shell: bash - command: | - build_scripts/android/install_prereqs.sh - echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV - echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV - pip install -r scripts/gha/requirements.txt - python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" + command: scripts/gha/install_test_workflow_prereqs.sh -p Android - name: Fetch prebuilt packaged SDK from previous run uses: dawidd6/action-download-artifact@v2 if: ${{ github.event.inputs.test_packaged_sdk != '' }} @@ -507,6 +418,7 @@ jobs: - name: Build integration tests shell: bash run: | + python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" declare -a additional_flags if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then # Building integration tests against a packaged SDK. @@ -580,43 +492,20 @@ jobs: matrix: os: [macos-12] steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true - - name: Store git credentials for all git commands - # Forces all git commands to use authenticated https, to prevent throttling. - shell: bash - run: | - git config --global credential.helper 'store --file /tmp/git-credentials' - echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - name: Setup python uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Update homebrew (avoid bintray errors) - uses: nick-invision/retry@v2 - if: startsWith(matrix.os, 'macos') - with: - timeout_minutes: 10 - max_attempts: 3 - command: | - # Temporarily here until Github runners have updated their version of - # homebrew. This prevents errors arising from the shut down of - # binutils, used by older version of homebrew for hosting packages. - brew update - name: Install iOS SDK & integration tests prerequisites uses: nick-invision/retry@v2 with: - timeout_minutes: 2 + timeout_minutes: 3 max_attempts: 3 - command: | - build_scripts/ios/install_prereqs.sh - pip install -r scripts/gha/requirements.txt - python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" + command: scripts/gha/install_test_workflow_prereqs.sh -p iOS - name: Fetch prebuilt packaged SDK from previous run uses: dawidd6/action-download-artifact@v2 if: ${{ github.event.inputs.test_packaged_sdk != '' }} @@ -627,6 +516,7 @@ jobs: - name: Build integration tests shell: bash run: | + python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" declare -a additional_flags if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then # Building integration tests against a packaged SDK. @@ -701,43 +591,20 @@ jobs: matrix: os: [macos-12] steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true - - name: Store git credentials for all git commands - # Forces all git commands to use authenticated https, to prevent throttling. - shell: bash - run: | - git config --global credential.helper 'store --file /tmp/git-credentials' - echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - name: Setup python uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Update homebrew (avoid bintray errors) - uses: nick-invision/retry@v2 - if: startsWith(matrix.os, 'macos') - with: - timeout_minutes: 10 - max_attempts: 3 - command: | - # Temporarily here until Github runners have updated their version of - # homebrew. This prevents errors arising from the shut down of - # binutils, used by older version of homebrew for hosting packages. - brew update - name: Install tvOS SDK & integration tests prerequisites uses: nick-invision/retry@v2 with: - timeout_minutes: 2 + timeout_minutes: 3 max_attempts: 3 - command: | - build_scripts/tvos/install_prereqs.sh - pip install -r scripts/gha/requirements.txt - python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" + command: scripts/gha/install_test_workflow_prereqs.sh -p tvOS - name: Fetch prebuilt packaged SDK from previous run uses: dawidd6/action-download-artifact@v2 if: ${{ github.event.inputs.test_packaged_sdk != '' }} @@ -748,6 +615,7 @@ jobs: - name: Build integration tests shell: bash run: | + python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" declare -a additional_flags if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then # Building integration tests against a packaged SDK. @@ -847,9 +715,6 @@ jobs: - os: macos-12 arch: arm64 steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} @@ -862,28 +727,20 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: install platform support libraries for running + - name: Install prerequisites for testing uses: nick-invision/retry@v2 with: + shell: bash timeout_minutes: 15 max_attempts: 3 - command: python scripts/gha/install_prereqs_desktop.py --gha_build --running_only --arch '${{ matrix.arch }}' --ssl '${{ matrix.ssl_variant }}' - + command: scripts/gha/install_test_workflow_prereqs.sh -p Desktop -t true -a '${{ matrix.arch }}' -s '${{ matrix.ssl_variant }}' - name: Set up Node (14) uses: actions/setup-node@v2 with: node-version: 14.x - name: Setup Firestore Emulator run: | - npm install -g firebase-tools - - name: Setup integration test deps - uses: nick-invision/retry@v2 - with: - timeout_minutes: 2 - max_attempts: 3 - shell: bash - command: | - pip install -r scripts/gha/requirements.txt + npm install -g firebase-tools - name: Setup java uses: actions/setup-java@v3 with: @@ -1108,9 +965,6 @@ jobs: - android_device: "android_latest" test_type: "uitest" steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} @@ -1123,13 +977,13 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Install python deps + - name: Install prerequisites for testing uses: nick-invision/retry@v2 with: - timeout_minutes: 1 - max_attempts: 3 shell: bash - command: pip install -r scripts/gha/requirements.txt + timeout_minutes: 5 + max_attempts: 3 + command: scripts/gha/install_test_workflow_prereqs.sh -p Android -t true - id: get-device-type run: | echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.android_device }} )" @@ -1240,9 +1094,6 @@ jobs: test_type: "uitest" build_os: [macos-12] steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} @@ -1255,12 +1106,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Install python deps + - name: Install prerequisites for testing uses: nick-invision/retry@v2 with: - timeout_minutes: 1 + timeout_minutes: 3 max_attempts: 3 - command: pip install -r scripts/gha/requirements.txt + command: scripts/gha/install_test_workflow_prereqs.sh -p iOS -t true - id: get-device-type run: | echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.ios_device }} )" @@ -1359,9 +1210,6 @@ jobs: tvos_device: ${{ fromJson(needs.check_and_prepare.outputs.tvos_device) }} build_os: [macos-12] steps: - - name: setup Xcode version (macos) - if: runner.os == 'macOS' - run: sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} @@ -1374,12 +1222,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ env.pythonVersion }} - - name: Install python deps + - name: Install prerequisites for testing uses: nick-invision/retry@v2 with: - timeout_minutes: 1 + timeout_minutes: 3 max_attempts: 3 - command: pip install -r scripts/gha/requirements.txt + command: scripts/gha/install_test_workflow_prereqs.sh -p tvOS -t true - name: Setup java for Firestore emulator uses: actions/setup-java@v3 with: @@ -1451,7 +1299,7 @@ jobs: with: python-version: ${{ env.pythonVersion }} - name: Install python deps - run: pip install -r scripts/gha/requirements.txt + run: pip install -r scripts/gha/python_requirements.txt - name: Download log artifacts uses: actions/download-artifact@v3 with: diff --git a/scripts/gha/install_test_workflow_prereqs.sh b/scripts/gha/install_test_workflow_prereqs.sh new file mode 100755 index 0000000000..d197439245 --- /dev/null +++ b/scripts/gha/install_test_workflow_prereqs.sh @@ -0,0 +1,86 @@ +#!/bin/bash -e + +# Copyright 2022 Google LLC + +PLATFORM='Desktop' +TEST_ONLY='' +ARCH='' +SSL='' +# check options +while getopts ":p:a:t:s:" opt; do + case $opt in + p) + PLATFORM=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + t) + if [[ $OPTARG == true ]]; then + TEST_ONLY="--running_only" + fi + ;; + s) + SSL=$OPTARG + ;; + *) + echo "unknown parameter" + echo $OPTARG + exit 2 + ;; + esac +done + +echo "PLATFORM: ${PLATFORM}" +echo "ARCH: ${ARCH}" +echo "TEST_ONLY: ${TEST_ONLY}" +echo "SSL: ${SSL}" + +OS='' +case "$OSTYPE" in + darwin*) OS='Mac' ;; + linux*) OS='Linux' ;; + msys*) OS='Windows' ;; + *) echo "unknown: $OSTYPE" ;; +esac +echo "OS: ${OS}" + +pip install -r scripts/gha/python_requirements.txt + +git config --global credential.helper 'store --file /tmp/git-credentials' +echo 'https://${GITHUB_TOKEN}@github.com' > /tmp/git-credentials + +if [[ "${OS}" == "Windows" ]]; then + git config --system core.longpaths true +fi + +if [[ "${OS}" == "Mac" ]]; then + sudo xcode-select -s /Applications/Xcode_${xcodeVersion}.app/Contents/Developer + brew update +fi + +if [[ "${PLATFORM}" == "Desktop" ]]; then + if [[ "${OS}" == "Linux" ]]; then + VCPKG_TRIPLET="x64-linux" + elif [[ "${OS}" == "Mac" ]]; then + VCPKG_TRIPLET="x64-osx" + echo "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1" >> $GITHUB_ENV + elif [[ "${OS}" == "Windows" ]]; then + VCPKG_TRIPLET="x64-windows-static" + fi + echo "VCPKG_TRIPLET=${VCPKG_TRIPLET}" >> $GITHUB_ENV + echo "VCPKG_RESPONSE_FILE=external/vcpkg_${VCPKG_TRIPLET}_response_file.txt" >> $GITHUB_ENV + python scripts/gha/install_prereqs_desktop.py --gha_build --arch "${ARCH}" --ssl "${SSL}" ${TEST_ONLY} +fi + +if [[ "${TEST_ONLY}" == "" ]]; then + if [[ "${PLATFORM}" == "Android" ]]; then + echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV + echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV + build_scripts/android/install_prereqs.sh + elif [[ "${PLATFORM}" == "iOS" ]]; then + build_scripts/ios/install_prereqs.sh + elif [[ "${PLATFORM}" == "tvOS" ]]; then + build_scripts/tvos/install_prereqs.sh + fi +fi diff --git a/scripts/gha/requirements.txt b/scripts/gha/python_requirements.txt similarity index 100% rename from scripts/gha/requirements.txt rename to scripts/gha/python_requirements.txt index 5ec721cd3a..6541e322ff 100644 --- a/scripts/gha/requirements.txt +++ b/scripts/gha/python_requirements.txt @@ -1,4 +1,4 @@ -absl-py attrs +absl-py pytz requests From 5ad2bc1f859873671aab6c66f063070ac7eea773 Mon Sep 17 00:00:00 2001 From: Mou Date: Mon, 18 Jul 2022 13:07:30 -1000 Subject: [PATCH 2/4] install openssl for windows --- scripts/gha/install_prereqs_desktop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gha/install_prereqs_desktop.py b/scripts/gha/install_prereqs_desktop.py index 49452be9bc..d5214372b6 100644 --- a/scripts/gha/install_prereqs_desktop.py +++ b/scripts/gha/install_prereqs_desktop.py @@ -54,7 +54,7 @@ def main(): # brew install go utils.run_command(['brew', 'install', 'go']) - # Install openssl on linux/mac if its not installed already + # Install openssl if its not installed already if args.ssl == 'openssl' and not utils.is_command_installed('openssl'): if utils.is_linux_os(): # sudo apt install -y openssl @@ -62,6 +62,8 @@ def main(): elif utils.is_mac_os(): # brew install openssl utils.run_command(['brew', 'install', 'openssl']) + elif utils.is_windows_os(): + utils.run_command(['choco', 'install', 'openssl', '-r']) # Install ccache on linux/mac if its not installed already if not utils.is_command_installed('ccache'): From 9a7f716cd9221877997e99a9b910983d43783a8e Mon Sep 17 00:00:00 2001 From: Mou Date: Mon, 18 Jul 2022 13:23:55 -1000 Subject: [PATCH 3/4] force install openssl for windows --- scripts/gha/install_prereqs_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/install_prereqs_desktop.py b/scripts/gha/install_prereqs_desktop.py index d5214372b6..88ca21ed61 100644 --- a/scripts/gha/install_prereqs_desktop.py +++ b/scripts/gha/install_prereqs_desktop.py @@ -55,7 +55,7 @@ def main(): utils.run_command(['brew', 'install', 'go']) # Install openssl if its not installed already - if args.ssl == 'openssl' and not utils.is_command_installed('openssl'): + if args.ssl == 'openssl': if utils.is_linux_os(): # sudo apt install -y openssl utils.run_command(['apt', 'install', '-y','openssl'], as_root=True) From 4d542b557e0dc82a8f13bf9852815d7ca48d5f37 Mon Sep 17 00:00:00 2001 From: Mou Date: Tue, 19 Jul 2022 07:28:09 -1000 Subject: [PATCH 4/4] update name python_requirements.txt --- .github/workflows/checks_secure.yml | 2 +- .github/workflows/cpp-packaging.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks_secure.yml b/.github/workflows/checks_secure.yml index 997bb89ad3..7fd478f0f8 100644 --- a/.github/workflows/checks_secure.yml +++ b/.github/workflows/checks_secure.yml @@ -34,7 +34,7 @@ jobs: python-version: 3.7 - name: Install prerequisites if: steps.check.outputs.has-permission != 1 || github.event.pull_request.head.repo.full_name != github.repository - run: pip install -r scripts/gha/requirements.txt + run: pip install -r scripts/gha/python_requirements.txt - name: Dismiss reviews if: steps.check.outputs.has-permission != 1 || github.event.pull_request.head.repo.full_name != github.repository shell: bash diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 9cc495e8aa..6d74da9102 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -786,7 +786,7 @@ jobs: - name: Use GitHub API to start workflow shell: bash run: | - pip install -r scripts/gha/requirements.txt + pip install -r scripts/gha/python_requirements.txt if [[ -z ${USE_EXPANDED_MATRIX} ]]; then USE_EXPANDED_MATRIX=0 fi