From 54c238063302ef14a7c603902433a71d989fd5e0 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 11:32:47 -0400 Subject: [PATCH 01/71] desktop workflow config to create cores, and use upload-artfiacts@v2 --- .github/workflows/desktop.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 89a0f4dba2..c0d5377648 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,5 +167,13 @@ jobs: env: LANG: en_US run: | + ulimit -c unlimited # Enable crash dumps cd build - ctest --verbose + sudo ctest --verbose + sudo chmod -R +rwx /cores/* + + - name: Archive crashes + uses: actions/upload-artifact@v2 + with: + name: crashes + path: /cores \ No newline at end of file From d77f33b1a319bda5653c58c74d09651dc4d82f0d Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 11:41:07 -0400 Subject: [PATCH 02/71] test access to cores directory --- .github/workflows/desktop.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index c0d5377648..6acb1bc80d 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,6 +163,11 @@ jobs: find build -name "*.a" find build -name "*.so" + - name: test access to core dump directory + sudo touch /cores/test + ls /cores + sudo rm /cores/test + - name: Run tests env: LANG: en_US From 4b8441b2c6598b9baa92dd4a6655eca8c6edd4ec Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 11:44:01 -0400 Subject: [PATCH 03/71] indentation problem --- .github/workflows/desktop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 6acb1bc80d..51a8a11a20 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -164,9 +164,9 @@ jobs: find build -name "*.so" - name: test access to core dump directory - sudo touch /cores/test - ls /cores - sudo rm /cores/test + sudo touch /cores/test + ls /cores + sudo rm /cores/test - name: Run tests env: From 67a02a55b32998daae583b558e1a62634fe35a3c Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 11:45:08 -0400 Subject: [PATCH 04/71] test cores dir run command --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 51a8a11a20..87c91758d0 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -164,6 +164,7 @@ jobs: find build -name "*.so" - name: test access to core dump directory + run: | sudo touch /cores/test ls /cores sudo rm /cores/test From debc485c9d96af091684945bd74a048263fecb23 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 13:25:32 -0400 Subject: [PATCH 05/71] determining if the crash location is /var/crash --- .github/workflows/desktop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 87c91758d0..1e14157e6d 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -165,6 +165,10 @@ jobs: - name: test access to core dump directory run: | + ls /var/crash + sudo touch /var/crash/test + ls /var/crash + cat /proc/sys/kernel/core_pattern sudo touch /cores/test ls /cores sudo rm /cores/test From 94a576a423b9448ad75661d39c1e69058ba1eaa0 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 13:53:35 -0400 Subject: [PATCH 06/71] added shell declaration to test --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 1e14157e6d..c5367319b1 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -164,6 +164,7 @@ jobs: find build -name "*.so" - name: test access to core dump directory + shell: bash run: | ls /var/crash sudo touch /var/crash/test From 4a17399a6a73f990d0547495f6fb026976c7f670 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Tue, 14 Jul 2020 17:03:18 -0400 Subject: [PATCH 07/71] Continued core path sleuthing --- .github/workflows/desktop.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index c5367319b1..1ea270f074 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -166,10 +166,9 @@ jobs: - name: test access to core dump directory shell: bash run: | - ls /var/crash - sudo touch /var/crash/test - ls /var/crash + coredumpctl cat /proc/sys/kernel/core_pattern + ls -l /var/lib/systemd/coredump/ sudo touch /cores/test ls /cores sudo rm /cores/test From 2e0207d1d8d542bdd5d4b614740ff7248351339a Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:16:17 -0400 Subject: [PATCH 08/71] attempting to query cores directory via cat /proc/sys/kernel/core_pattern --- .github/workflows/desktop.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 1ea270f074..65d148fc64 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -166,13 +166,8 @@ jobs: - name: test access to core dump directory shell: bash run: | - coredumpctl cat /proc/sys/kernel/core_pattern - ls -l /var/lib/systemd/coredump/ - sudo touch /cores/test - ls /cores - sudo rm /cores/test - + - name: Run tests env: LANG: en_US From 6f411fa0544ad01f31a07341aacd052d75236be4 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:23:06 -0400 Subject: [PATCH 09/71] checking for apport crash results directory --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 65d148fc64..ad06c1b7f9 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,6 +167,7 @@ jobs: shell: bash run: | cat /proc/sys/kernel/core_pattern + ls -l /var/crash/ - name: Run tests env: From 095206ae149725a5a856edab1492038e9caa68e3 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:34:42 -0400 Subject: [PATCH 10/71] updated archive to the /var/crash apport directory --- .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 ad06c1b7f9..7ea8ce258e 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -176,10 +176,10 @@ jobs: ulimit -c unlimited # Enable crash dumps cd build sudo ctest --verbose - sudo chmod -R +rwx /cores/* + sudo chmod -R +rwx /var/crash/* - name: Archive crashes uses: actions/upload-artifact@v2 with: name: crashes - path: /cores \ No newline at end of file + path: /var/crash/ \ No newline at end of file From 4757f8b3452ccec8f5a60a349aee838d669cd774 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:42:16 -0400 Subject: [PATCH 11/71] start the apport service --- .github/workflows/desktop.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 7ea8ce258e..b9589b3b72 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,11 +163,11 @@ jobs: find build -name "*.a" find build -name "*.so" - - name: test access to core dump directory + - name: enable apport shell: bash run: | - cat /proc/sys/kernel/core_pattern - ls -l /var/crash/ + sudo service apport start + sudo chmod -R +rwx /var/crash/* - name: Run tests env: @@ -176,7 +176,7 @@ jobs: ulimit -c unlimited # Enable crash dumps cd build sudo ctest --verbose - sudo chmod -R +rwx /var/crash/* + - name: Archive crashes uses: actions/upload-artifact@v2 From 2d671071e21b1e8c076890d38590e36067b81551 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:48:10 -0400 Subject: [PATCH 12/71] manually create the crash directory --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index b9589b3b72..28429f456e 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,6 +167,7 @@ jobs: shell: bash run: | sudo service apport start + mkdir /var/crash sudo chmod -R +rwx /var/crash/* - name: Run tests From 0614f734e6b09ede227841c97159daef3139b32a Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:55:45 -0400 Subject: [PATCH 13/71] apport usage linux only --- .github/workflows/desktop.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 28429f456e..f3d4fae7cf 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,8 +163,9 @@ jobs: find build -name "*.a" find build -name "*.so" - - name: enable apport + - name: enable apport (linux) shell: bash + if: startsWith(matrix.os, 'ubuntu') run: | sudo service apport start mkdir /var/crash @@ -179,8 +180,9 @@ jobs: sudo ctest --verbose - - name: Archive crashes + - name: Archive crashes (linux) uses: actions/upload-artifact@v2 + if: startsWith(matrix.os, 'ubuntu') with: name: crashes path: /var/crash/ \ No newline at end of file From 0fcfdef4e96536f66f48abc7627fa874e815e570 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 10:58:35 -0400 Subject: [PATCH 14/71] apport usage linux only 2 --- .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 f3d4fae7cf..d8259fa57f 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -185,4 +185,4 @@ jobs: if: startsWith(matrix.os, 'ubuntu') with: name: crashes - path: /var/crash/ \ No newline at end of file + path: /var/crash/ From c9826eb9bd8c55a26b930654dde93a90a765ef3f Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 11:10:24 -0400 Subject: [PATCH 15/71] attempting to kickstart the actions --- .github/workflows/desktop.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index d8259fa57f..b8967ae556 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -178,11 +178,3 @@ jobs: ulimit -c unlimited # Enable crash dumps cd build sudo ctest --verbose - - - - name: Archive crashes (linux) - uses: actions/upload-artifact@v2 - if: startsWith(matrix.os, 'ubuntu') - with: - name: crashes - path: /var/crash/ From 287b640a9de4812c84edc163f49a531431513178 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 11:13:39 -0400 Subject: [PATCH 16/71] revert ifs --- .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 b8967ae556..b9dacb1d05 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -165,7 +165,6 @@ jobs: - name: enable apport (linux) shell: bash - if: startsWith(matrix.os, 'ubuntu') run: | sudo service apport start mkdir /var/crash @@ -178,3 +177,4 @@ jobs: ulimit -c unlimited # Enable crash dumps cd build sudo ctest --verbose + From 60cac166dd3b99c9e8703b226c14ff39fcf7e0b9 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 12:56:01 -0400 Subject: [PATCH 17/71] added back the ifs. There was a github outage --- .github/workflows/desktop.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index b9dacb1d05..d8259fa57f 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -165,6 +165,7 @@ jobs: - name: enable apport (linux) shell: bash + if: startsWith(matrix.os, 'ubuntu') run: | sudo service apport start mkdir /var/crash @@ -178,3 +179,10 @@ jobs: cd build sudo ctest --verbose + + - name: Archive crashes (linux) + uses: actions/upload-artifact@v2 + if: startsWith(matrix.os, 'ubuntu') + with: + name: crashes + path: /var/crash/ From 3926b9a5bff65014f7d252741fbcc8617994898b Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 13:15:35 -0400 Subject: [PATCH 18/71] silently fail if crash directory already exists --- .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 d8259fa57f..04de1672b8 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -168,7 +168,7 @@ jobs: if: startsWith(matrix.os, 'ubuntu') run: | sudo service apport start - mkdir /var/crash + mkdir -p /var/crash sudo chmod -R +rwx /var/crash/* - name: Run tests From c1a19e8e3f706ccbd4718d69af8d9bc11327bbad Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 13:34:55 -0400 Subject: [PATCH 19/71] attempt to silently faily chmod if there are no crashes to mark as readable. --- .github/workflows/desktop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 04de1672b8..2087e31087 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -169,8 +169,7 @@ jobs: run: | sudo service apport start mkdir -p /var/crash - sudo chmod -R +rwx /var/crash/* - + - name: Run tests env: LANG: en_US @@ -178,7 +177,8 @@ jobs: ulimit -c unlimited # Enable crash dumps cd build sudo ctest --verbose - + # || : silently fails if there are no crashes. + sudo chmod -R +rwx /var/crash/* || : - name: Archive crashes (linux) uses: actions/upload-artifact@v2 From 50b6b74fe2fe19c94a91e6e021d2cc29ab265bda Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 14:23:45 -0400 Subject: [PATCH 20/71] linux-only build step for ulimit command support --- .github/workflows/desktop.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 2087e31087..59ad2595be 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -170,7 +170,8 @@ jobs: sudo service apport start mkdir -p /var/crash - - name: Run tests + - name: Run tests (linux) + if: startsWith(matrix.os, 'ubuntu') env: LANG: en_US run: | @@ -179,7 +180,15 @@ jobs: sudo ctest --verbose # || : silently fails if there are no crashes. sudo chmod -R +rwx /var/crash/* || : - + + - name: Run tests + if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') + env: + LANG: en_US + run: | + cd build + sudo ctest --verbose + - name: Archive crashes (linux) uses: actions/upload-artifact@v2 if: startsWith(matrix.os, 'ubuntu') From 2989054ec0ab9a45a683378404357098297852fd Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 14:24:10 -0400 Subject: [PATCH 21/71] linux-only build step for ulimit command support --- .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 59ad2595be..ef148ef971 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -181,7 +181,7 @@ jobs: # || : silently fails if there are no crashes. sudo chmod -R +rwx /var/crash/* || : - - name: Run tests + - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') env: LANG: en_US From 5c6a3e1757263524634145418a55d678aa7155c6 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 14:51:06 -0400 Subject: [PATCH 22/71] remove sudo from windows/mac ctest 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 ef148ef971..ad01e4c86f 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -187,7 +187,7 @@ jobs: LANG: en_US run: | cd build - sudo ctest --verbose + ctest --verbose - name: Archive crashes (linux) uses: actions/upload-artifact@v2 From fd0fedfcd59524dfe44a831d03bb5e4e7ff4130d Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 16:13:43 -0400 Subject: [PATCH 23/71] force a crash --- auth/tests/desktop/auth_desktop_test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auth/tests/desktop/auth_desktop_test.cc b/auth/tests/desktop/auth_desktop_test.cc index 9445b930f4..fd150b68f6 100644 --- a/auth/tests/desktop/auth_desktop_test.cc +++ b/auth/tests/desktop/auth_desktop_test.cc @@ -295,6 +295,9 @@ TEST_F(AuthDesktopTest, EXPECT_EQ(future.error(), kAuthErrorUnimplemented); EXPECT_EQ(std::string(future.error_message()), "Operation is not supported on non-mobile systems."); + + int value = 1 / 0; + printf("value: %d\n", value); } TEST_F(AuthDesktopTest, From fe4852c4f7c4ddf50994d63130fb076569ff3822 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 16:39:28 -0400 Subject: [PATCH 24/71] force a crash --- auth/tests/desktop/auth_desktop_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/auth/tests/desktop/auth_desktop_test.cc b/auth/tests/desktop/auth_desktop_test.cc index fd150b68f6..26e73f1897 100644 --- a/auth/tests/desktop/auth_desktop_test.cc +++ b/auth/tests/desktop/auth_desktop_test.cc @@ -296,7 +296,11 @@ TEST_F(AuthDesktopTest, EXPECT_EQ(std::string(future.error_message()), "Operation is not supported on non-mobile systems."); - int value = 1 / 0; + int value = 0; + int* value_ptr = &value; + value_ptr = NULL; + delete value_ptr; + printf("value: %d\n", value); } From a01240e6774d907368e7b79aa268c6e5a9447cca Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 16:42:17 -0400 Subject: [PATCH 25/71] add always() to the archive upload step --- .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 ad01e4c86f..2f570e3a45 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -191,7 +191,7 @@ jobs: - name: Archive crashes (linux) uses: actions/upload-artifact@v2 - if: startsWith(matrix.os, 'ubuntu') + if: always() && startsWith(matrix.os, 'ubuntu') with: name: crashes path: /var/crash/ From 1be3d079406ab0fdfb2bf34ddf4b27a587bb4e9b Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 16:58:42 -0400 Subject: [PATCH 26/71] more fire for the crash --- auth/tests/desktop/auth_desktop_test.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/auth/tests/desktop/auth_desktop_test.cc b/auth/tests/desktop/auth_desktop_test.cc index 26e73f1897..4dc914ac97 100644 --- a/auth/tests/desktop/auth_desktop_test.cc +++ b/auth/tests/desktop/auth_desktop_test.cc @@ -297,9 +297,8 @@ TEST_F(AuthDesktopTest, "Operation is not supported on non-mobile systems."); int value = 0; - int* value_ptr = &value; - value_ptr = NULL; - delete value_ptr; + int* value_ptr = NULL; + *value_ptr = value; printf("value: %d\n", value); } From 97bb50887b38023f50db706ba45b496730acd743 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 17:13:59 -0400 Subject: [PATCH 27/71] override cores handling away from apport --- .github/workflows/desktop.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 2f570e3a45..8e2ffd0d83 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,12 +163,12 @@ jobs: find build -name "*.a" find build -name "*.so" - - name: enable apport (linux) + - name: enable crash support (linux) shell: bash if: startsWith(matrix.os, 'ubuntu') run: | - sudo service apport start - mkdir -p /var/crash + echo '/cores/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern + mkdir -p /cores - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') @@ -194,4 +194,4 @@ jobs: if: always() && startsWith(matrix.os, 'ubuntu') with: name: crashes - path: /var/crash/ + path: /cores/ From 2c6a072f93ecd373faf5c2e20418c1f54a755855 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 17:17:10 -0400 Subject: [PATCH 28/71] sudo cores directory creation --- .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 8e2ffd0d83..ac182bc555 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -168,14 +168,14 @@ jobs: if: startsWith(matrix.os, 'ubuntu') run: | echo '/cores/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern - mkdir -p /cores + sudo mkdir -p /cores - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') env: LANG: en_US run: | - ulimit -c unlimited # Enable crash dumps + ulimit -c unlimited # Enable unlimited crash dumps cd build sudo ctest --verbose # || : silently fails if there are no crashes. From 9740358bf361404f05e841ca5ab75792bf6fe010 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 17:21:25 -0400 Subject: [PATCH 29/71] oops. Enable read on /cores --- .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 ac182bc555..83db7ef5db 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -179,7 +179,7 @@ jobs: cd build sudo ctest --verbose # || : silently fails if there are no crashes. - sudo chmod -R +rwx /var/crash/* || : + sudo chmod -R +rwx /cores || : - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') From b2fdb5ecd33afe286caa3907a8e4f6c6cf8418f7 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Wed, 15 Jul 2020 17:26:09 -0400 Subject: [PATCH 30/71] oops. Enable read on /cores 2 --- .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 83db7ef5db..97bb38098b 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -179,7 +179,7 @@ jobs: cd build sudo ctest --verbose # || : silently fails if there are no crashes. - sudo chmod -R +rwx /cores || : + sudo chmod -R +rwx /cores/* || : - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') From 75ec1fcce4c6647ab8e92eb32ed8b4332e63966d Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 10:22:21 -0400 Subject: [PATCH 31/71] moved chmod command to its own step. --- .github/workflows/desktop.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 97bb38098b..3027880062 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -169,6 +169,7 @@ jobs: run: | echo '/cores/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern sudo mkdir -p /cores + rm -rf /cores/* - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') @@ -178,8 +179,13 @@ jobs: ulimit -c unlimited # Enable unlimited crash dumps cd build sudo ctest --verbose - # || : silently fails if there are no crashes. + + - name: Apply Read Permissions to crash reports (linux) + shell: bash + if: always() && startsWith(matrix.os, 'ubuntu') + run: | sudo chmod -R +rwx /cores/* || : + ls -l /cores/ - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') @@ -194,4 +200,4 @@ jobs: if: always() && startsWith(matrix.os, 'ubuntu') with: name: crashes - path: /cores/ + path: /cores/* \ No newline at end of file From e7b151761e291a72dc427fe2ed182802bc2de6fb Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 11:23:03 -0400 Subject: [PATCH 32/71] attempt tmp directory for cores --- .github/workflows/desktop.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 3027880062..96d77df115 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,9 +167,10 @@ jobs: shell: bash if: startsWith(matrix.os, 'ubuntu') run: | - echo '/cores/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern - sudo mkdir -p /cores - rm -rf /cores/* + echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern + cat /proc/sys/kernel/core_pattern + sudo mkdir -p /tmp/cores + sudo rm -rf /tmp/cores/* - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') @@ -177,6 +178,7 @@ jobs: LANG: en_US run: | ulimit -c unlimited # Enable unlimited crash dumps + cat /proc/sys/kernel/core_pattern cd build sudo ctest --verbose @@ -184,8 +186,8 @@ jobs: shell: bash if: always() && startsWith(matrix.os, 'ubuntu') run: | - sudo chmod -R +rwx /cores/* || : - ls -l /cores/ + sudo chmod -R +rwx /tmp/cores/* || : + ls -l /tmp/cores/ - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') @@ -200,4 +202,4 @@ jobs: if: always() && startsWith(matrix.os, 'ubuntu') with: name: crashes - path: /cores/* \ No newline at end of file + path: /tmp/cores/* \ No newline at end of file From d40a370efe061dcb842d25eb78e87b413a36203f Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 11:23:31 -0400 Subject: [PATCH 33/71] some more debug output for enable crash report step --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 96d77df115..d9f4547cb2 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,6 +167,7 @@ jobs: shell: bash if: startsWith(matrix.os, 'ubuntu') run: | + cat /proc/sys/kernel/core_pattern echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern cat /proc/sys/kernel/core_pattern sudo mkdir -p /tmp/cores From 24f845232409a2cb3c67e506f40ff06130c7c03a Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 11:40:11 -0400 Subject: [PATCH 34/71] reattempt apport --- .github/workflows/desktop.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index d9f4547cb2..db7b6ead00 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,11 +167,15 @@ jobs: shell: bash if: startsWith(matrix.os, 'ubuntu') run: | - cat /proc/sys/kernel/core_pattern - echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern - cat /proc/sys/kernel/core_pattern - sudo mkdir -p /tmp/cores - sudo rm -rf /tmp/cores/* + sudo systemctl enable apport.service + sudo mkdir -p /var/crashes + sudo rm -rf /var/crashes/* + +# cat /proc/sys/kernel/core_pattern +# echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern +# cat /proc/sys/kernel/core_pattern +# sudo mkdir -p /tmp/cores +# sudo rm -rf /tmp/cores/* - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') @@ -189,6 +193,8 @@ jobs: run: | sudo chmod -R +rwx /tmp/cores/* || : ls -l /tmp/cores/ + sudo chmod -R +rwx /var/crashes/* || : + ls -l /var/crashes - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') @@ -203,4 +209,6 @@ jobs: if: always() && startsWith(matrix.os, 'ubuntu') with: name: crashes - path: /tmp/cores/* \ No newline at end of file + path: /var/crashes/* + +#path: /tmp/cores/* \ No newline at end of file From c809bf2dfb594975f2e564bfcb16e62aca1d67ac Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 13:51:01 -0400 Subject: [PATCH 35/71] conditional on failure. upload bins, too --- .github/workflows/desktop.yml | 61 +++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index db7b6ead00..9e5bec9c33 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,38 +163,58 @@ jobs: find build -name "*.a" find build -name "*.so" - - name: enable crash support (linux) - shell: bash + - name: Enable crash support (linux) if: startsWith(matrix.os, 'ubuntu') + shell: bash run: | - sudo systemctl enable apport.service - sudo mkdir -p /var/crashes - sudo rm -rf /var/crashes/* - -# cat /proc/sys/kernel/core_pattern -# echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern -# cat /proc/sys/kernel/core_pattern -# sudo mkdir -p /tmp/cores -# sudo rm -rf /tmp/cores/* + echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern + sudo mkdir -p /tmp/cores + sudo rm -rf /tmp/cores/* + sudo mkdir /tmp/bins + sudo rm -rf /tmp/bins/* - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') env: LANG: en_US run: | - ulimit -c unlimited # Enable unlimited crash dumps + ulimit -c unlimited cat /proc/sys/kernel/core_pattern cd build sudo ctest --verbose - - name: Apply Read Permissions to crash reports (linux) + - name: Copy test bins (linux) + if: failure() && startsWith(matrix.os, 'ubuntu') shell: bash - if: always() && startsWith(matrix.os, 'ubuntu') + run: | + cp -f ./build/analytics/tests/* /tmp/bins + cp -f ./build/app/tests/* /tmp/bins + cp -f ./build/app/rest/tests/* /tmp/bins + cp -f ./build/auth/tests/* /tmp/bins + cp -f ./build/database/tests/* /tmp/bins + cp -f ./build/instance_id/tests/* /tmp/bins + cp -f ./build/messaging/tests/* /tmp/bins + cp -f ./build/remote_config/tests/* /tmp/bins + cp -f ./build/storage/tests/* /tmp/bins + + - name: Apply Read Permissions to crash data (linux) + shell: bash + if: failure() && startsWith(matrix.os, 'ubuntu') run: | sudo chmod -R +rwx /tmp/cores/* || : ls -l /tmp/cores/ - sudo chmod -R +rwx /var/crashes/* || : - ls -l /var/crashes + sudo chmod -R +rwx /tmp/bins/* || : + ls -l /tmp/bins/ + + - name: Archive crashes (linux) + uses: actions/upload-artifact@v2 + if: failure() && startsWith(matrix.os, 'ubuntu') + with: + name: crashes + path: | + /tmp/cores/ + /tmp/bins/ + - name: Run tests (windows & macos) if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') @@ -203,12 +223,5 @@ jobs: run: | cd build ctest --verbose - - - name: Archive crashes (linux) - uses: actions/upload-artifact@v2 - if: always() && startsWith(matrix.os, 'ubuntu') - with: - name: crashes - path: /var/crashes/* - + #path: /tmp/cores/* \ No newline at end of file From c4a9858839ece865cd886f02296dfce650d8d3e3 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 14:07:35 -0400 Subject: [PATCH 36/71] mac initial attempt, plus linux binary copy sudos --- .github/workflows/desktop.yml | 40 ++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 9e5bec9c33..fcc25e0b7b 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -171,6 +171,7 @@ jobs: sudo mkdir -p /tmp/cores sudo rm -rf /tmp/cores/* sudo mkdir /tmp/bins + sudo chmod -R +rwx /tmp/bins/ sudo rm -rf /tmp/bins/* - name: Run tests (linux) @@ -187,15 +188,15 @@ jobs: if: failure() && startsWith(matrix.os, 'ubuntu') shell: bash run: | - cp -f ./build/analytics/tests/* /tmp/bins - cp -f ./build/app/tests/* /tmp/bins - cp -f ./build/app/rest/tests/* /tmp/bins - cp -f ./build/auth/tests/* /tmp/bins - cp -f ./build/database/tests/* /tmp/bins - cp -f ./build/instance_id/tests/* /tmp/bins - cp -f ./build/messaging/tests/* /tmp/bins - cp -f ./build/remote_config/tests/* /tmp/bins - cp -f ./build/storage/tests/* /tmp/bins + sudo cp -f ./build/analytics/tests/* /tmp/bins + sudo cp -f ./build/app/tests/* /tmp/bins + sudo cp -f ./build/app/rest/tests/* /tmp/bins + sudo cp -f ./build/auth/tests/* /tmp/bins + sudo cp -f ./build/database/tests/* /tmp/bins + sudo cp -f ./build/instance_id/tests/* /tmp/bins + sudo cp -f ./build/messaging/tests/* /tmp/bins + sudo cp -f ./build/remote_config/tests/* /tmp/bins + sudo cp -f ./build/storage/tests/* /tmp/bins - name: Apply Read Permissions to crash data (linux) shell: bash @@ -215,7 +216,11 @@ jobs: /tmp/cores/ /tmp/bins/ - + - name: Enable crash support (mac) + 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: @@ -223,5 +228,20 @@ jobs: run: | cd build ctest --verbose + + - name: Apply Read Permissions to crash data (macos) + shell: bash + if: failure() && startsWith(matrix.os, 'macos') + run: | + sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : + ls -l ~/Library/Logs/DiagnosticReports/ + + - name: Archive crashes (mac) + uses: actions/upload-artifact@v2 + if: failure() && startsWith(matrix.os, 'macos') + with: + name: crashes + path: ~/Library/Logs/DiagnosticReports/* + #path: /tmp/cores/* \ No newline at end of file From 237e7c97ad2a855d9e1a79f4b8cc72fa3a2a007a Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 14:29:17 -0400 Subject: [PATCH 37/71] updated copy paths for binaries on linux --- .github/workflows/desktop.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index fcc25e0b7b..9e5a3d9e9d 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -170,7 +170,7 @@ jobs: echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern sudo mkdir -p /tmp/cores sudo rm -rf /tmp/cores/* - sudo mkdir /tmp/bins + sudo mkdir -p /tmp/bins sudo chmod -R +rwx /tmp/bins/ sudo rm -rf /tmp/bins/* @@ -188,15 +188,16 @@ jobs: if: failure() && startsWith(matrix.os, 'ubuntu') shell: bash run: | - sudo cp -f ./build/analytics/tests/* /tmp/bins - sudo cp -f ./build/app/tests/* /tmp/bins - sudo cp -f ./build/app/rest/tests/* /tmp/bins - sudo cp -f ./build/auth/tests/* /tmp/bins - sudo cp -f ./build/database/tests/* /tmp/bins - sudo cp -f ./build/instance_id/tests/* /tmp/bins - sudo cp -f ./build/messaging/tests/* /tmp/bins - sudo cp -f ./build/remote_config/tests/* /tmp/bins - sudo cp -f ./build/storage/tests/* /tmp/bins + cp -f ./build/analytics/tests/firebase* /tmp/bins + cp -f ./build/app/tests/firebase* /tmp/bins + cp -f ./build/app/rest/tests/firebase* /tmp/bins + cp -f ./build/auth/tests/firebase* /tmp/bins + cp -f ./build/database/tests/*firebase /tmp/bins + cp -f ./build/database/tests/firebase* /tmp/bins + cp -f ./build/instance_id/tests/firebase* /tmp/bins + cp -f ./build/messaging/tests/firebase* /tmp/bins + cp -f ./build/remote_config/tests/firebase* /tmp/bins + cp -f ./build/storage/tests/firebase* /tmp/bins - name: Apply Read Permissions to crash data (linux) shell: bash From bc565fc10e79db31bc04d609f2d339300c7632dd Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 14:43:32 -0400 Subject: [PATCH 38/71] adding write access to bin directory --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 9e5a3d9e9d..9c765e4e6d 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -188,6 +188,7 @@ jobs: if: failure() && startsWith(matrix.os, 'ubuntu') shell: bash run: | + sudo chmod -R +rwx /tmp/bins/* || : cp -f ./build/analytics/tests/firebase* /tmp/bins cp -f ./build/app/tests/firebase* /tmp/bins cp -f ./build/app/rest/tests/firebase* /tmp/bins From 678737dd0350bfef7cf26f921298e0c9cd34cc8d Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 15:16:18 -0400 Subject: [PATCH 39/71] create /tmp/bins directory only on failure --- .github/workflows/desktop.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 9c765e4e6d..0a69f7fe20 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -170,9 +170,6 @@ jobs: echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern sudo mkdir -p /tmp/cores sudo rm -rf /tmp/cores/* - sudo mkdir -p /tmp/bins - sudo chmod -R +rwx /tmp/bins/ - sudo rm -rf /tmp/bins/* - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') @@ -188,17 +185,19 @@ jobs: if: failure() && startsWith(matrix.os, 'ubuntu') shell: bash run: | + sudo mkdir -p /tmp/bins + sudo rm -rf /tmp/bins/* + 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/database/tests/firebase* /tmp/bins + sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins + sudo cp -f ./build/messaging/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/* || : - cp -f ./build/analytics/tests/firebase* /tmp/bins - cp -f ./build/app/tests/firebase* /tmp/bins - cp -f ./build/app/rest/tests/firebase* /tmp/bins - cp -f ./build/auth/tests/firebase* /tmp/bins - cp -f ./build/database/tests/*firebase /tmp/bins - cp -f ./build/database/tests/firebase* /tmp/bins - cp -f ./build/instance_id/tests/firebase* /tmp/bins - cp -f ./build/messaging/tests/firebase* /tmp/bins - cp -f ./build/remote_config/tests/firebase* /tmp/bins - cp -f ./build/storage/tests/firebase* /tmp/bins - name: Apply Read Permissions to crash data (linux) shell: bash From f5877fa28085710455c5240562e7f17978c791b0 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 15:37:30 -0400 Subject: [PATCH 40/71] remove build/app/tests/firebase_tests directory as it causes cp errors --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 0a69f7fe20..f627bf2815 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -187,6 +187,7 @@ jobs: run: | sudo mkdir -p /tmp/bins sudo rm -rf /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 From b09110be61e1d9388d3e64a7eaaf9c73e9bc6fa6 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 16:17:57 -0400 Subject: [PATCH 41/71] artifacts only for debug builds. fixed binary path for database --- .github/workflows/desktop.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index f627bf2815..932f452093 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -164,7 +164,7 @@ jobs: find build -name "*.so" - name: Enable crash support (linux) - if: startsWith(matrix.os, 'ubuntu') + if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern @@ -182,7 +182,7 @@ jobs: sudo ctest --verbose - name: Copy test bins (linux) - if: failure() && startsWith(matrix.os, 'ubuntu') + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | sudo mkdir -p /tmp/bins @@ -192,7 +192,7 @@ jobs: 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/database/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/messaging/tests/firebase* /tmp/bins @@ -202,16 +202,16 @@ jobs: - name: Apply Read Permissions to crash data (linux) shell: bash - if: failure() && startsWith(matrix.os, 'ubuntu') + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | sudo chmod -R +rwx /tmp/cores/* || : ls -l /tmp/cores/ sudo chmod -R +rwx /tmp/bins/* || : ls -l /tmp/bins/ - - name: Archive crashes (linux) + - name: Archive crashes and binaries (linux) uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.os, 'ubuntu') + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') with: name: crashes path: | @@ -233,7 +233,7 @@ jobs: - name: Apply Read Permissions to crash data (macos) shell: bash - if: failure() && startsWith(matrix.os, 'macos') + if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : ls -l ~/Library/Logs/DiagnosticReports/ From 7315ee8f63ff15a2fbb36836d5dd332bb7d8ca19 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 16:38:47 -0400 Subject: [PATCH 42/71] remove messaging dir from bin copy --- .github/workflows/desktop.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 932f452093..e3e413a39c 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -193,9 +193,7 @@ jobs: 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/database/tests/firebase* /tmp/bins sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins - sudo cp -f ./build/messaging/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/* || : From 26098615220cd9f0e23c59de6cea6a9fc73babc7 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Thu, 16 Jul 2020 19:00:14 -0400 Subject: [PATCH 43/71] mangle bins by their build configuration --- .github/workflows/desktop.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index e3e413a39c..f5be61716a 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -188,14 +188,14 @@ jobs: sudo mkdir -p /tmp/bins sudo rm -rf /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/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/auth/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/database/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} sudo chmod -R +rwx /tmp/bins/* || : - name: Apply Read Permissions to crash data (linux) From a8f5f6f2125ba7015b56658794704850e6e4c735 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 09:35:09 -0400 Subject: [PATCH 44/71] mangle archive .zips based on build config --- .github/workflows/desktop.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index f5be61716a..c5712cc7e8 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -188,14 +188,14 @@ jobs: sudo mkdir -p /tmp/bins sudo rm -rf /tmp/bins/* sudo rm -rf ./build/app/tests/firebase_test - sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/auth/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/database/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + 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: Apply Read Permissions to crash data (linux) @@ -211,7 +211,7 @@ jobs: uses: actions/upload-artifact@v2 if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') with: - name: crashes + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} path: | /tmp/cores/ /tmp/bins/ @@ -240,7 +240,7 @@ jobs: uses: actions/upload-artifact@v2 if: failure() && startsWith(matrix.os, 'macos') with: - name: crashes + name: crashes/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} path: ~/Library/Logs/DiagnosticReports/* From 56ebfed189b436439d7f4d637e4c7fc25aa30168 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 10:49:57 -0400 Subject: [PATCH 45/71] rework coredump filenames. Updated mac archive name --- .github/workflows/desktop.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index c5712cc7e8..6bec378caf 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,7 +167,7 @@ jobs: if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - echo '/tmp/cores/core.%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern + echo '/tmp/cores/core.%E.%p.%t' | sudo tee xd sudo mkdir -p /tmp/cores sudo rm -rf /tmp/cores/* @@ -181,22 +181,24 @@ jobs: cd build sudo ctest --verbose - - name: Copy test bins (linux) + - name: Copy test bins and cores (linux) if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | sudo mkdir -p /tmp/bins sudo rm -rf /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/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/auth/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/database/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} sudo chmod -R +rwx /tmp/bins/* || : + sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - name: Apply Read Permissions to crash data (linux) shell: bash @@ -213,8 +215,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} path: | - /tmp/cores/ - /tmp/bins/ + /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - name: Enable crash support (mac) if: startsWith(matrix.os, 'macos') @@ -240,7 +242,7 @@ jobs: uses: actions/upload-artifact@v2 if: failure() && startsWith(matrix.os, 'macos') with: - name: crashes/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} path: ~/Library/Logs/DiagnosticReports/* From ebff00dd0267329d988eb28f1de9348093e5cb7b Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:05:03 -0400 Subject: [PATCH 46/71] renamed target to Unix-Makfiles so it may be used for file name mangling --- .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 6bec378caf..8124642e7b 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -18,14 +18,14 @@ jobs: build_type: ["Release", "Debug"] architecture: ["x64",] python_version: [2.7] - generator: ["Visual Studio 16 2019", "Unix Makefiles", "Ninja"] + generator: ["Visual Studio 16 2019", "Unix-Makefiles", "Ninja"] exclude: - os: ubuntu-latest generator: "Visual Studio 16 2019" - os: macos-latest generator: "Visual Studio 16 2019" - os: windows-latest - generator: "Unix Makefiles" + generator: "Unix-Makefiles" - os: windows-latest generator: "Ninja" From d2a5aa01ce53949b4cf95e3d57b5bac36fc35ffa Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:17:55 -0400 Subject: [PATCH 47/71] reverted Unix Makefiles change. Removed genertor from crash.zip filenames --- .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 8124642e7b..6067aa887f 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -18,14 +18,14 @@ jobs: build_type: ["Release", "Debug"] architecture: ["x64",] python_version: [2.7] - generator: ["Visual Studio 16 2019", "Unix-Makefiles", "Ninja"] + generator: ["Visual Studio 16 2019", "Unix Makefiles", "Ninja"] exclude: - os: ubuntu-latest generator: "Visual Studio 16 2019" - os: macos-latest generator: "Visual Studio 16 2019" - os: windows-latest - generator: "Unix-Makefiles" + generator: "Unix Makefiles" - os: windows-latest generator: "Ninja" @@ -213,7 +213,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 }}-${{ matrix.generator }} + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} path: | /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} @@ -240,9 +240,9 @@ jobs: - name: Archive crashes (mac) uses: actions/upload-artifact@v2 - if: failure() && 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 }}-${{ matrix.generator }} + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} path: ~/Library/Logs/DiagnosticReports/* From c457d6ed55aa81a53f2af9b44d2abc33ec02a783 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:30:39 -0400 Subject: [PATCH 48/71] nina and makefiles have their own archive names now --- .github/workflows/desktop.yml | 60 ++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 6067aa887f..3606cf34f0 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -188,17 +188,17 @@ jobs: sudo mkdir -p /tmp/bins sudo rm -rf /tmp/bins/* sudo rm -rf ./build/app/tests/firebase_test - sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/auth/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/database/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/auth/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/database/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo chmod -R +rwx /tmp/bins/* || : - sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - sudo cp -f /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Apply Read Permissions to crash data (linux) shell: bash @@ -209,15 +209,6 @@ jobs: sudo chmod -R +rwx /tmp/bins/* || : ls -l /tmp/bins/ - - name: Archive crashes and binaries (linux) - 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 }} - path: | - /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - - name: Enable crash support (mac) if: startsWith(matrix.os, 'macos') run: | @@ -238,11 +229,36 @@ jobs: sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : ls -l ~/Library/Logs/DiagnosticReports/ - - name: Archive crashes (mac) + - name: Archive crashes and binaries (linux - makefiles) uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') + 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/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + + - 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/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + + - 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/* + + - 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 }} + name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: ~/Library/Logs/DiagnosticReports/* From ad5d3df37afcae705ba0813a570a49c16c5d2557 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:38:58 -0400 Subject: [PATCH 49/71] fixed core copy command. Removed generator from archive path --- .github/workflows/desktop.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 3606cf34f0..d763a8e198 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -177,7 +177,6 @@ jobs: LANG: en_US run: | ulimit -c unlimited - cat /proc/sys/kernel/core_pattern cd build sudo ctest --verbose @@ -198,7 +197,7 @@ jobs: sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo chmod -R +rwx /tmp/bins/* || : sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f /tmp/cores/* /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Apply Read Permissions to crash data (linux) shell: bash @@ -235,8 +234,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles path: | - /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Archive crashes and binaries (linux - ninja ) uses: actions/upload-artifact@v2 @@ -244,8 +243,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: | - /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} - /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }} + /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Archive crashes (mac - makefiles) uses: actions/upload-artifact@v2 From 70d41dcf9204bf3b1751ce8584dc304f8a6fbdfe Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:44:30 -0400 Subject: [PATCH 50/71] fixed tmp-bins directory creation step --- .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 d763a8e198..d9f6a7c088 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -184,7 +184,7 @@ jobs: if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - sudo mkdir -p /tmp/bins + sudo mkdir -p /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo rm -rf /tmp/bins/* sudo rm -rf ./build/app/tests/firebase_test sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} From 5a0eb1b98d9dc0b7f9c67f47fc09b93b05c8bd0c Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:50:17 -0400 Subject: [PATCH 51/71] fixed a problem deleting a subdirectory by accident. --- .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 d9f6a7c088..07afe404ab 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -184,8 +184,8 @@ jobs: if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | + sudo rm -rf /tmp/bins/* || : sudo mkdir -p /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo rm -rf /tmp/bins/* sudo rm -rf ./build/app/tests/firebase_test sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} From 9f5ffcbc2c1d7ff07507a4da5082eb7551606ef8 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 11:58:42 -0400 Subject: [PATCH 52/71] store cores in the mangled path directly. --- .github/workflows/desktop.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 07afe404ab..2c7f9b80ee 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,9 +167,9 @@ jobs: if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - echo '/tmp/cores/core.%E.%p.%t' | sudo tee xd - sudo mkdir -p /tmp/cores - sudo rm -rf /tmp/cores/* + echo '/tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/core.%E.%p.%t' | sudo tee xd + sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo rm -rf /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* - name: Run tests (linux) if: startsWith(matrix.os, 'ubuntu') @@ -204,7 +204,7 @@ jobs: if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | sudo chmod -R +rwx /tmp/cores/* || : - ls -l /tmp/cores/ + ls -l /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo chmod -R +rwx /tmp/bins/* || : ls -l /tmp/bins/ @@ -259,6 +259,3 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: ~/Library/Logs/DiagnosticReports/* - - -#path: /tmp/cores/* \ No newline at end of file From a33e6b69c96d2ddac6c64885e308061b68fce4fb Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 12:27:13 -0400 Subject: [PATCH 53/71] created archive directory for upload --- .github/workflows/desktop.yml | 81 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 2c7f9b80ee..85470e2169 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,10 +167,23 @@ jobs: if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - echo '/tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/core.%E.%p.%t' | sudo tee xd - sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo rm -rf /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* + echo '/tmp/cores/core.%E.%p.%t' | sudo tee xd + sudo mkdir -p /tmp/cores/ + sudo rm -rf /tmp/cores/* + - name: Enable crash support (mac) + 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) if: startsWith(matrix.os, 'ubuntu') env: @@ -180,48 +193,34 @@ jobs: cd build sudo ctest --verbose - - name: Copy test bins and cores (linux) + - name: Copy test bins (linux) if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - sudo rm -rf /tmp/bins/* || : - sudo mkdir -p /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo rm -rf /tmp/archive/bins/* || : + sudo mkdir -p /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo rm -rf ./build/app/tests/firebase_test - sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/app/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/auth/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/database/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/storage/tests/firebase* /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo chmod -R +rwx /tmp/bins/* || : - sudo mkdir -p /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f /tmp/cores/* /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - - - name: Apply Read Permissions to crash data (linux) + sudo cp -f ./build/analytics/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/app/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/app/rest/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/auth/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/database/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/instance_id/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/remote_config/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/storage/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo chmod -R +rwx /tmp/archive/bins/* || : + + + - name: Prep crash data for archive (macos) shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | - sudo chmod -R +rwx /tmp/cores/* || : - ls -l /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo chmod -R +rwx /tmp/bins/* || : - ls -l /tmp/bins/ - - - name: Enable crash support (mac) - 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 + sudo mkdir -p /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + cp -r * /tmp/cores/ /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo chmod -R +rwx /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : + ls -l /tmp/archiive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - - name: Apply Read Permissions to crash data (macos) + - name: Prep crash data for archive (macos) shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | @@ -234,8 +233,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles path: | - /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Archive crashes and binaries (linux - ninja ) uses: actions/upload-artifact@v2 @@ -243,8 +242,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: | - /tmp/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - /tmp/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Archive crashes (mac - makefiles) uses: actions/upload-artifact@v2 From 3b2783f834db665f9d674b4405a68e202778df44 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 12:35:16 -0400 Subject: [PATCH 54/71] added sudo to copy command for copying cores --- .github/workflows/desktop.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 85470e2169..634ece78ea 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -193,7 +193,7 @@ jobs: cd build sudo ctest --verbose - - name: Copy test bins (linux) + - name: Prep bins for achive (linux) if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | @@ -211,12 +211,13 @@ jobs: sudo chmod -R +rwx /tmp/archive/bins/* || : - - name: Prep crash data for archive (macos) + - name: Prep crash data for archive (linux) shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | + sudo rm -rf /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : sudo mkdir -p /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - cp -r * /tmp/cores/ /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -r * /tmp/cores/ /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo chmod -R +rwx /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : ls -l /tmp/archiive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} From 13db22566e56695023aac8ba548e12cda46daebc Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 13:44:00 -0400 Subject: [PATCH 55/71] fixed ls command in cores archiving. --- .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 634ece78ea..aae0c74589 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -218,8 +218,8 @@ jobs: sudo rm -rf /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : sudo mkdir -p /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo cp -r * /tmp/cores/ /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo chmod -R +rwx /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : - ls -l /tmp/archiive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo chmod -R +rwx /tmp/archive/cores/* || : + ls -l /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Prep crash data for archive (macos) shell: bash From e92129aac0d747349f55e735e91d9b465b3a2f8e Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 13:56:43 -0400 Subject: [PATCH 56/71] renamed /tmp/archive to /tmp/upload --- .github/workflows/desktop.yml | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index aae0c74589..ce091f6b5c 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -197,29 +197,29 @@ jobs: if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - sudo rm -rf /tmp/archive/bins/* || : - sudo mkdir -p /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo rm -rf /tmp/upload/bins/* || : + sudo mkdir -p /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo rm -rf ./build/app/tests/firebase_test - sudo cp -f ./build/analytics/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/app/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/app/rest/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/auth/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/database/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/instance_id/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/remote_config/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/storage/tests/firebase* /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo chmod -R +rwx /tmp/archive/bins/* || : + sudo cp -f ./build/analytics/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/app/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/app/rest/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/auth/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/database/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/instance_id/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/remote_config/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/storage/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo chmod -R +rwx /tmp/upload/bins/* || : - name: Prep crash data for archive (linux) shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | - sudo rm -rf /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : - sudo mkdir -p /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -r * /tmp/cores/ /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo chmod -R +rwx /tmp/archive/cores/* || : - ls -l /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo rm -rf /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : + sudo mkdir -p /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -r * /tmp/cores/ /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo chmod -R +rwx /tmp/upload/cores/* || : + ls -l /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Prep crash data for archive (macos) shell: bash @@ -234,8 +234,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles path: | - /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Archive crashes and binaries (linux - ninja ) uses: actions/upload-artifact@v2 @@ -243,8 +243,8 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: | - /tmp/archive/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - /tmp/archive/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Archive crashes (mac - makefiles) uses: actions/upload-artifact@v2 From cfdd93a2128e4c1f805b09ecd77ae3ce65a54f36 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 14:09:17 -0400 Subject: [PATCH 57/71] fixed a cp typo which caused entire disk to be in the archive --- .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 ce091f6b5c..ac77d2b171 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -217,7 +217,7 @@ jobs: run: | sudo rm -rf /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : sudo mkdir -p /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -r * /tmp/cores/ /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -r /tmp/cores/* /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo chmod -R +rwx /tmp/upload/cores/* || : ls -l /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} From 51dc78e8ac1fad01205533db324e351328370e63 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 15:27:08 -0400 Subject: [PATCH 58/71] fixed /proc/sys/kernel/core_pattern --- .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 ac77d2b171..fa24320c62 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,7 +167,7 @@ jobs: if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - echo '/tmp/cores/core.%E.%p.%t' | sudo tee xd + echo '/tmp/cores/core.%E.%p.%t' | sudo tee /proc/sys/kernel/core_pattern sudo mkdir -p /tmp/cores/ sudo rm -rf /tmp/cores/* From 2e7802f80e5fe47e0fcd34a1270cef63a2d27b51 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 16:05:46 -0400 Subject: [PATCH 59/71] remove timestamp to cores to see if that coalesces them --- .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 fa24320c62..99bb5d2ce9 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,7 +167,7 @@ jobs: if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - echo '/tmp/cores/core.%E.%p.%t' | sudo tee /proc/sys/kernel/core_pattern + echo '/tmp/cores/core.%E.%p' | sudo tee /proc/sys/kernel/core_pattern sudo mkdir -p /tmp/cores/ sudo rm -rf /tmp/cores/* From 8170bde873c7fc9e9de664f943808e08e14dff93 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Fri, 17 Jul 2020 16:06:33 -0400 Subject: [PATCH 60/71] remove pid from cores to see if that coalesces them --- .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 99bb5d2ce9..19d9767515 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -167,7 +167,7 @@ jobs: if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | - echo '/tmp/cores/core.%E.%p' | sudo tee /proc/sys/kernel/core_pattern + echo '/tmp/cores/core.%E' | sudo tee /proc/sys/kernel/core_pattern sudo mkdir -p /tmp/cores/ sudo rm -rf /tmp/cores/* From 66552f0f54ce821f57c88f0c1caf004a86c615f2 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 10:38:51 -0400 Subject: [PATCH 61/71] added comments to desktop.yml --- .github/workflows/desktop.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 19d9767515..f99807026f 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -164,6 +164,9 @@ jobs: find build -name "*.so" - name: Enable crash support (linux) + # Ensures directory structure is in place to capture core files on Linux. + # Note that the ulimit call to enable crashes must be done in the process + # which runs the ctest executable and cannot be placed here. if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | @@ -172,6 +175,8 @@ jobs: sudo rm -rf /tmp/cores/* - name: Enable crash support (mac) + # Clears out all of the older crahes in case they exist on the same + # VM instance and/or have been cahced. if: startsWith(matrix.os, 'macos') run: | rm -rf ~/Library/Logs/DiagnosticReports/* @@ -185,6 +190,8 @@ jobs: ctest --verbose - name: Run tests (linux) + # Linux exists as its own standalone execution step in order to invoke + # ulimit to enable crash collection. if: startsWith(matrix.os, 'ubuntu') env: LANG: en_US @@ -194,6 +201,9 @@ jobs: sudo ctest --verbose - name: Prep bins for achive (linux) + # Copies all of the binary files into one directory for ease in + # archiving. Directory are name-mangled by build configuration and + # marked readable by the archive step. if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | @@ -212,6 +222,8 @@ jobs: - name: Prep crash data for archive (linux) + # Copies all core files into a directory name-mangled by build + # configuration and marks them readable for the archiving step. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | @@ -219,16 +231,19 @@ jobs: sudo mkdir -p /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo cp -r /tmp/cores/* /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} sudo chmod -R +rwx /tmp/upload/cores/* || : - ls -l /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - name: Prep crash data for archive (macos) + # Freshly made diagnostic reports are marked as readable for archive. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : - ls -l ~/Library/Logs/DiagnosticReports/ - name: Archive crashes and binaries (linux - makefiles) + # Unfortunately matrix.generator includes spaces for Unix Makefiles, so + # we cannot use it to name-mangle archive files. Therefore there are + # different archive steps for Makefiles and Ninja generated builds + # for both Mac and Linux. uses: actions/upload-artifact@v2 if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') with: From 554a96277e5b527b1a7b5e19f3f903ce26b5bb49 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 16:51:00 -0400 Subject: [PATCH 62/71] added macos bins. removed tmp directory name-mangling --- .github/workflows/desktop.yml | 65 ++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index f99807026f..019fc27a6e 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -204,53 +204,66 @@ jobs: # Copies all of the binary files into one directory for ease in # archiving. Directory are name-mangled by build configuration and # marked readable by the archive step. - if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + # sudo rm -rf /tmp/upload/bins/* || : + # sudo mkdir -p /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo rm -rf ./build/app/tests/firebase_test + # sudo cp -f ./build/analytics/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/app/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/app/rest/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/auth/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/database/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/instance_id/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/remote_config/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -f ./build/storage/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + + if: failure() && startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') ) shell: bash run: | sudo rm -rf /tmp/upload/bins/* || : - sudo mkdir -p /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo mkdir -p /tmp/upload/bins/ sudo rm -rf ./build/app/tests/firebase_test - sudo cp -f ./build/analytics/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/app/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/app/rest/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/auth/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/database/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/instance_id/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/remote_config/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -f ./build/storage/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo cp -f ./build/analytics/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/app/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/app/rest/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/auth/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/database/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/instance_id/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/remote_config/tests/firebase* /tmp/upload/bins/ + sudo cp -f ./build/storage/tests/firebase* /tmp/upload/bins/ sudo chmod -R +rwx /tmp/upload/bins/* || : - name: Prep crash data for archive (linux) # Copies all core files into a directory name-mangled by build # configuration and marks them readable for the archiving step. + # sudo rm -rf /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : + # sudo mkdir -p /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo cp -r /tmp/cores/* /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # sudo chmod -R +rwx /tmp/upload/cores/* || : shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') - run: | - sudo rm -rf /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : - sudo mkdir -p /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo cp -r /tmp/cores/* /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - sudo chmod -R +rwx /tmp/upload/cores/* || : + run: sudo chmod -R +rwx /tmp/cores/* || : - name: Prep crash data for archive (macos) # Freshly made diagnostic reports are marked as readable for archive. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') - run: | - sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : + run: sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : - name: Archive crashes and binaries (linux - makefiles) # Unfortunately matrix.generator includes spaces for Unix Makefiles, so # we cannot use it to name-mangle archive files. Therefore there are # different archive steps for Makefiles and Ninja generated builds # for both Mac and Linux. + # /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} 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/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/cores/* + /tmp/upload/bins/* - name: Archive crashes and binaries (linux - ninja ) uses: actions/upload-artifact@v2 @@ -258,19 +271,25 @@ jobs: with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: | - /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /tmp/cores/* + /tmp/upload/bins/* + # /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + # /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - 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/* + path: | + ~/Library/Logs/DiagnosticReports/* + /tmp/upload/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/* + path: | + ~/Library/Logs/DiagnosticReports/* + /tmp/upload/bins/* From 53e36710e7d004fb991cff3b90f6629357c27fd7 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 16:54:02 -0400 Subject: [PATCH 63/71] run | for compound commands --- .github/workflows/desktop.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 019fc27a6e..b41ef4a0cc 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -242,13 +242,15 @@ jobs: # sudo chmod -R +rwx /tmp/upload/cores/* || : shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') - run: sudo chmod -R +rwx /tmp/cores/* || : + run: | + sudo chmod -R +rwx /tmp/cores/* || : - name: Prep crash data for archive (macos) # Freshly made diagnostic reports are marked as readable for archive. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') - run: sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : + run: | + sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : - name: Archive crashes and binaries (linux - makefiles) # Unfortunately matrix.generator includes spaces for Unix Makefiles, so From 114cfcafbc0f2aa38fd21770e6689cbdbe94cff1 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 17:34:31 -0400 Subject: [PATCH 64/71] mac os diagnostic reports now in /tmp/cores --- .github/workflows/desktop.yml | 118 ++++++++++++++-------------------- 1 file changed, 49 insertions(+), 69 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index b41ef4a0cc..d9c2517b1f 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -165,8 +165,6 @@ jobs: - name: Enable crash support (linux) # Ensures directory structure is in place to capture core files on Linux. - # Note that the ulimit call to enable crashes must be done in the process - # which runs the ctest executable and cannot be placed here. if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') shell: bash run: | @@ -175,8 +173,7 @@ jobs: sudo rm -rf /tmp/cores/* - name: Enable crash support (mac) - # Clears out all of the older crahes in case they exist on the same - # VM instance and/or have been cahced. + # Ensures no lingering crashes from a previous run. if: startsWith(matrix.os, 'macos') run: | rm -rf ~/Library/Logs/DiagnosticReports/* @@ -191,7 +188,8 @@ jobs: - name: Run tests (linux) # Linux exists as its own standalone execution step in order to invoke - # ulimit to enable crash collection. + # platform-specific ulimit to enable crash collection. The ulimit command + # must be made in same instance of the shell that runs the tests. if: startsWith(matrix.os, 'ubuntu') env: LANG: en_US @@ -202,44 +200,27 @@ jobs: - name: Prep bins for achive (linux) # Copies all of the binary files into one directory for ease in - # archiving. Directory are name-mangled by build configuration and - # marked readable by the archive step. - # sudo rm -rf /tmp/upload/bins/* || : - # sudo mkdir -p /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo rm -rf ./build/app/tests/firebase_test - # sudo cp -f ./build/analytics/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/app/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/app/rest/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/auth/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/database/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/instance_id/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/remote_config/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -f ./build/storage/tests/firebase* /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - + # 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/upload/bins/* || : - sudo mkdir -p /tmp/upload/bins/ + 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/upload/bins/ - sudo cp -f ./build/app/tests/firebase* /tmp/upload/bins/ - sudo cp -f ./build/app/rest/tests/firebase* /tmp/upload/bins/ - sudo cp -f ./build/auth/tests/firebase* /tmp/upload/bins/ - sudo cp -f ./build/database/tests/firebase* /tmp/upload/bins/ - sudo cp -f ./build/instance_id/tests/firebase* /tmp/upload/bins/ - sudo cp -f ./build/remote_config/tests/firebase* /tmp/upload/bins/ - sudo cp -f ./build/storage/tests/firebase* /tmp/upload/bins/ - sudo chmod -R +rwx /tmp/upload/bins/* || : - + 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) - # Copies all core files into a directory name-mangled by build - # configuration and marks them readable for the archiving step. - # sudo rm -rf /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}/* || : - # sudo mkdir -p /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo cp -r /tmp/cores/* /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # sudo chmod -R +rwx /tmp/upload/cores/* || : + # Marks the contents of the core dump directory to be readable for the + # archiving step. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | @@ -250,48 +231,47 @@ jobs: shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | - sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : - - - name: Archive crashes and binaries (linux - makefiles) - # Unfortunately matrix.generator includes spaces for Unix Makefiles, so - # we cannot use it to name-mangle archive files. Therefore there are - # different archive steps for Makefiles and Ninja generated builds - # for both Mac and Linux. - # /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + sudo rm -rf /tmp/cores/* || : + sudo mkdir -p /tmp/cores/ + sudo cp ~/Library/Logs/DiagnosticReports/* /tmp/cores + sudo chmod -R +rwx /tmp/cores || : + + # Crash Archives - Unfortunately 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 & Makfiles + # archive uploads. + - name: Archive crashes and binaries (Unix makefiles) uses: actions/upload-artifact@v2 - if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') + if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')) with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles path: | /tmp/cores/* - /tmp/upload/bins/* + /tmp/bins/* - - name: Archive crashes and binaries (linux - ninja ) + - name: Archive crashes and binaries (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.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')) with: name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja path: | /tmp/cores/* - /tmp/upload/bins/* - # /tmp/upload/cores/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} - # /tmp/upload/bins/${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }} + /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/upload/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/upload/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 e6494a123e40f299f9ee5df53106b6c3c21b6c08 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 17:51:36 -0400 Subject: [PATCH 65/71] added wildcard to chmod cores for mac --- .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 d9c2517b1f..6b0c28701d 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -234,7 +234,7 @@ jobs: sudo rm -rf /tmp/cores/* || : sudo mkdir -p /tmp/cores/ sudo cp ~/Library/Logs/DiagnosticReports/* /tmp/cores - sudo chmod -R +rwx /tmp/cores || : + sudo chmod -R +rwx /tmp/cores/* || : # Crash Archives - Unfortunately matrix.generator includes spaces for # the "Unix Makefiles" configuration so it cannot be used to name-mangle From c0c58c0a80350d3dad00cbf82c844485f3367b51 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 18:18:26 -0400 Subject: [PATCH 66/71] make tmp directory on mac --- .github/workflows/desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 6b0c28701d..adfa1f38f1 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -232,6 +232,7 @@ jobs: if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | sudo rm -rf /tmp/cores/* || : + sudo mkdir -p /tmp/ sudo mkdir -p /tmp/cores/ sudo cp ~/Library/Logs/DiagnosticReports/* /tmp/cores sudo chmod -R +rwx /tmp/cores/* || : From ed0ff03e804b7d01e28f3566ea1dfd25705db0dc Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 18:31:53 -0400 Subject: [PATCH 67/71] revering mac to its own archive step --- .github/workflows/desktop.yml | 45 ++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index adfa1f38f1..149000f512 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -227,21 +227,18 @@ jobs: sudo chmod -R +rwx /tmp/cores/* || : - name: Prep crash data for archive (macos) - # Freshly made diagnostic reports are marked as readable for archive. + # Freshly made diagnostic reports are marked as readable for + # the archive step. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | - sudo rm -rf /tmp/cores/* || : - sudo mkdir -p /tmp/ - sudo mkdir -p /tmp/cores/ - sudo cp ~/Library/Logs/DiagnosticReports/* /tmp/cores - sudo chmod -R +rwx /tmp/cores/* || : + sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : # Crash Archives - Unfortunately 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 & Makfiles # archive uploads. - - name: Archive crashes and binaries (Unix makefiles) + - 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') || startsWith(matrix.os, 'macos')) with: @@ -250,7 +247,7 @@ jobs: /tmp/cores/* /tmp/bins/* - - name: Archive crashes and binaries (ninja) + - 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') || startsWith(matrix.os, 'macos')) with: @@ -259,20 +256,20 @@ jobs: /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 - 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/* + - 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 53509fbc3a78e6269463cbf0399fb0928c744d29 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 18:33:29 -0400 Subject: [PATCH 68/71] removed mac from unix archive steps. --- .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 149000f512..571e5f510c 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -240,7 +240,7 @@ jobs: # 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') || startsWith(matrix.os, 'macos')) + 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: | @@ -249,7 +249,7 @@ jobs: - 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') || startsWith(matrix.os, 'macos')) + 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: | From b56ffdd125915e027b52da3205615206c467613a Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 18:36:32 -0400 Subject: [PATCH 69/71] missing ) on 243. --- .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 571e5f510c..cd04149815 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -240,7 +240,7 @@ jobs: # 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' + 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: | From 363475b6f5f5ef39ae6e2f57b962dd78629e3036 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 19:06:04 -0400 Subject: [PATCH 70/71] attempting /tmp/cores directory on mac again --- .github/workflows/desktop.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index cd04149815..a035054a28 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -233,6 +233,11 @@ jobs: if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos') run: | sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : + sudo rm -rf /tmp/cores/* || : + sudo mkdir -p /tmp/cores + cp ~/Library/Logs/DiagnosticReports/* /tmp/cores || : + sudo chmod -R +rwx /tmp/cores/* || : + # Crash Archives - Unfortunately matrix.generator includes spaces for # the "Unix Makefiles" configuration so it cannot be used to name-mangle @@ -264,6 +269,7 @@ jobs: path: | ~/Library/Logs/DiagnosticReports/* /tmp/bins/* + /tmp/cores/* - name: Archive crashes (mac - ninja) uses: actions/upload-artifact@v2 @@ -273,3 +279,4 @@ jobs: path: | ~/Library/Logs/DiagnosticReports/* /tmp/bins/* + /tmp/cores/* From 424e788d280c246913f24a735332f54e0a4233e5 Mon Sep 17 00:00:00 2001 From: "drsanta@google.com" Date: Sun, 19 Jul 2020 19:45:53 -0400 Subject: [PATCH 71/71] attempted final pass --- .github/workflows/desktop.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index a035054a28..9c22386381 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -163,7 +163,7 @@ jobs: find build -name "*.a" find build -name "*.so" - - name: Enable crash support (linux) + - 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 @@ -172,8 +172,8 @@ jobs: sudo mkdir -p /tmp/cores/ sudo rm -rf /tmp/cores/* - - name: Enable crash support (mac) - # Ensures no lingering crashes from a previous run. + - name: Prep crash support (mac) + # Ensures no lingering crashes from the previous run. if: startsWith(matrix.os, 'macos') run: | rm -rf ~/Library/Logs/DiagnosticReports/* @@ -188,8 +188,9 @@ jobs: - 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 made in same instance of the shell that runs the tests. + # 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 @@ -220,7 +221,7 @@ jobs: - name: Prep crash data for archive (linux) # Marks the contents of the core dump directory to be readable for the - # archiving step. + # archiving step on linux. shell: bash if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu') run: | @@ -228,20 +229,17 @@ jobs: - name: Prep crash data for archive (macos) # Freshly made diagnostic reports are marked as readable for - # the archive step. + # 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/* || : - sudo rm -rf /tmp/cores/* || : - sudo mkdir -p /tmp/cores - cp ~/Library/Logs/DiagnosticReports/* /tmp/cores || : - sudo chmod -R +rwx /tmp/cores/* || : - + sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || : - # Crash Archives - Unfortunately 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 & Makfiles + # 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 @@ -269,7 +267,6 @@ jobs: path: | ~/Library/Logs/DiagnosticReports/* /tmp/bins/* - /tmp/cores/* - name: Archive crashes (mac - ninja) uses: actions/upload-artifact@v2 @@ -279,4 +276,3 @@ jobs: path: | ~/Library/Logs/DiagnosticReports/* /tmp/bins/* - /tmp/cores/*