From 5402d80c51494b9e65a359753b50309077410c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 13 Sep 2020 10:10:09 +0200 Subject: [PATCH 1/6] chore: create GitHub action to update the canary branch --- .github/workflows/update-canary.yml | 43 +++++++++++++++++++++++++++++ README.md | 17 ++++++++++++ tools/update-canary.sh | 29 +++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 .github/workflows/update-canary.yml create mode 100644 README.md create mode 100755 tools/update-canary.sh diff --git a/.github/workflows/update-canary.yml b/.github/workflows/update-canary.yml new file mode 100644 index 00000000000..e622d68619f --- /dev/null +++ b/.github/workflows/update-canary.yml @@ -0,0 +1,43 @@ +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 + + - 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 + + - name: Execute the update script + run: ./node-v8/tools/update-canary.sh + + - name: Notify Slack on failure + if: ${{ failure() }} + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + 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 }} diff --git a/README.md b/README.md new file mode 100644 index 00000000000..38596b78871 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# node-v8 + +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/master/CODE_OF_CONDUCT.md +[Node.js]: https://github.com/nodejs/node +[`v8-canary`]: https://nodejs.org/download/v8-canary/ diff --git a/tools/update-canary.sh b/tools/update-canary.sh new file mode 100755 index 00000000000..a79b37cced1 --- /dev/null +++ b/tools/update-canary.sh @@ -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 github-actions +git config user.email github-actions@github.com + +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 +python ./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 From e42ec470aafeeb8f8508cd483fbe00a9729e65e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 31 Jan 2021 12:54:45 +0100 Subject: [PATCH 2/6] Update .github/workflows/update-canary.yml --- .github/workflows/update-canary.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/update-canary.yml b/.github/workflows/update-canary.yml index e622d68619f..40073ee8818 100644 --- a/.github/workflows/update-canary.yml +++ b/.github/workflows/update-canary.yml @@ -35,8 +35,6 @@ jobs: - name: Notify Slack on failure if: ${{ failure() }} - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} 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:\"}" From e82d8d82ac99994286493ac64237eff25de20605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 11 Apr 2021 09:29:37 +0200 Subject: [PATCH 3/6] update git user and force python 3 --- tools/update-canary.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/update-canary.sh b/tools/update-canary.sh index a79b37cced1..3ed159b5609 100755 --- a/tools/update-canary.sh +++ b/tools/update-canary.sh @@ -8,8 +8,8 @@ git remote add upstream https://github.com/nodejs/node.git git fetch upstream master git fetch upstream canary-base -git config user.name github-actions -git config user.email github-actions@github.com +git config user.name "Node.js GitHub Bot" +git config user.email github-bot@iojs.org git reset --hard upstream/master @@ -21,7 +21,7 @@ git-node v8 major --branch=lkgr --base-dir="$GITHUB_WORKSPACE" 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 -python ./configure +python3 ./configure make -j $(getconf _NPROCESSORS_ONLN) V= out/Release/node test/parallel/test-process-versions.js From 7ca6b037537dd69258050ac9431cf91000e5ae96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 11 Apr 2021 09:34:20 +0200 Subject: [PATCH 4/6] use canary update token --- .github/workflows/update-canary.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-canary.yml b/.github/workflows/update-canary.yml index 40073ee8818..28185b3705f 100644 --- a/.github/workflows/update-canary.yml +++ b/.github/workflows/update-canary.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v2 with: path: node-v8 + token: ${{ secrets.CANARY_UPDATE }} - name: Install Node.js uses: actions/setup-node@v2 From 53080146ae802a0ccffb7d8531e37c2455136f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 11 Apr 2021 11:01:49 +0200 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38596b78871..63d949ce61a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# node-v8 +# Node.js V8 canary This is an automatically updated **experimental** version of [Node.js][] with the `lkgr` (last known good revision) of V8. From a01ca158711528c90211c6108d14d11524111fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 11 Apr 2021 11:03:03 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63d949ce61a..d40560f8ffc 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,6 @@ with issues. This project is bound by a [Code of Conduct][]. -[Code of Conduct]: https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md +[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/