forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (78 loc) Β· 2.73 KB
/
build-node-fibers.yml
File metadata and controls
89 lines (78 loc) Β· 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build node-fibers with prebuilt Node
on:
workflow_dispatch:
workflow_run:
workflows: [Build Node]
types:
- completed
pull_request:
paths: .github/workflows/build-node-fibers.yml
jobs:
build-fibers:
strategy:
matrix:
include:
- platform: linux
arch: x64
runs_on: ubuntu-22.04
- platform: linux
arch: arm64
runs_on: ubuntu-22.04-arm
runs-on: ${{ matrix.runs_on }}
env:
NODE_VERSION: v20.18.3
steps:
- name: Debug Matrix Values
run: |
echo "Matrix platform: ${{ matrix.platform }}"
echo "Matrix arch: ${{ matrix.arch }}"
- name: Download Node archive
run: |
gh release download node-${{ env.NODE_VERSION }}-release \
--repo asana/node \
--pattern "node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Node archive
run: |
mkdir -p node-install
tar -C node-install -xJf node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz
echo "$GITHUB_WORKSPACE/node-install/usr/local/bin" >> $GITHUB_PATH
- name: Verify Node Binary Architecture
run: |
echo "Node File:"
file $GITHUB_WORKSPACE/node-install/usr/local/bin/node
echo "Runner architecture:"
uname -m
- name: Checkout node-fibers fork
uses: actions/checkout@v3
with:
repository: asana/node-fibers
ref: jackstrohm_node20_fibers
path: node-fibers
- name: Build node-fibers
working-directory: node-fibers
run: |
which node
node -v
node -p "process.arch"
npm install --nodedir="$GITHUB_WORKSPACE/node-install/usr/local"
npm test || true
rm bin/repl
find .
- name: Find and archive fibers.node
run: |
# Find the directory under bin/ that contains fibers.node
FIBERS_PATH=$(find ./node-fibers/bin -type f -name fibers.node | head -n1)
FIBERS_DIR=$(dirname "$FIBERS_PATH")
ARCHIVE_NAME=$(basename "$FIBERS_DIR").tar.gz
echo "ARCHIVE_NAME=$ARCHIVE_NAME" >> $GITHUB_ENV
tar -czf "$ARCHIVE_NAME" -C "$(dirname "$FIBERS_DIR")" "$(basename "$FIBERS_DIR")"
- name: Upload archive to release
uses: softprops/action-gh-release@v1
with:
name: node-${{ env.NODE_VERSION }}-LATEST
tag_name: node-${{ env.NODE_VERSION }}-release
files: ${{ env.ARCHIVE_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}