Skip to content

Commit c610868

Browse files
authored
chore: add missing java versions (#108)
* chore: add missing java versions * chore(ci): use jdk 21 * chore(ci): use jdk 21 * fix(java): set versions 19, 20 and 21 as constant numbers * Update test.yml * Update test.yml * ci: fix win32 build * ci: fix win32 build * ci: fix win32 build * ci: fix win32 build * ci: fix macos build * ci: fix publish.yml * ci: fix publish.yml * ci: fix publish.yml * ci: fix publish.yml * chore: add more log messages
1 parent ec3d822 commit c610868

File tree

30 files changed

+1581
-1141
lines changed

30 files changed

+1581
-1141
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ A clear and concise description of what you expected to happen.
1717

1818
**Environment**
1919

20-
- OS: [e.g. Windows]
21-
- Node.js version: [e.g. 16]
22-
- Java version: [e.g. 11]
23-
- Version of this package: [e.g. 2.1.0]
20+
- OS: [e.g. Windows]
21+
- Node.js version: [e.g. 16]
22+
- Java version: [e.g. 11]
23+
- Version of this package: [e.g. 2.1.0]
2424

2525
**Additional context**
2626
Add any other context about the problem here.

.github/workflows/publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup Node.js environment
4848
uses: actions/setup-node@v4
4949
with:
50-
node-version: 20.x
50+
node-version: 22.x
5151
- name: Setup Java JDK
5252
uses: actions/setup-java@v4
5353
with:
@@ -67,6 +67,7 @@ jobs:
6767
run: npm ci
6868
- name: Build
6969
run: npm run build -- -- --target ${{ matrix.target }}
70+
shell: bash
7071
- name: Get version
7172
id: version
7273
run: echo "version=$(node -p 'require(`./package.json`).version')" >> $GITHUB_ENV
@@ -78,7 +79,7 @@ jobs:
7879
run: mv java.*.node npm/${{ matrix.package }}
7980
shell: bash
8081
- name: NPM Publish Binary
81-
uses: JS-DevTools/npm-publish@v3
82+
uses: JS-DevTools/npm-publish@e06fe3ef65499b38eb12224f2a60979f6d797330
8283
if: ${{ matrix.package != 'linux-x64-gnu' }}
8384
with:
8485
access: public
@@ -87,7 +88,7 @@ jobs:
8788
dry-run: ${{ github.event.inputs.dry-run == 'true' }}
8889
ignore-scripts: false
8990
- name: NPM Publish
90-
uses: JS-DevTools/npm-publish@v3
91+
uses: JS-DevTools/npm-publish@v3.1.1
9192
if: ${{ matrix.package == 'linux-x64-gnu' }}
9293
with:
9394
access: public
@@ -121,7 +122,7 @@ jobs:
121122
run: mv java.*.node npm/linux-x64-musl
122123
shell: bash
123124
- name: NPM Publish Binary
124-
uses: JS-DevTools/npm-publish@v3
125+
uses: JS-DevTools/npm-publish@v3.1.1
125126
with:
126127
access: public
127128
token: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,36 +45,36 @@ jobs:
4545
matrix:
4646
include:
4747
- os: ubuntu-20.04
48-
node-version: 18.x
48+
node-version: 20.x
4949
arch: x64
5050
features: default
5151
- os: ubuntu-latest
52-
node-version: 20.x
52+
node-version: 22.x
5353
arch: x64
5454
features: all
5555
- os: windows-latest
56-
node-version: 18.x
56+
node-version: 20.x
5757
arch: x64
5858
features: default
5959
- os: windows-latest
60-
node-version: 20.x
60+
node-version: 22.x
6161
arch: x64
6262
features: all
6363
- os: windows-latest
64-
node-version: 18.x
64+
node-version: 20.x
6565
arch: x86
6666
features: default
6767
- os: windows-latest
68-
node-version: 20.x
68+
node-version: 22.x
6969
arch: x86
7070
features: default
7171
- os: macos-latest
72-
node-version: 18.x
73-
arch: x64
72+
node-version: 20.x
73+
arch: arm64
7474
features: default
7575
- os: macos-latest
76-
node-version: 20.x
77-
arch: x64
76+
node-version: 22.x
77+
arch: arm64
7878
features: all
7979
runs-on: ${{matrix.os}}
8080
steps:
@@ -106,6 +106,7 @@ jobs:
106106
run: |
107107
rustup target add i686-pc-windows-msvc
108108
npm run build -- -- --target i686-pc-windows-msvc
109+
shell: bash
109110
- name: Run tests
110111
run: npm run testOnly
111112
timeout-minutes: 20
@@ -117,14 +118,14 @@ jobs:
117118
show: all
118119
paths: testResults.xml
119120
- name: Create package
120-
if: ${{matrix.node-version == '18.x'}}
121+
if: ${{matrix.node-version == '20.x'}}
121122
shell: bash
122123
run: |
123124
node -e 'let p=require("./package.json");p.files.push("dist/*.node");require("fs").writeFileSync("package.json",JSON.stringify(p,null,4))'
124125
npm pack
125126
- name: Upload package
126127
uses: actions/upload-artifact@v4
127-
if: ${{matrix.node-version == '18.x'}}
128+
if: ${{matrix.node-version == '20.x'}}
128129
with:
129130
name: java-${{matrix.arch}}-${{matrix.os}}
130131
path: java-bridge-*.tgz
@@ -133,7 +134,7 @@ jobs:
133134
strategy:
134135
fail-fast: false
135136
matrix:
136-
node-version: [18, 20]
137+
node-version: [20, 22]
137138
runs-on: ubuntu-20.04
138139
steps:
139140
- uses: actions/checkout@v4
@@ -175,7 +176,7 @@ jobs:
175176
timeout-minutes: 180
176177
with:
177178
image: arm64v8/node:${{matrix.node-version}}-bullseye
178-
options: -v ${{ github.workspace }}:/github/workspace -w /github/workspace
179+
options: -v ${{ github.workspace }}:/github/workspace -w /github/workspace --platform linux/arm64
179180
run: |
180181
apt-get update
181182
apt-get install ca-certificates-java -y
@@ -192,13 +193,13 @@ jobs:
192193
show: all
193194
paths: testResults.xml
194195
- name: Create package
195-
if: ${{matrix.node-version == '18'}}
196+
if: ${{matrix.node-version == '20'}}
196197
run: |
197198
node -e 'let p=require("./package.json");p.files.push("dist/*.node");require("fs").writeFileSync("package.json",JSON.stringify(p,null,4))'
198199
npm pack
199200
- name: Upload package
200201
uses: actions/upload-artifact@v4
201-
if: ${{matrix.node-version == '18'}}
202+
if: ${{matrix.node-version == '20'}}
202203
with:
203204
name: java-arm64-ubuntu
204205
path: java-bridge-*.tgz
@@ -207,7 +208,7 @@ jobs:
207208
strategy:
208209
fail-fast: false
209210
matrix:
210-
node-version: [18, 20]
211+
node-version: [20, 22]
211212
runs-on: ubuntu-20.04
212213
steps:
213214
- uses: actions/checkout@v4
@@ -231,13 +232,13 @@ jobs:
231232
show: all
232233
paths: testResults.xml
233234
- name: Create package
234-
if: ${{matrix.node-version == '18'}}
235+
if: ${{matrix.node-version == '20'}}
235236
run: |
236237
node -e 'let p=require("./package.json");p.files.push("dist/*.node");require("fs").writeFileSync("package.json",JSON.stringify(p,null,4))'
237238
npm pack
238239
- name: Upload package
239240
uses: actions/upload-artifact@v4
240-
if: ${{matrix.node-version == '18'}}
241+
if: ${{matrix.node-version == '20'}}
241242
with:
242243
name: java-x64-ubuntu-musl
243244
path: java-bridge-*.tgz
@@ -249,7 +250,7 @@ jobs:
249250
- name: Setup Node.js environment
250251
uses: actions/setup-node@v4
251252
with:
252-
node-version: 16.x
253+
node-version: 22.x
253254
- uses: actions/setup-java@v4
254255
with:
255256
distribution: 'temurin'

0 commit comments

Comments
 (0)