From 4835a4a33da1084230b556e71800461623919432 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 4 Jul 2021 01:41:32 +0200 Subject: [PATCH 1/5] Archive vcpkg logs, for debugging This collects the logs generated during the vcpkg run, and archives them as an artifact. --- .github/workflows/pr_build.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 8b4201f068..3cffad0b3d 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -25,6 +25,8 @@ env: # WIN32 specific variables PreferredToolArchitecture: X64 + # Ensure XZ always runs with muticore support + XZ_OPT: -T0 jobs: build: @@ -140,6 +142,18 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release $CMAKE_EXTRA + - name: Compress cmake logs + if: always() + shell: bash + run: | + find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | tar --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs.tar.xz" + - name: Archive cmake logs + if: always() + uses: actions/upload-artifact@v2 + with: + name: cmake-logs + path: ${{ runner.workspace }}/cmake-logs.tar.xz + if-no-files-found: error - name: Build Application if: matrix.build_type == 'full' || matrix.build_type == 'client' working-directory: ${{runner.workspace}}/build @@ -231,4 +245,4 @@ jobs: if [[ "${{ matrix.build_type }}" == "android" ]]; then cd $GITHUB_WORKSPACE/android fi - $PYTHON_EXEC "$GITHUB_WORKSPACE/tools/ci-scripts/upload_to_publish_server.py" \ No newline at end of file + $PYTHON_EXEC "$GITHUB_WORKSPACE/tools/ci-scripts/upload_to_publish_server.py" From 6722c6af26f3269d01d21d147f7260a6048f32a9 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 4 Jul 2021 15:28:55 +0200 Subject: [PATCH 2/5] Use GNU Tar --- .github/workflows/pr_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 3cffad0b3d..c22fe56877 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -146,7 +146,7 @@ jobs: if: always() shell: bash run: | - find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | tar --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs.tar.xz" + find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | gtar --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs.tar.xz" - name: Archive cmake logs if: always() uses: actions/upload-artifact@v2 From 4971ae4bd33a85deee2618f1a352fc6719a50db7 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 4 Jul 2021 16:00:16 +0200 Subject: [PATCH 3/5] Deal with different tar names --- .github/workflows/pr_build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index c22fe56877..f462c0a84c 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -146,7 +146,13 @@ jobs: if: always() shell: bash run: | - find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | gtar --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs.tar.xz" + if [ "${{ matrix.os }}" == "macOS-latest" ]; then + TAR=gtar + else + TAR=tar + fi + + find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | $TAR --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs.tar.xz" - name: Archive cmake logs if: always() uses: actions/upload-artifact@v2 From c4bc4fc15affcea527f603bf984d71302139e834 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 4 Jul 2021 16:37:00 +0200 Subject: [PATCH 4/5] Improve log archive naming --- .github/workflows/pr_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index f462c0a84c..4cb298c6c9 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -152,13 +152,13 @@ jobs: TAR=tar fi - find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | $TAR --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs.tar.xz" + find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | $TAR --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz" - name: Archive cmake logs if: always() uses: actions/upload-artifact@v2 with: name: cmake-logs - path: ${{ runner.workspace }}/cmake-logs.tar.xz + path: ${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz if-no-files-found: error - name: Build Application if: matrix.build_type == 'full' || matrix.build_type == 'client' From 54b28a1fed71e6799a196e8435278c46247aa325 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 4 Jul 2021 16:57:02 +0200 Subject: [PATCH 5/5] Name the artifact too --- .github/workflows/pr_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 4cb298c6c9..7ad8d2c0a5 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -157,7 +157,7 @@ jobs: if: always() uses: actions/upload-artifact@v2 with: - name: cmake-logs + name: cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz path: ${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz if-no-files-found: error - name: Build Application