nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Date Tue, 05 May 2020 14:54:20 GMT

btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420173287



##########
File path: .github/workflows/build.yml
##########
@@ -73,52 +73,18 @@ jobs:
                 ;;
             esac
           fi
-
-          echo ::set-output name=os_ref::$OS_REF
-          echo ::set-output name=apps_ref::$APPS_REF
-          echo ::set-output name=testing_ref::$TESTING_REF
-
-      - name: Checkout nuttx repo
-        uses: actions/checkout@v2
-        with:
-          repository: apache/incubator-nuttx
-          ref: ${{ steps.gittargets.outputs.os_ref }}
-          path: sources/nuttx
-          fetch-depth: 1
-
-      - name: Checkout apps repo
-        uses: actions/checkout@v2
+          echo "#!/bin/sh" > gitenv.sh
+          echo "echo ::set-env name=os_ref::$OS_REF" >> gitenv.sh
+          echo "echo ::set-env name=apps_ref::$APPS_REF" >> gitenv.sh
+          echo "echo ::set-env name=testing_ref::$TESTING_REF" >> gitenv.sh
+      - name: Upload gitrefs
+        uses: actions/upload-artifact@v2
         with:
-          repository: apache/incubator-nuttx-apps
-          ref: ${{ steps.gittargets.outputs.apps_ref }}
-          path: sources/apps
-          fetch-depth: 1
-
-      - name: Checkout testing repo
-        uses: actions/checkout@v2
-        with:
-          repository: apache/incubator-nuttx-testing
-          ref: ${{ steps.gittargets.outputs.testing_ref }}
-          path: sources/testing
-          fetch-depth: 1
-
-      - name: Create Source Bundle
-        run: tar -czf sources.tar.gz sources
-      - name: Archive Source Bundle
-        uses: actions/upload-artifact@v1
-        with:
-          name: source-bundle
-          path: sources.tar.gz
-
-      - name: Cache Source
-        id: cache-source
-        uses: actions/cache@v1
-        with:
-          path: sources
-          key: build-sources-${{ github.run_id }}
+          name: gitrefs
+          path: gitenv.sh
 
   Linux:
-    needs: Fetch-Source
+    needs: Compute-Source-Refs

Review comment:
       This is how github recommends that you pass information between jobs. Once they implement
templating like every other yaml based CI system we can remove this.
   
   As for why it is not a function. At this point prior to doing cloning there is not repo
to put the script in, only the workflow yaml so it must be in the yaml. Making it a job that
others depend on saves us from having to copy it to every job (currently Linux and macOS,
but soon windows as well)
   
   As for the bit about the cache, I had the cache before because it was much faster to move
the larger git repos. Now we just move 100 bytes of data so there is no reason to do the cache
since we had to support the fallback of artifacts anyway. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message