public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/microsoft/heads/main)] Zip build output before uploading and unzip after downloading.
@ 2022-01-28 22:16 Eugene Rozenfeld
  0 siblings, 0 replies; only message in thread
From: Eugene Rozenfeld @ 2022-01-28 22:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:57584db90a89fb30d8117651c889f26b3fecd1fa

commit 57584db90a89fb30d8117651c889f26b3fecd1fa
Author: Eugene Rozenfeld <erozen@microsoft.com>
Date:   Thu Jan 13 19:38:26 2022 -0800

    Zip build output before uploading and unzip after downloading.

Diff:
---
 .github/scripts/downloadBuildArtifact.py | 10 +++++++---
 .github/workflows/build.yaml             |  6 +++---
 .github/workflows/update-main.yaml       | 15 +++++++++------
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/.github/scripts/downloadBuildArtifact.py b/.github/scripts/downloadBuildArtifact.py
index 7cd9df109dd..45336fb4317 100644
--- a/.github/scripts/downloadBuildArtifact.py
+++ b/.github/scripts/downloadBuildArtifact.py
@@ -210,9 +210,13 @@ def DownloadBuildArtifact():
         gccBuildArtifactID = FindGccBuildArtifact(globals.configObj.runID, globals.configObj.accessToken)
 
     # TODO: Support downloading build artifact without a config object setup so the script can be used outside of workflows by developers
-    filename = DownloadArtifact(gccBuildArtifactID)
-    res = subprocess.run('mv ' + filename + '/* ../objdir -f ',
+    filename = DownloadArtifact(gccBuildArtifactID) + "/objdir.tar.gz"
+    res = subprocess.run('tar -xzf ' + filename + ' -m -C ..',
         shell=True, check=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 
-    logger.info("mv cmd output = " + str(res.stdout, 'utf-8'))
+    logger.info("tar cmd output = " + str(res.stdout, 'utf-8'))
 
+    res = subprocess.run('rm ' +  filename,
+        shell=True, check=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+    logger.info("rm cmd output = " + str(res.stdout, 'utf-8'))
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 1f0b1589d1f..d3e8b9cf980 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -78,11 +78,11 @@ jobs:
         with: 
           configjson: ${{ steps.setupconfig.outputs.configJson }}
 
-      - name: Move objdir to be in repo so it can be uploaded
-        run: mv ../objdir objdir
+      - name: Compress and archive objdir so that it can be uploaded
+        run: tar -czf objdir.tar.gz ../objdir
 
       - name: Upload build output
         uses: actions/upload-artifact@v2
         with:
           name: gccBuild
-          path: objdir
+          path: objdir.tar.gz
diff --git a/.github/workflows/update-main.yaml b/.github/workflows/update-main.yaml
index 7ae58b9a564..8168f4302fd 100644
--- a/.github/workflows/update-main.yaml
+++ b/.github/workflows/update-main.yaml
@@ -103,14 +103,14 @@ jobs:
         with: 
           configjson: ${{ steps.setupconfig.outputs.configJson }}
 
-      - name: Move objdir to be in repo so it can be uploaded
-        run: mv ../objdir objdir
+      - name: Compress and archive objdir so that it can be uploaded
+        run: tar -czf objdir.tar.gz ../objdir
 
       - name: Upload build output
         uses: actions/upload-artifact@v2
         with:
           name: gccBuild
-          path: objdir
+          path: objdir.tar.gz
 
       # This should be the last step on this machine since it will clear out fields in the config json
       - name: Print No Secret Json
@@ -164,10 +164,13 @@ jobs:
         uses: actions/download-artifact@v2
         with:
           name: gccBuild
-          path: objdir
+          path: gccBuild
 
-      - name: Move objdir outisde repo
-        run: mv objdir ../
+      - name: Unpack objdir outisde of the repository
+        run: |
+          tar -xzf gccBuild/objdir.tar.gz -m -C ..
+          rm -r gccBuild
+        shell: bash
 
       # build.yaml creates the gccBuild artifact
       - name: Run GCC tests


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-28 22:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 22:16 [gcc(refs/vendors/microsoft/heads/main)] Zip build output before uploading and unzip after downloading Eugene Rozenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).