File tree Expand file tree Collapse file tree 2 files changed +118
-0
lines changed Expand file tree Collapse file tree 2 files changed +118
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build node-fibers with prebuilt Node
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows : ["Build Node"]
6
+ types :
7
+ - completed
8
+
9
+ jobs :
10
+ build-fibers :
11
+ name : Build node-fibers with custom Node
12
+ runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ include :
16
+ - platform : linux
17
+ arch : x64
18
+ - platform : linux
19
+ arch : arm64
20
+
21
+ env :
22
+ NODE_VERSION : v20.12.0
23
+
24
+ steps :
25
+ - name : Download Node archive
26
+ uses : actions/download-artifact@v4
27
+ with :
28
+ # You must match the exact name used in build-node.yml
29
+ name : node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST
30
+
31
+ - name : Extract Node archive
32
+ run : |
33
+ mkdir -p node-install
34
+ tar -C node-install -xJf node-*.tar.xz
35
+ echo "$GITHUB_WORKSPACE/node-install/usr/local/bin" >> $GITHUB_PATH
36
+
37
+ - name : Checkout node-fibers fork
38
+ uses : actions/checkout@v3
39
+ with :
40
+ repository : asana/node-fibers
41
+ ref : jackstrohm_node20_fibers
42
+ path : node-fibers
43
+
44
+ - name : Build node-fibers
45
+ working-directory : node-fibers
46
+ run : |
47
+ which node
48
+ node -v
49
+ npm install --nodedir="$GITHUB_WORKSPACE/node-install/usr/local"
50
+ npm test
51
+
Original file line number Diff line number Diff line change
1
+ name : Build Node
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - v20.18.3
7
+
8
+ jobs :
9
+ build-node :
10
+ name : Build ${{ matrix.platform }}-${{ matrix.arch }}
11
+ runs-on : ${{ matrix.runner }}
12
+ strategy :
13
+ matrix :
14
+ include :
15
+ - platform : linux
16
+ arch : x64
17
+ runner : ubuntu-latest
18
+ - platform : linux
19
+ arch : arm64
20
+ runner : ubuntu-latest
21
+
22
+ env :
23
+ NODE_VERSION : v20.12.0
24
+ S3_BUCKET : your-bucket-name
25
+ AWS_REGION : us-east-1
26
+
27
+ steps :
28
+ - name : Checkout Node fork
29
+ uses : actions/checkout@v3
30
+ with :
31
+ repository : Asana/node
32
+ path : node
33
+
34
+ - name : Set build metadata
35
+ id : meta
36
+ working-directory : node
37
+ run : |
38
+ TIMESTAMP=$(date -u +%Y-%m-%dT%H-%M)
39
+ SHORT_SHA=$(git rev-parse --short HEAD)
40
+ echo "BUILD_ID=${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_ENV
41
+ echo "build_id=${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_OUTPUT
42
+
43
+ - name : Install dependencies (Linux)
44
+ if : matrix.platform == 'linux'
45
+ run : |
46
+ sudo apt-get update
47
+ sudo apt-get install -y python3 g++ make curl tar xz-utils
48
+
49
+ - name : Build Node
50
+ working-directory : node
51
+ run : |
52
+ ./configure --experimental-enable-pointer-compression
53
+ make -j4 install DESTDIR=$GITHUB_WORKSPACE/node-install
54
+
55
+ - name : Archive Node
56
+ run : |
57
+ mkdir -p artifacts
58
+ FILENAME=node-${NODE_VERSION}-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.meta.outputs.build_id }}.tar.xz
59
+ tar -C node-install -cJf artifacts/$FILENAME .
60
+ echo "NODE_ARCHIVE=$FILENAME" >> $GITHUB_ENV
61
+
62
+ - name : Upload Node archive
63
+ uses : actions/upload-artifact@v4
64
+ with :
65
+ name : node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.meta.outputs.build_id }}
66
+ path : artifacts/${{ env.NODE_ARCHIVE }}
67
+
You can’t perform that action at this time.
0 commit comments