-
-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (72 loc) · 1.89 KB
/
swc4j_build.yml
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
name: swc4j Build
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "docs/**"
push:
branches:
- main
paths-ignore:
- "**.md"
- "docs/**"
env:
SWC4J_VERSION: 0.2.0
jobs:
build_swc4j_lib:
strategy:
matrix:
include:
- image: windows-latest
os: windows
arch: x86_64
ext: .dll
- image: ubuntu-latest
os: linux
arch: x86_64
ext: .so
- image: macos-latest
os: macos
arch: x86_64
ext: .dylib
- image: macos-14
os: macos
arch: arm64
ext: .dylib
name: Build swc4j for ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.image }}
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
- name: Cargo Build and Test
env:
RUSTFLAGS: -Awarnings
run: |
cd rust
cargo build -r
cargo test -r
deno run --allow-all ../scripts/ts/copy_swc4j_lib.ts -o ${{ matrix.os }} -a ${{ matrix.arch }}
- name: Setup JDK 8
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 8
- name: Build and Test
run: |
gradle build test generatePomFileForGeneratePomPublication --rerun-tasks --debug
- name: Upload the Artifact
uses: actions/upload-artifact@v4
with:
name: swc4j-${{ matrix.os }}-${{ matrix.arch }}-${{ env.SWC4J_VERSION }}
path: |
build/libs/swc4j-${{ env.SWC4J_VERSION }}.jar
build/libs/swc4j-${{ env.SWC4J_VERSION }}.pom