Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add missing java versions #108

Merged
merged 16 commits into from
Jan 3, 2025
Merged
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ A clear and concise description of what you expected to happen.

**Environment**

- OS: [e.g. Windows]
- Node.js version: [e.g. 16]
- Java version: [e.g. 11]
- Version of this package: [e.g. 2.1.0]
- OS: [e.g. Windows]
- Node.js version: [e.g. 16]
- Java version: [e.g. 11]
- Version of this package: [e.g. 2.1.0]

**Additional context**
Add any other context about the problem here.
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
Expand All @@ -67,6 +67,7 @@ jobs:
run: npm ci
- name: Build
run: npm run build -- -- --target ${{ matrix.target }}
shell: bash
- name: Get version
id: version
run: echo "version=$(node -p 'require(`./package.json`).version')" >> $GITHUB_ENV
Expand All @@ -78,7 +79,7 @@ jobs:
run: mv java.*.node npm/${{ matrix.package }}
shell: bash
- name: NPM Publish Binary
uses: JS-DevTools/npm-publish@v3
uses: JS-DevTools/npm-publish@e06fe3ef65499b38eb12224f2a60979f6d797330
if: ${{ matrix.package != 'linux-x64-gnu' }}
with:
access: public
Expand All @@ -87,7 +88,7 @@ jobs:
dry-run: ${{ github.event.inputs.dry-run == 'true' }}
ignore-scripts: false
- name: NPM Publish
uses: JS-DevTools/npm-publish@v3
uses: JS-DevTools/npm-publish@v3.1.1
if: ${{ matrix.package == 'linux-x64-gnu' }}
with:
access: public
Expand Down Expand Up @@ -121,7 +122,7 @@ jobs:
run: mv java.*.node npm/linux-x64-musl
shell: bash
- name: NPM Publish Binary
uses: JS-DevTools/npm-publish@v3
uses: JS-DevTools/npm-publish@v3.1.1
with:
access: public
token: ${{ secrets.NPM_TOKEN }}
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,36 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
node-version: 18.x
node-version: 20.x
arch: x64
features: default
- os: ubuntu-latest
node-version: 20.x
node-version: 22.x
arch: x64
features: all
- os: windows-latest
node-version: 18.x
node-version: 20.x
arch: x64
features: default
- os: windows-latest
node-version: 20.x
node-version: 22.x
arch: x64
features: all
- os: windows-latest
node-version: 18.x
node-version: 20.x
arch: x86
features: default
- os: windows-latest
node-version: 20.x
node-version: 22.x
arch: x86
features: default
- os: macos-latest
node-version: 18.x
arch: x64
node-version: 20.x
arch: arm64
features: default
- os: macos-latest
node-version: 20.x
arch: x64
node-version: 22.x
arch: arm64
features: all
runs-on: ${{matrix.os}}
steps:
Expand Down Expand Up @@ -106,6 +106,7 @@ jobs:
run: |
rustup target add i686-pc-windows-msvc
npm run build -- -- --target i686-pc-windows-msvc
shell: bash
- name: Run tests
run: npm run testOnly
timeout-minutes: 20
Expand All @@ -117,14 +118,14 @@ jobs:
show: all
paths: testResults.xml
- name: Create package
if: ${{matrix.node-version == '18.x'}}
if: ${{matrix.node-version == '20.x'}}
shell: bash
run: |
node -e 'let p=require("./package.json");p.files.push("dist/*.node");require("fs").writeFileSync("package.json",JSON.stringify(p,null,4))'
npm pack
- name: Upload package
uses: actions/upload-artifact@v4
if: ${{matrix.node-version == '18.x'}}
if: ${{matrix.node-version == '20.x'}}
with:
name: java-${{matrix.arch}}-${{matrix.os}}
path: java-bridge-*.tgz
Expand All @@ -133,7 +134,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
node-version: [20, 22]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -175,7 +176,7 @@ jobs:
timeout-minutes: 180
with:
image: arm64v8/node:${{matrix.node-version}}-bullseye
options: -v ${{ github.workspace }}:/github/workspace -w /github/workspace
options: -v ${{ github.workspace }}:/github/workspace -w /github/workspace --platform linux/arm64
run: |
apt-get update
apt-get install ca-certificates-java -y
Expand All @@ -192,13 +193,13 @@ jobs:
show: all
paths: testResults.xml
- name: Create package
if: ${{matrix.node-version == '18'}}
if: ${{matrix.node-version == '20'}}
run: |
node -e 'let p=require("./package.json");p.files.push("dist/*.node");require("fs").writeFileSync("package.json",JSON.stringify(p,null,4))'
npm pack
- name: Upload package
uses: actions/upload-artifact@v4
if: ${{matrix.node-version == '18'}}
if: ${{matrix.node-version == '20'}}
with:
name: java-arm64-ubuntu
path: java-bridge-*.tgz
Expand All @@ -207,7 +208,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
node-version: [20, 22]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand All @@ -231,13 +232,13 @@ jobs:
show: all
paths: testResults.xml
- name: Create package
if: ${{matrix.node-version == '18'}}
if: ${{matrix.node-version == '20'}}
run: |
node -e 'let p=require("./package.json");p.files.push("dist/*.node");require("fs").writeFileSync("package.json",JSON.stringify(p,null,4))'
npm pack
- name: Upload package
uses: actions/upload-artifact@v4
if: ${{matrix.node-version == '18'}}
if: ${{matrix.node-version == '20'}}
with:
name: java-x64-ubuntu-musl
path: java-bridge-*.tgz
Expand All @@ -249,7 +250,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 22.x
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand Down
Loading
Loading