Skip to content

Commit 2cbeb21

Browse files
committed
add build jobs in release
1 parent 4d8805b commit 2cbeb21

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

.github/workflows/release.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,95 @@ on:
1010
required: true
1111

1212
jobs:
13+
build-android:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Rust
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
profile: minimal
21+
toolchain: 1.74.0
22+
- name: Install Rust targets
23+
run: |
24+
rustup target add aarch64-linux-android
25+
rustup target add aarch64-apple-darwin
26+
rustup target add x86_64-apple-darwin
27+
rustup target add x86_64-pc-windows-msvc
28+
- name: Set up Java
29+
uses: actions/setup-java@v2
30+
with:
31+
distribution: 'adopt'
32+
java-version: '11'
33+
- name: Set up Android NDK 17r
34+
uses: nttld/setup-ndk@v1
35+
with:
36+
ndk-version: 'r17'
37+
- name: Set up Protoc
38+
uses: arduino/setup-protoc@v2
39+
with:
40+
version: "21.x"
41+
- uses: actions/[email protected]
42+
with:
43+
node-version: 18.16.0
44+
- name: Install Node.js dependencies
45+
run: npm ci && npx tsc --version
46+
- name: Build JavaScript bundle
47+
run: |
48+
make jsbundle
49+
- name: Build library for Android
50+
run: |
51+
protoc --version
52+
make android
53+
env:
54+
USE_SYSTEM_PROTOC: "true"
55+
- name: Upload artifacts
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: jsar-runtime-android
59+
path: './build/output/release/aarch64-linux-android'
60+
61+
build-windows:
62+
runs-on: windows-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
- name: Set up Rust
66+
uses: actions-rs/toolchain@v1
67+
with:
68+
profile: minimal
69+
toolchain: 1.74.0
70+
- name: Install Rust targets
71+
run: |
72+
rustup target add aarch64-linux-android
73+
rustup target add aarch64-apple-darwin
74+
rustup target add x86_64-apple-darwin
75+
rustup target add x86_64-pc-windows-msvc
76+
- name: Set up Protoc
77+
uses: arduino/setup-protoc@v2
78+
with:
79+
version: "21.x"
80+
- uses: actions/[email protected]
81+
with:
82+
node-version: 18.16.0
83+
- name: Install Node.js dependencies
84+
run: npm ci && npx tsc --version
85+
- name: Build JavaScript bundle
86+
run: |
87+
make jsbundle
88+
- name: Build library for Windows
89+
run: |
90+
make windows
91+
env:
92+
USE_SYSTEM_PROTOC: "true"
93+
- name: Upload artifacts
94+
uses: actions/upload-artifact@v2
95+
with:
96+
name: jsar-runtime-windows
97+
path: './build/output/release/x86_64-pc-windows-msvc'
98+
1399
release:
14100
runs-on: ubuntu-latest
101+
needs: [build-android, build-windows]
15102
steps:
16103
- name: Download Windows artifact
17104
uses: actions/download-artifact@v2

0 commit comments

Comments
 (0)