From 5dd62cf8c2ae9040e8b4da8add9cd3f987442102 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 20:16:03 -0400 Subject: [PATCH 01/13] enable core/logs for mac and linux unit test crashes. --- .github/workflows/desktop.yml | 109 +++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 89a0f4dba2..9c22386381 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,9 +163,116 @@ jobs: find build -name "*.a" find build -name "*.so" - - name: Run tests + - name: Prep crash support (linux) + # Ensures directory structure is in place to capture core files on Linux. + if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + shell: bash + run: | + echo '/tmp/cores/core.%E' | sudo tee /proc/sys/kernel/core_pattern + sudo mkdir -p /tmp/cores/ + sudo rm -rf /tmp/cores/* + + - name: Prep crash support (mac) + # Ensures no lingering crashes from the previous run. + if: startsWith(matrix.os, 'macos') + run: | + rm -rf ~/Library/Logs/DiagnosticReports/* + + - name: Run tests (windows & macos) + if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') env: LANG: en_US run: | cd build ctest --verbose + + - name: Run tests (linux) + # Linux exists as its own standalone execution step in order to invoke + # platform-specific `ulimit` to enable crash collection. The ulimit + # command must be invoked in same shell instance of that runs the + # tests. + if: startsWith(matrix.os, 'ubuntu') + env: + LANG: en_US + run: | + ulimit -c unlimited + cd build + sudo ctest --verbose + + - name: Prep bins for achive (linux) + # Copies all of the binary files into one directory for ease in + # archiving. Directory contents are then marked readable for the + # archive step. + if: failure() && startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') ) + shell: bash + run: | + sudo rm -rf /tmp/bins/* || : + sudo mkdir -p /tmp/bins/ + sudo rm -rf ./build/app/tests/firebase_test + sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/ + sudo cp -f ./build/app/tests/firebase* /tmp/bins/ + sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/ + sudo cp -f ./build/auth/tests/firebase* /tmp/bins/ + sudo cp -f ./build/database/tests/firebase* /tmp/bins/ + sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/ + sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/ + sudo cp -f ./build/storage/tests/firebase* /tmp/bins/ + sudo chmod -R +rwx /tmp/bins/* || : + + - name: Prep crash data for archive (linux) + # Marks the contents of the core dump directory to be readable for the + # archiving step on linux. + shell: bash + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + run: | + sudo chmod -R +rwx /tmp/cores/* || : + + - name: Prep crash data for archive (macos) + # Freshly made diagnostic reports are marked as readable for + # the archive step. Note: for some reason /tmp/cores doesn't survive + # long enough for archiving on mac, so prep the DiagnosticReports + # directory instead. + shell: bash + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') + run: | + sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : + + # Crash Archives - matrix.generator includes spaces for the + # "Unix Makefiles" configuration so it cannot be used to name-mangle + # archive files. Instead there are different steps for Ninja & Makefile + # archive uploads. + - name: Archive crashes and binaries (linux - makefiles) + uses: actions/upload-artifact@v2 + if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + with: + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles + path: | + /tmp/cores/* + /tmp/bins/* + + - name: Archive crashes and binaries (linux - ninja ) + uses: actions/upload-artifact@v2 + if: failure() && startsWith(matrix.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + with: + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja + path: | + /tmp/cores/* + /tmp/bins/* + + - name: Archive crashes (mac - makefiles) + uses: actions/upload-artifact@v2 + if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') + with: + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles + path: | + ~/Library/Logs/DiagnosticReports/* + /tmp/bins/* + + - name: Archive crashes (mac - ninja) + uses: actions/upload-artifact@v2 + if: failure() && startsWith(matrix.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') + with: + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja + path: | + ~/Library/Logs/DiagnosticReports/* + /tmp/bins/* From 29cd3ce98b6f65e1ffee6199aea2e22f5bf1ce36 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 20:28:16 -0400 Subject: [PATCH 02/13] fixed some of the comments --- .github/workflows/desktop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 9c22386381..4f409df365 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -199,10 +199,10 @@ jobs: cd build sudo ctest --verbose - - name: Prep bins for achive (linux) + - name: Prep bins for archive (linux & macos) # Copies all of the binary files into one directory for ease in # archiving. Directory contents are then marked readable for the - # archive step. + # archive step (below). if: failure() && startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') ) shell: bash run: | From 4413bd0292055c72184e92250b6dfa7700d26c6b Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 21 Jul 2020 10:48:22 -0400 Subject: [PATCH 03/13] coalesced ninja/makefile archive steps. Updated binary directory copy --- .github/workflows/desktop.yml | 50 ++++++++--------------------------- 1 file changed, 11 insertions(+), 39 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 4f409df365..0f7c5900fc 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -51,6 +51,7 @@ jobs: echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}" + echo "::set-env name=BUILD_TYPE_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')" - name: Install Ninja (windows) if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows') @@ -199,24 +200,17 @@ jobs: cd build sudo ctest --verbose - - name: Prep bins for archive (linux & macos) + - name: Prep bins for achive (linux) # Copies all of the binary files into one directory for ease in # archiving. Directory contents are then marked readable for the - # archive step (below). + # archive step. if: failure() && startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') ) shell: bash run: | sudo rm -rf /tmp/bins/* || : sudo mkdir -p /tmp/bins/ sudo rm -rf ./build/app/tests/firebase_test - sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/ - sudo cp -f ./build/app/tests/firebase* /tmp/bins/ - sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/ - sudo cp -f ./build/auth/tests/firebase* /tmp/bins/ - sudo cp -f ./build/database/tests/firebase* /tmp/bins/ - sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/ - sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/ - sudo cp -f ./build/storage/tests/firebase* /tmp/bins/ + sudo cp -f ./build/*/tests/firebase* /tmp/bins sudo chmod -R +rwx /tmp/bins/* || : - name: Prep crash data for archive (linux) @@ -237,42 +231,20 @@ jobs: run: | sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : - # Crash Archives - matrix.generator includes spaces for the - # "Unix Makefiles" configuration so it cannot be used to name-mangle - # archive files. Instead there are different steps for Ninja & Makefile - # archive uploads. - - name: Archive crashes and binaries (linux - makefiles) + - name: Archive crashes and binaries (linux) uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') - with: - name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles - path: | - /tmp/cores/* - /tmp/bins/* - - - name: Archive crashes and binaries (linux - ninja ) - uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') with: - name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ env.BUILD_TYPE_NO_SPACES }} path: | /tmp/cores/* /tmp/bins/* - - name: Archive crashes (mac - makefiles) + - name: Archive crashes (mac) uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') - with: - name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles - path: | - ~/Library/Logs/DiagnosticReports/* - /tmp/bins/* - - - name: Archive crashes (mac - ninja) - uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') with: - name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ env.BUILD_TYPE_NO_SPACES }} path: | ~/Library/Logs/DiagnosticReports/* - /tmp/bins/* + /tmp/bins/* \ No newline at end of file From 90ccfebd1d74a477b792efe1282281cec79fe251 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 21 Jul 2020 13:06:16 -0400 Subject: [PATCH 04/13] prep crash data on mac for debug configurations only. --- .github/workflows/desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 0f7c5900fc..5d9de80b6e 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -175,7 +175,7 @@ jobs: - name: Prep crash support (mac) # Ensures no lingering crashes from the previous run. - if: startsWith(matrix.os, 'macos') + if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | rm -rf ~/Library/Logs/DiagnosticReports/* From b6e08bf9653a44e758f083300dee370b96294c93 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 21 Jul 2020 14:00:43 -0400 Subject: [PATCH 05/13] updated generator type name manging env varaible name. added comments. --- .github/workflows/desktop.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 5d9de80b6e..dce9174784 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -51,7 +51,10 @@ jobs: echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}" - echo "::set-env name=BUILD_TYPE_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')" + # Used to name mangle archive files in debug builds based on the + # build generator type. Required becasue the space in the + # "Unix Makefiles" generator type breaks the archive process. + echo "::set-env name=BUILD_GENERATOR_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')" - name: Install Ninja (windows) if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows') @@ -235,7 +238,7 @@ jobs: uses: actions/upload-artifact@v2 if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') with: - name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ env.BUILD_TYPE_NO_SPACES }} + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ env.BUILD_GENERATOR_NO_SPACES }} path: | /tmp/cores/* /tmp/bins/* @@ -244,7 +247,7 @@ jobs: uses: actions/upload-artifact@v2 if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') with: - name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ env.BUILD_TYPE_NO_SPACES }} + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ env.BUILD_GENERATOR_NO_SPACES }} path: | ~/Library/Logs/DiagnosticReports/* /tmp/bins/* \ No newline at end of file From b572565c2c9af91e8d65925c654d30f9c21fda56 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 21 Jul 2020 16:50:13 -0400 Subject: [PATCH 06/13] removed obsolete windows workflow. restricted triggers of desktop workflow --- .github/workflows/desktop.yml | 1 + .github/workflows/windows.yml | 91 ----------------------------------- 2 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index dce9174784..6d932ace56 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -3,6 +3,7 @@ name: Desktop Builds on: push: pull_request: + types: [opened, reopened, synchronize] env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 9ffa4ed390..0000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Windows Builds - -on: - push: - pull_request: - -jobs: - build: - name: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - runs-on: ${{ matrix.os }} - strategy: - # If any of the configurations fail, others will proceed to run - fail-fast: false - matrix: - os: [windows-latest,] - build_type: ["Release"] - architecture: ["x64",] - python_version: [2.7] - generator: ["Visual Studio 16 2019",] - include: - - os: windows-latest - architecture: "x64" - vcpkg_triplet: "x64-windows-static" - # For x64, this variable probably doesnt make sense but - # for x86, the command line argument to pass to cmake is -A Win32 and not -A x86 - msbuild_platform: "x64" - - steps: - # Check out with submodule (vcpkg is a submodule) - - uses: actions/checkout@v2 - with: - submodules: true - - - name: Set env variables for subsequent steps (all) - run: | - echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" - echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" - - - name: Install Ninja - if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows') - run: | - choco install ninja - - - name: Cache vcpkg C++ dependencies - id: cache_vcpkg - uses: actions/cache@v2 - with: - path: external/vcpkg/installed - key: dev-vcpkg-${{ matrix.vcpkg_triplet }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }} - - - name: Install vcpkg packages (windows) - if: steps.cache_vcpkg.outputs.cache-hit!='true' && startsWith(matrix.os, 'windows') - run: | - ${{ github.workspace }}/external/vcpkg/bootstrap-vcpkg.bat -disableMetrics - ${{ github.workspace }}/external/vcpkg/vcpkg install @${{env.VCPKG_RESPONSE_FILE}} - - - name: Setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python_version }} - architecture: ${{ matrix.architecture }} - - - name: Install pip packages - run: | - python -m pip install --upgrade pip - pip install -r ${{ env.PIP_REQUIREMENTS_FILE }} - - - name: Configure - shell: bash - run: | - mkdir build - cmake \ - -S . \ - -B build \ - -G "${{ matrix.generator }}" \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} \ - - - name: Build - shell: bash - run: cmake --build build --config ${{ matrix.build_type }} -j 8 - - - name: Print built libraries - shell: bash - run: | - find build -name "*.lib" - find build -name "*.dll" - find build -name "*.dylib" - find build -name "*.a" - find build -name "*.so" From 8db2803813183d2f4860bde2b95b5f5ccaf1a03b Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 21 Jul 2020 17:28:11 -0400 Subject: [PATCH 07/13] removed push from workflow triggers --- .github/workflows/desktop.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 6d932ace56..5fcb79d621 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -1,7 +1,6 @@ name: Desktop Builds on: - push: pull_request: types: [opened, reopened, synchronize] From 0bb877a5fb7cc46a37b5d05dd841ac2410df9458 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 22 Jul 2020 08:16:22 -0400 Subject: [PATCH 08/13] env variable for mac and linux only set for those build types --- .github/workflows/desktop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 5fcb79d621..e03141f706 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -51,6 +51,10 @@ jobs: echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}" + + - name: Set additional env variables for subsequent steps (mac and linux) + if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'windows')!='true' + run | # Used to name mangle archive files in debug builds based on the # build generator type. Required becasue the space in the # "Unix Makefiles" generator type breaks the archive process. From 7be224a8db493706c11bf1a90c67279bd8f35e86 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 22 Jul 2020 10:01:24 -0400 Subject: [PATCH 09/13] branch push wasn't updating CI commit pointer --- .github/workflows/desktop.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index e03141f706..44e18e6671 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -1,8 +1,6 @@ name: Desktop Builds -on: - pull_request: - types: [opened, reopened, synchronize] +on: [push, pull_request] env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir From 6cdb9c0e1f5a34e933c0fd02025d447df4234a6d Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 22 Jul 2020 10:11:20 -0400 Subject: [PATCH 10/13] errant comment position --- .github/workflows/desktop.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 44e18e6671..4d0b12c6b6 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -1,6 +1,8 @@ name: Desktop Builds -on: [push, pull_request] +on: + pull_request: + types: [opened, reopened, synchronize] env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir @@ -51,11 +53,11 @@ jobs: echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}" - name: Set additional env variables for subsequent steps (mac and linux) + # Used to name mangle archive files in debug builds based on the + # build generator type. Required becasue the space in the + # "Unix Makefiles" generator type breaks the archive process. if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'windows')!='true' run | - # Used to name mangle archive files in debug builds based on the - # build generator type. Required becasue the space in the - # "Unix Makefiles" generator type breaks the archive process. echo "::set-env name=BUILD_GENERATOR_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')" - name: Install Ninja (windows) From 0f2a21fe48ee2cff063afc4f10e884414e80abee Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 22 Jul 2020 10:14:19 -0400 Subject: [PATCH 11/13] missing a : on a run command --- .github/workflows/desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 4d0b12c6b6..6a18a1eb84 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -57,7 +57,7 @@ jobs: # build generator type. Required becasue the space in the # "Unix Makefiles" generator type breaks the archive process. if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'windows')!='true' - run | + run: | echo "::set-env name=BUILD_GENERATOR_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')" - name: Install Ninja (windows) From e69bcfd5b89cdb4059dfe4284c824fb269e7d587 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 22 Jul 2020 10:25:03 -0400 Subject: [PATCH 12/13] boolean statement didn't correctly detect non windows platforms --- .github/workflows/desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 6a18a1eb84..975e1af3b5 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -56,7 +56,7 @@ jobs: # Used to name mangle archive files in debug builds based on the # build generator type. Required becasue the space in the # "Unix Makefiles" generator type breaks the archive process. - if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'windows')!='true' + if: startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') ) run: | echo "::set-env name=BUILD_GENERATOR_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')" From 4569573cac7582c396ae5c10ca0a6e1b90170f93 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 22 Jul 2020 10:40:02 -0400 Subject: [PATCH 13/13] suppress bash command from running on windows --- .github/workflows/desktop.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 975e1af3b5..6ce5bc07ed 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -51,12 +51,12 @@ jobs: echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt" echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}" - + + # Used to name mangle archive files in debug builds based on the + # build generator type. Required becasue the space in the + # "Unix Makefiles" generator type breaks the archive process. - name: Set additional env variables for subsequent steps (mac and linux) - # Used to name mangle archive files in debug builds based on the - # build generator type. Required becasue the space in the - # "Unix Makefiles" generator type breaks the archive process. - if: startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') ) + if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') run: | echo "::set-env name=BUILD_GENERATOR_NO_SPACES::$(echo -e "${{matrix.generator}}" | tr -d '[:space:]')"