From 7b40cb74fa1bfeec0349b65a3652b9e9678dbb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Tue, 27 Sep 2022 14:46:28 +0100 Subject: [PATCH 01/35] Create main.yml --- .github/workflows/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000000..cf16d0c6392 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build workerd + run: bazel build -c opt //src/workerd/server:workerd From 858befc5b51bd389035ff64478df29969730e22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Tue, 27 Sep 2022 14:53:14 +0100 Subject: [PATCH 02/35] Update main.yml --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cf16d0c6392..94bcf9550c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,9 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Install dependencies + run: apt -y install libc++-dev libc++abi-dev - name: Build workerd run: bazel build -c opt //src/workerd/server:workerd From f5cceec16d08e6b0d9200fd2bc767f0f5210e764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Tue, 27 Sep 2022 14:59:12 +0100 Subject: [PATCH 03/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94bcf9550c7..ba24377c587 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies - run: apt -y install libc++-dev libc++abi-dev + run: sudo apt-get -y install libc++-dev libc++abi-dev - name: Build workerd run: bazel build -c opt //src/workerd/server:workerd From a6c49847aaa24a01364b2545284563c4ccd9c565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Tue, 27 Sep 2022 15:03:02 +0100 Subject: [PATCH 04/35] Update main.yml --- .github/workflows/main.yml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba24377c587..4d14a4cb359 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,20 +1,32 @@ -name: CI +name: Tests on: - push: - branches: [ "main" ] pull_request: - branches: [ "main" ] + paths-ignore: + - 'doc/**' + push: + branches: + - main jobs: - build: - runs-on: ubuntu-latest - + Linux: + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: sudo apt-get -y install libc++-dev libc++abi-dev + - uses: actions/checkout@v2 + - uses: bazelbuild/setup-bazelisk@v2 + - name: install dependencies + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get install -y build-essential git clang libc++-dev - - name: Build workerd - run: bazel build -c opt //src/workerd/server:workerd + - name: build + run: | + bazel build -c opt //src/workerd/server:workerd + MacOS: + runs-on: macos-12 + steps: + - uses: actions/checkout@v2 + - uses: bazelbuild/setup-bazelisk@v2 + - name: build + run: | + bazel build -c opt //src/workerd/server:workerd From ed233a482419c164593c9966295b9474b278f418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Wed, 28 Sep 2022 21:56:54 +0100 Subject: [PATCH 05/35] Update main.yml --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d14a4cb359..fb72d16c8c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,13 @@ jobs: steps: - uses: actions/checkout@v2 - uses: bazelbuild/setup-bazelisk@v2 + - name: Cache + id: cache + uses: actions/cache@v2 + with: + path: /bazel-cache + key: ${{ runner.os }}-{{ runner.arch }}-bazel-cache + - name: install dependencies run: | export DEBIAN_FRONTEND=noninteractive @@ -21,12 +28,5 @@ jobs: - name: build run: | - bazel build -c opt //src/workerd/server:workerd - MacOS: - runs-on: macos-12 - steps: - - uses: actions/checkout@v2 - - uses: bazelbuild/setup-bazelisk@v2 - - name: build - run: | - bazel build -c opt //src/workerd/server:workerd + bazel build --disk_cache=/bazel-cache -c opt //src/workerd/server:workerd + From e63368c3e9de4d7682fe92025db09d083446f113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Wed, 28 Sep 2022 22:00:06 +0100 Subject: [PATCH 06/35] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb72d16c8c9..b0f8c2eb633 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,7 @@ jobs: - name: install dependencies run: | + mkdir -p /bazel-cache export DEBIAN_FRONTEND=noninteractive sudo apt-get install -y build-essential git clang libc++-dev From aa77c23ed6a3f795c74d4fc3ca251f52f2db8d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Wed, 28 Sep 2022 22:01:06 +0100 Subject: [PATCH 07/35] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0f8c2eb633..f7f2d5f279b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,16 +18,16 @@ jobs: id: cache uses: actions/cache@v2 with: - path: /bazel-cache + path: ~/bazel-cache key: ${{ runner.os }}-{{ runner.arch }}-bazel-cache - name: install dependencies run: | - mkdir -p /bazel-cache + mkdir -p ~/bazel-cache export DEBIAN_FRONTEND=noninteractive sudo apt-get install -y build-essential git clang libc++-dev - name: build run: | - bazel build --disk_cache=/bazel-cache -c opt //src/workerd/server:workerd + bazel build --disk_cache=~/bazel-cache -c opt //src/workerd/server:workerd From ecf56fe38600145aea29959145f6f6279b253862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Wed, 28 Sep 2022 22:02:07 +0100 Subject: [PATCH 08/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7f2d5f279b..2225deeff73 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: uses: actions/cache@v2 with: path: ~/bazel-cache - key: ${{ runner.os }}-{{ runner.arch }}-bazel-cache + key: ${{ runner.os }}-${{ runner.arch }}-bazel-cache - name: install dependencies run: | From 2b2d70dbe5d6abd5e8da0a9f011e384a624efcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Wed, 28 Sep 2022 22:04:23 +0100 Subject: [PATCH 09/35] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2225deeff73..08be8ce7305 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,5 +29,4 @@ jobs: - name: build run: | - bazel build --disk_cache=~/bazel-cache -c opt //src/workerd/server:workerd - + bazel build --disk_cache=~/bazel-cache @capnp-cpp//src/capnp:capnp_tool From 591d9e092b123c5bd688706fe7fb8f2d5e091949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Wed, 28 Sep 2022 22:16:52 +0100 Subject: [PATCH 10/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08be8ce7305..9202f01e02b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,4 +29,4 @@ jobs: - name: build run: | - bazel build --disk_cache=~/bazel-cache @capnp-cpp//src/capnp:capnp_tool + bazel build --disk_cache=~/bazel-cache -c opt //src/workerd/server:workerd From 765dd6658ca1f469bb70ea81632562d3f4213249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 01:18:08 +0100 Subject: [PATCH 11/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9202f01e02b..0fc7b0f1eb2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,4 +29,4 @@ jobs: - name: build run: | - bazel build --disk_cache=~/bazel-cache -c opt //src/workerd/server:workerd + bazel build --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev -c opt //src/workerd/server:workerd From a86878886818c0ef5228d9abba87b5782a96ddac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 10:04:25 +0100 Subject: [PATCH 12/35] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fc7b0f1eb2..404283f9d96 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,15 +18,15 @@ jobs: id: cache uses: actions/cache@v2 with: - path: ~/bazel-cache + path: ~/.cache/bazel key: ${{ runner.os }}-${{ runner.arch }}-bazel-cache - name: install dependencies run: | - mkdir -p ~/bazel-cache + mkdir -p ~/.cache/bazel export DEBIAN_FRONTEND=noninteractive sudo apt-get install -y build-essential git clang libc++-dev - name: build run: | - bazel build --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev -c opt //src/workerd/server:workerd + bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev -c opt //src/workerd/server:workerd From cd56f4534da3e903939b3f159418b73dc6583e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 10:44:34 +0100 Subject: [PATCH 13/35] Update compatibility-date.capnp --- src/workerd/io/compatibility-date.capnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workerd/io/compatibility-date.capnp b/src/workerd/io/compatibility-date.capnp index bcb51c2a9c4..7a991f83730 100644 --- a/src/workerd/io/compatibility-date.capnp +++ b/src/workerd/io/compatibility-date.capnp @@ -6,7 +6,7 @@ $import "/capnp/c++.capnp".namespace("workerd"); -const supportedCompatibilityDate :Text = "2022-09-26"; +const supportedCompatibilityDate :Text = "2022-09-29"; # Newest compatibility date that can safely be set using code compiled from this repo. Trying to # run a Worker with a newer compatibility date than this will fail. # From 18095bc011668e74c9da32ebae57b20fd84ed24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 10:45:03 +0100 Subject: [PATCH 14/35] Update compatibility-date.capnp --- src/workerd/io/compatibility-date.capnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workerd/io/compatibility-date.capnp b/src/workerd/io/compatibility-date.capnp index bcb51c2a9c4..7a991f83730 100644 --- a/src/workerd/io/compatibility-date.capnp +++ b/src/workerd/io/compatibility-date.capnp @@ -6,7 +6,7 @@ $import "/capnp/c++.capnp".namespace("workerd"); -const supportedCompatibilityDate :Text = "2022-09-26"; +const supportedCompatibilityDate :Text = "2022-09-29"; # Newest compatibility date that can safely be set using code compiled from this repo. Trying to # run a Worker with a newer compatibility date than this will fail. # From e0134a4d58b54950658ed9daf1054992be2d92ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:03:53 +0100 Subject: [PATCH 15/35] Update build-npm-package.sh --- build-npm-package.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-npm-package.sh b/build-npm-package.sh index 3914b3afec2..336ab05823f 100644 --- a/build-npm-package.sh +++ b/build-npm-package.sh @@ -19,6 +19,12 @@ bazel_build() { } case $1 in +version) + echo $WORKERD_VERSION + ;; +date) + echo $LATEST_COMPATIBILITY_DATE + ;; build-darwin-arm64) bazel_build npm/workerd-darwin-arm64 ;; From a833cd3b30aa6084c82915999738147c258a95ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:08:04 +0100 Subject: [PATCH 16/35] Update main.yml --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 404283f9d96..5508881f4c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,3 +30,9 @@ jobs: - name: build run: | bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev -c opt //src/workerd/server:workerd + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.0 + with: + name: ${{ runner.os }}-${{ runner.arch }}-binary + path: bazel-bin/src/workerd/server/workerd + From 0cd0529eae5c24af553fe7057554954f5aa92a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:27:51 +0100 Subject: [PATCH 17/35] Update main.yml --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5508881f4c7..31fae5c5c3d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: - main jobs: - Linux: + linux: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -30,9 +30,44 @@ jobs: - name: build run: | bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev -c opt //src/workerd/server:workerd - - name: Upload a Build Artifact + - name: Upload binary uses: actions/upload-artifact@v3.1.0 with: name: ${{ runner.os }}-${{ runner.arch }}-binary path: bazel-bin/src/workerd/server/workerd + release: + # if: ${{ github.repository_owner == 'cloudflare' }} + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Use Node.js 16.13 + uses: actions/setup-node@v3 + with: + node-version: 16.13 + cache: "npm" # cache ~/.npm in case 'npm ci' needs to run + + - name: Install NPM Dependencies + run: npm ci + + - name: Check the build + run: npm run build + + - name: Check for other errors + run: npm run check + + - name: Create Release + id: changesets + uses: changesets/action@v1 + with: + publish: bash 'echo PUBLISH' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} +# NODE_ENV: "production" + From ad4f2564b7dc17d53570ec1ae2c40d9696c79d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:30:08 +0100 Subject: [PATCH 18/35] Update main.yml --- .github/workflows/main.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31fae5c5c3d..5f53bb8565d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,12 +29,12 @@ jobs: - name: build run: | - bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev -c opt //src/workerd/server:workerd + bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev @capnp-cpp//src/capnp:capnp_tool - name: Upload binary uses: actions/upload-artifact@v3.1.0 with: name: ${{ runner.os }}-${{ runner.arch }}-binary - path: bazel-bin/src/workerd/server/workerd + path: bazel-bin/external/capnp-cpp/src/capnp/capnp_tool release: # if: ${{ github.repository_owner == 'cloudflare' }} @@ -52,15 +52,6 @@ jobs: node-version: 16.13 cache: "npm" # cache ~/.npm in case 'npm ci' needs to run - - name: Install NPM Dependencies - run: npm ci - - - name: Check the build - run: npm run build - - - name: Check for other errors - run: npm run check - - name: Create Release id: changesets uses: changesets/action@v1 From 6b9127977f9ef94994420193765e434bcdc753da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:30:56 +0100 Subject: [PATCH 19/35] Update main.yml --- .github/workflows/main.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f53bb8565d..7489e29fc3c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,12 +46,6 @@ jobs: with: fetch-depth: 0 - - name: Use Node.js 16.13 - uses: actions/setup-node@v3 - with: - node-version: 16.13 - cache: "npm" # cache ~/.npm in case 'npm ci' needs to run - - name: Create Release id: changesets uses: changesets/action@v1 From 2e23b42effd3e8752dacd4e0481a0446045cc517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:36:57 +0100 Subject: [PATCH 20/35] Create autotag.yml --- .github/workflows/autotag.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/autotag.yml diff --git a/.github/workflows/autotag.yml b/.github/workflows/autotag.yml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/.github/workflows/autotag.yml @@ -0,0 +1 @@ + From 4d8a2c70fef50e0c6bc1736ead15a7bc0c48424b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:40:27 +0100 Subject: [PATCH 21/35] Update main.yml --- .github/workflows/main.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7489e29fc3c..b82949f09ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: name: ${{ runner.os }}-${{ runner.arch }}-binary path: bazel-bin/external/capnp-cpp/src/capnp/capnp_tool - release: + tag: # if: ${{ github.repository_owner == 'cloudflare' }} name: Release runs-on: ubuntu-latest @@ -46,13 +46,8 @@ jobs: with: fetch-depth: 0 - - name: Create Release - id: changesets - uses: changesets/action@v1 + - run: bash build-npm-package.sh build-shim + - uses: butlerlogic/action-autotag@stable with: - publish: bash 'echo PUBLISH' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} -# NODE_ENV: "production" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From ffa95b24019e7e179e684c4e8c7077a7796d42ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:41:36 +0100 Subject: [PATCH 22/35] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b82949f09ea..8f1625f61d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,5 +49,7 @@ jobs: - run: bash build-npm-package.sh build-shim - uses: butlerlogic/action-autotag@stable with: + strategy: package + root: "npm/workerd" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From 27dde085f68c7aca51f556d45d1d3e48c2280cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:48:59 +0100 Subject: [PATCH 23/35] Update main.yml --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f1625f61d5..b5a6b480294 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,30 @@ on: - main jobs: + version: + outputs: + version: ${{ steps.vecho.outputs.version }} + date: ${{ steps.decho.outputs.date }} + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: bazelbuild/setup-bazelisk@v2 + - name: Cache + id: cache + uses: actions/cache@v2 + with: + path: ~/.cache/bazel + key: capnp-cache + - name: build capnp + run: | + bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev @capnp-cpp//src/capnp:capnp_tool + - id: vecho + run: | + echo '::set-output name=version::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)' + - id: decho + run: | + echo '::set-output name=date::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d \'-\' | tr -d \'"\').0' + linux: runs-on: ubuntu-22.04 steps: @@ -45,11 +69,3 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - - run: bash build-npm-package.sh build-shim - - uses: butlerlogic/action-autotag@stable - with: - strategy: package - root: "npm/workerd" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - From 125e94e7ebd62f2b867476973ed7fd84d422f71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 11:51:03 +0100 Subject: [PATCH 24/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5a6b480294..0aa126c4a2d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: echo '::set-output name=version::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)' - id: decho run: | - echo '::set-output name=date::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d \'-\' | tr -d \'"\').0' + echo '::set-output name=date::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d \'-\' | tr -d \'\"\').0' linux: runs-on: ubuntu-22.04 From 9a1c6285a12d6698cf84014174c00ffe5562cad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:07:59 +0100 Subject: [PATCH 25/35] Update main.yml --- .github/workflows/main.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0aa126c4a2d..017f3bd8da1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,7 @@ on: jobs: version: outputs: - version: ${{ steps.vecho.outputs.version }} - date: ${{ steps.decho.outputs.date }} + date: ${{ steps.echo.outputs.date }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -26,13 +25,10 @@ jobs: - name: build capnp run: | bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev @capnp-cpp//src/capnp:capnp_tool - - id: vecho + - id: echo run: | - echo '::set-output name=version::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)' - - id: decho - run: | - echo '::set-output name=date::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d \'-\' | tr -d \'\"\').0' - + echo '::set-output name=date::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)' + linux: runs-on: ubuntu-22.04 steps: @@ -60,12 +56,26 @@ jobs: name: ${{ runner.os }}-${{ runner.arch }}-binary path: bazel-bin/external/capnp-cpp/src/capnp/capnp_tool - tag: + release: # if: ${{ github.repository_owner == 'cloudflare' }} name: Release + needs: [version, linux] runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: compatibility-${{ needs.version.outputs.date }} + + + + + + + From 7e5fb6da9df2ca56043ef90231736cd36655bb2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:11:36 +0100 Subject: [PATCH 26/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 017f3bd8da1..6babd4180d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev @capnp-cpp//src/capnp:capnp_tool - id: echo run: | - echo '::set-output name=date::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)' + echo "::set-output name=date::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)" linux: runs-on: ubuntu-22.04 From e2e72bf88633b60ed608c682fe38c5db16f08d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:16:15 +0100 Subject: [PATCH 27/35] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6babd4180d5..5dfd37c47e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: version: outputs: - date: ${{ steps.echo.outputs.date }} + date: ${{ steps.echo.outputs.version }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -27,7 +27,7 @@ jobs: bazel build --remote_timeout=5 --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.s.workers.dev @capnp-cpp//src/capnp:capnp_tool - id: echo run: | - echo "::set-output name=date::$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)" + echo "::set-output name=version::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d '-' | tr -d '"').0" linux: runs-on: ubuntu-22.04 @@ -71,7 +71,7 @@ jobs: uses: mathieudutour/github-tag-action@v6.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - custom_tag: compatibility-${{ needs.version.outputs.date }} + custom_tag: ${{ needs.version.outputs.version }} From 716b8023291651d336782f3dbb86e1170197487e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:19:11 +0100 Subject: [PATCH 28/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5dfd37c47e1..ca1fbe7c945 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: version: outputs: - date: ${{ steps.echo.outputs.version }} + version: ${{ steps.echo.outputs.version }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 From 585f2817da86af3cd66ad2d0a83acc8bd60ae7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:21:29 +0100 Subject: [PATCH 29/35] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca1fbe7c945..ff226b283a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,6 @@ jobs: - id: echo run: | echo "::set-output name=version::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d '-' | tr -d '"').0" - linux: runs-on: ubuntu-22.04 steps: From 04f9a9921113228df400c83bceaaaad598f9e736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:28:54 +0100 Subject: [PATCH 30/35] Update main.yml --- .github/workflows/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff226b283a2..00cd5ed8e5e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,16 +65,28 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Bump version and push tag + - name: Tag with compatibility date id: tag_version uses: mathieudutour/github-tag-action@v6.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: ${{ needs.version.outputs.version }} + - name: Download a Build Artifact + uses: actions/download-artifact@v3.0.0 + with: + # Artifact name + name: Linux-X64-binary + # Destination path + path: /bin/workerd-linux-64 + - uses: ncipollo/release-action@v1 + with: + artifacts: "/bin/workerd-linux-64" + generateReleaseNotes: true + token: ${{ secrets.YOUR_GITHUB_TOKEN }} - + From e410ae515ab8bacbbdbc0d6cbf1e632753f69bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:30:18 +0100 Subject: [PATCH 31/35] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00cd5ed8e5e..810053b8617 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,10 +77,10 @@ jobs: # Artifact name name: Linux-X64-binary # Destination path - path: /bin/workerd-linux-64 + path: /tmp/workerd-linux-64 - uses: ncipollo/release-action@v1 with: - artifacts: "/bin/workerd-linux-64" + artifacts: "/tmp/workerd-linux-64" generateReleaseNotes: true token: ${{ secrets.YOUR_GITHUB_TOKEN }} From 32bc594604923fd2c685bbe5a70bf5b6b23a45a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:31:39 +0100 Subject: [PATCH 32/35] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 810053b8617..7d378046aee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: with: artifacts: "/tmp/workerd-linux-64" generateReleaseNotes: true - token: ${{ secrets.YOUR_GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} From 51d40fdad47912e3afc231c1c548ec4f8a9453e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:35:54 +0100 Subject: [PATCH 33/35] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d378046aee..aa6cb07643d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,6 +83,7 @@ jobs: artifacts: "/tmp/workerd-linux-64" generateReleaseNotes: true token: ${{ secrets.GITHUB_TOKEN }} + tag: v${{ needs.version.outputs.version }} From d0ac1176b76aa70453edecb46acdac571167449d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:38:57 +0100 Subject: [PATCH 34/35] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa6cb07643d..6037556b576 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,10 +77,10 @@ jobs: # Artifact name name: Linux-X64-binary # Destination path - path: /tmp/workerd-linux-64 + path: /tmp - uses: ncipollo/release-action@v1 with: - artifacts: "/tmp/workerd-linux-64" + artifacts: "/tmp/Linux-X64-binary" generateReleaseNotes: true token: ${{ secrets.GITHUB_TOKEN }} tag: v${{ needs.version.outputs.version }} From b0d038fbde5c8bf157656751eb30ce9707fdc9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 29 Sep 2022 12:39:30 +0100 Subject: [PATCH 35/35] Update compatibility-date.capnp --- src/workerd/io/compatibility-date.capnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workerd/io/compatibility-date.capnp b/src/workerd/io/compatibility-date.capnp index 7a991f83730..1dd37ccdd68 100644 --- a/src/workerd/io/compatibility-date.capnp +++ b/src/workerd/io/compatibility-date.capnp @@ -6,7 +6,7 @@ $import "/capnp/c++.capnp".namespace("workerd"); -const supportedCompatibilityDate :Text = "2022-09-29"; +const supportedCompatibilityDate :Text = "2022-09-30"; # Newest compatibility date that can safely be set using code compiled from this repo. Trying to # run a Worker with a newer compatibility date than this will fail. #