Skip to content

Commit 623b269

Browse files
committed
Enable GitHub Actions
1 parent 8b7154a commit 623b269

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

.github/workflows/build.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Build
2+
on:
3+
- push
4+
5+
jobs:
6+
buildi-macos:
7+
name: Build (macOS)
8+
runs-on: macos-10.15
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Bundle
13+
run: bundle install
14+
- name: Set Node.js version
15+
run: |
16+
bundle exec ruby -e 'puts Libv8Node::NODE_VERSION' | tee node_version
17+
- name: Download Node.js
18+
run: |
19+
./download-node 12.18.4
20+
- name: Extract Node.js
21+
run: |
22+
./extract-node 12.18.4
23+
- name: Build V8
24+
run: |
25+
./build-libv8 12.18.4
26+
- name: Build Monolith
27+
run: |
28+
./build-monolith 12.18.4
29+
- name: Inject V8
30+
run: |
31+
./inject-libv8 12.18.4
32+
- name: Build gem
33+
run: |
34+
bundle exec rake build
35+
- name: Prepare artifacts
36+
run: |
37+
mkdir -p ${{ runner.temp }}/workspace
38+
cp -Rv pkg ${{ runner.temp }}/workspace/
39+
cp -Rv vendor ${{ runner.temp }}/workspace/
40+
- name: Upload v8
41+
uses: actions/upload-artifact@v1
42+
with:
43+
name: v8
44+
path: ${{ runner.temp }}/workspace/vendor
45+
- name: Upload gem
46+
uses: actions/upload-artifact@v1
47+
with:
48+
name: gem
49+
path: ${{ runner.temp }}/workspace/pkg
50+
build-linux-glibc:
51+
name: Build (Linux glibc)
52+
runs-on: ubuntu-20.04
53+
container: ruby:2.7
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v2
57+
- name: Bundle
58+
run: bundle install
59+
- name: Download Node.js
60+
run: |
61+
./download-node 12.18.4
62+
- name: Extract Node.js
63+
run: |
64+
./extract-node 12.18.4
65+
- name: Build V8
66+
run: |
67+
./build-libv8 12.18.4
68+
- name: Build Monolith
69+
run: |
70+
./build-monolith 12.18.4
71+
- name: Inject V8
72+
run: |
73+
./inject-libv8 12.18.4
74+
- name: Build gem
75+
run: |
76+
bundle exec rake build
77+
- name: Prepare artifacts
78+
run: |
79+
mkdir -p ${{ runner.temp }}/workspace
80+
cp -Rv pkg ${{ runner.temp }}/workspace/
81+
cp -Rv vendor ${{ runner.temp }}/workspace/
82+
- name: Upload v8
83+
uses: actions/upload-artifact@v1
84+
with:
85+
name: v8
86+
path: ${{ runner.temp }}/workspace/vendor
87+
- name: Upload gem
88+
uses: actions/upload-artifact@v1
89+
with:
90+
name: gem
91+
path: ${{ runner.temp }}/workspace/pkg
92+
build-linux-musl:
93+
name: Build (Linux musl)
94+
runs-on: ubuntu-20.04
95+
container: ruby:2.7-alpine
96+
steps:
97+
- name: Install system dependencies
98+
run: apk add --no-cache build-base bash python2 python3 git curl tar clang binutils-gold
99+
- name: Checkout
100+
uses: actions/checkout@v2
101+
- name: Bundle
102+
run: bundle install
103+
- name: Download Node.js
104+
run: |
105+
./download-node 12.18.4
106+
- name: Extract Node.js
107+
run: |
108+
./extract-node 12.18.4
109+
- name: Build V8
110+
run: |
111+
./build-libv8 12.18.4
112+
- name: Build Monolith
113+
run: |
114+
./build-monolith 12.18.4
115+
- name: Inject V8
116+
run: |
117+
./inject-libv8 12.18.4
118+
- name: Build gem
119+
run: |
120+
bundle exec rake build
121+
- name: Prepare artifacts
122+
run: |
123+
mkdir -p ${{ runner.temp }}/workspace
124+
cp -Rv pkg ${{ runner.temp }}/workspace/
125+
cp -Rv vendor ${{ runner.temp }}/workspace/
126+
- name: Upload v8
127+
uses: actions/upload-artifact@v1
128+
with:
129+
name: v8
130+
path: ${{ runner.temp }}/workspace/vendor
131+
- name: Upload gem
132+
uses: actions/upload-artifact@v1
133+
with:
134+
name: gem
135+
path: ${{ runner.temp }}/workspace/pkg

0 commit comments

Comments
 (0)