You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/05/05 06:13:18 UTC
[GitHub] [incubator-nuttx-apps] btashton opened a new pull request #230: [DO-NOT-MERGE] Alternative CI fix
btashton opened a new pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420283175
##########
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:
Nope only if you make it a Docker action which limits you to Linux. Our only option would be JavaScript.
https://help.github.com/en/actions/building-actions/about-actions#types-of-actions
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on pull request #230: [DO-NOT-MERGE] Alternative CI fix
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#issuecomment-623905675
@xiaoxiang781216 How about this? This seems like a much better way to go. It also addresses both of our concerns with pulling the tags
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420251637
##########
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:
That is a good option in the since that it actually can be stored in the testing repo (see what I did for the Linux build step). But it means that we would need to write it in nodejs since you cannot use the docker action on macOS or Windows. I was trying to avoid writing nodejs from a maintenance standpoint. I can try it if you think it's ok.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420175596
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
+ run: source gitrefs-rt/gitenv.sh
+
+ - name: Checkout nuttx repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx
- ref: ${{ env.nuttx_sha }}
+ ref: ${{ env.os_ref }}
path: sources/nuttx
fetch-depth: 1
- - name: Get Tags for NuttX Repo
- run: git -C sources/nuttx fetch --tags
+ - run: git -C sources/nuttx pull --tags
Review comment:
We should consider that this might not be a branch and instead the merge ref that is being tested (that's what you get by default with the checkout action if no ref is explicitly set). This matches the existing functionally so I don't see a reason to change it.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420312695
##########
File path: .github/workflows/build.yml
##########
@@ -74,51 +79,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
- 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
+ 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
Review comment:
gitrefs to gitenv?
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420259252
##########
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:
Can we use bash script here?
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton closed pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton closed pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420313284
##########
File path: .github/workflows/build.yml
##########
@@ -21,17 +21,22 @@ on:
tags:
jobs:
- Fetch-Source:
+ Compute-Source-Refs:
Review comment:
Compute-Source-Refs==>Environment?
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420311898
##########
File path: .github/workflows/build.yml
##########
@@ -74,51 +79,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
- 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
+ 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:
- path: sources
- key: build-sources-${{ github.run_id }}
+ name: gitrefs
Review comment:
change gitrefs to gitenv?
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420218871
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
Review comment:
All steps have a name but "uses: actions/download-artifact@v2" don't have. so I suppose that it's one step from line 118 to line 123, and should order like this:
- name: Export Repo Refs
- uses: actions/download-artifact@v2
with:
name: gitrefs
path: gitrefs-rt/
run: source gitrefs-rt/gitenv.sh
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420205239
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
+ run: source gitrefs-rt/gitenv.sh
+
+ - name: Checkout nuttx repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx
- ref: ${{ env.nuttx_sha }}
+ ref: ${{ env.os_ref }}
path: sources/nuttx
fetch-depth: 1
- - name: Get Tags for NuttX Repo
- run: git -C sources/nuttx fetch --tags
+ - run: git -C sources/nuttx pull --tags
Review comment:
Ok.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420007295
##########
File path: .github/workflows/build.yml
##########
@@ -217,17 +172,38 @@ jobs:
path: prebuilt
key: ${{ runner.os }}-tools-${{ hashFiles('./sources/testing/cibuild.sh') }}
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
Review comment:
move before "uses: actions/download-artifact@v2"
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420314197
##########
File path: .github/workflows/build.yml
##########
@@ -74,51 +79,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
- 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
+ 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:
- path: sources
- key: build-sources-${{ github.run_id }}
+ name: gitrefs
+ path: gitenv.sh
Review comment:
After some thought, env.sh may a better name because we may add new variable not related to git in the furture.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420219230
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +115,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
Review comment:
should we directly donwload to current the directory?
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#issuecomment-624995527
@xiaoxiang781216 I am going to wait on this until the weekend and see if I can just write the javascript action to managed the repos logic. It will make it easy to add the PR linking logic that we have been needing and bit us today.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#issuecomment-625016367
Sure, thanks for your effort to improve the github action so much.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420243794
##########
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)
>
I mean the funciton in action yml not in bash script. Maybe the step is better term than function in this context.
> 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.
sharing the code by job need save the result to script and then load/execute this script in other jobs. Can we use the common step to share the code like:
https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
```
Example using action in the same repository as the workflow
./path/to/dir
The path to the directory that contains the action in your workflow's repository. You must check out your repository before using the action.
jobs:
my_first_job:
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Use local my-action
uses: ./.github/actions/my-action
```
Or even put the common step in the same yml file:
https://github.com/actions/checkout/blob/master/action.yml
```
name: 'Checkout'
description: 'Checkout a Git repository at a particular version'
...
runs:
using: node12
main: dist/index.js
post: dist/index.js
```
I guess that Compute-Source-Refs become a common step if we move Compute-Source-Refs out of the job.
From my understand, once the common code become to a step, we can use it inside Linux/macOS job and get the result directly.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420221055
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
Review comment:
Ah I see the confusion. That is actually two steps. Every '-' is a step, you cannot have a 'run' and a 'uses' in the same step.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420176402
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
Review comment:
This is the name for the step that does the export. Do you want me to add a new name to the artifacts download step so it does not use it's default.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420223161
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +115,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
Review comment:
Sounds good.
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #230: CI: Simplify flow for checking out repos
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #230:
URL: https://github.com/apache/incubator-nuttx-apps/pull/230#discussion_r420003040
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
Review comment:
move before "uses: actions/download-artifact@v2"
##########
File path: .github/workflows/build.yml
##########
@@ -162,17 +109,38 @@ jobs:
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- - name: Export NuttX Repo SHA
- run: echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
- - name: Refresh Git Credentials
+ - uses: actions/download-artifact@v2
+ with:
+ name: gitrefs
+ path: gitrefs-rt/
+ - name: Export Repo Refs
+ run: source gitrefs-rt/gitenv.sh
+
+ - name: Checkout nuttx repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx
- ref: ${{ env.nuttx_sha }}
+ ref: ${{ env.os_ref }}
path: sources/nuttx
fetch-depth: 1
- - name: Get Tags for NuttX Repo
- run: git -C sources/nuttx fetch --tags
+ - run: git -C sources/nuttx pull --tags
Review comment:
Should we use "git -C sources/nuttx fetch --prune --unshallow" to get both branch and tag? I am afraid that we may want the branch at the late time.
##########
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:
But Compute-Source-Refs don't generate and upload the cache anymore, why don't we move os_ref/apps_ref/testing_ref into a common function? So we can invoke it in macOS/Linux directly. The current workflow which upload/download gitenv.sh seems too complex.
----------------------------------------------------------------
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