-
-
Notifications
You must be signed in to change notification settings - Fork 72
chore: create GitHub action to update the canary branch #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5402d80
chore: create GitHub action to update the canary branch
targos e42ec47
Update .github/workflows/update-canary.yml
targos e82d8d8
update git user and force python 3
targos 7ca6b03
use canary update token
targos 5308014
Update README.md
targos a01ca15
Update README.md
targos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Update canary branch | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 * * *' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| updateCanary: | ||
| name: Update the canary branch | ||
| if: github.repository == 'nodejs/node-v8' || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone node-v8 | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| path: node-v8 | ||
| token: ${{ secrets.CANARY_UPDATE }} | ||
|
|
||
| - name: Install Node.js | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: 14.x | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install -g node-core-utils@latest | ||
|
|
||
| - name: Cache V8 clone | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: v8 | ||
| key: v8-clone | ||
|
|
||
targos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Execute the update script | ||
| run: ./node-v8/tools/update-canary.sh | ||
|
|
||
| - name: Notify Slack on failure | ||
| if: ${{ failure() }} | ||
| run: | | ||
| ACTIONS_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true" | ||
| SLACK_PAYLOAD="{\"username\": \"canary_bot\", \"text\": \"*Canary update failed!*\n\nRun: ${ACTIONS_URL}\", \"icon_emoji\": \":bell:\"}" | ||
| curl -X POST --data-urlencode "payload=${SLACK_PAYLOAD}" ${{ secrets.SLACK_WEBHOOK }} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Node.js V8 canary | ||
|
|
||
| This is an automatically updated **experimental** version of [Node.js][] with | ||
| the `lkgr` (last known good revision) of V8. | ||
|
|
||
| The daily builds of this repo can be found at [`v8-canary`][]. | ||
|
|
||
| **Do not use this in production!** | ||
|
|
||
| This repository is not owned by `@nodejs/v8`, but they might be able to help | ||
| with issues. | ||
|
|
||
| This project is bound by a [Code of Conduct][]. | ||
|
|
||
| [Code of Conduct]: https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md | ||
| [Node.js]: https://github.com/nodejs/node | ||
| [`v8-canary`]: https://nodejs.org/download/v8-canary/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -ex | ||
|
|
||
| cd node-v8 | ||
|
|
||
| git remote add upstream https://github.com/nodejs/node.git | ||
| git fetch upstream master | ||
| git fetch upstream canary-base | ||
|
|
||
| git config user.name "Node.js GitHub Bot" | ||
| git config user.email github-bot@iojs.org | ||
|
|
||
| git reset --hard upstream/master | ||
|
|
||
| # Update V8 to the lkgr branch | ||
| git-node v8 major --branch=lkgr --base-dir="$GITHUB_WORKSPACE" | ||
|
|
||
| # Cherry-pick the floating V8 patches Node.js maintains on master. | ||
| # Canary-base is the last good version of canary, and is manually updated with any V8 patches or backports. | ||
| git cherry-pick `git log upstream/canary-base -1 --format=format:%H --grep "src: update NODE_MODULE_VERSION"`...upstream/canary-base | ||
|
|
||
| # Verify that Node.js can be compiled and executed | ||
| python3 ./configure | ||
| make -j $(getconf _NPROCESSORS_ONLN) V= | ||
| out/Release/node test/parallel/test-process-versions.js | ||
|
|
||
| # Force-push to the canary branch. | ||
| git push --force origin HEAD:canary |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.