Native jar parsing #2249
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['20.x', '21.x'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm install, build and test | |
run: | | |
npm install | |
npm run build --if-present | |
npm run lint | |
npm test | |
env: | |
CI: true | |
deno-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21.x | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: deno compile | |
run: | | |
npm ci --omit=optional --omit=dev | |
deno lint | |
mkdir build | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --target x86_64-unknown-linux-gnu --output build/cdxgenx bin/cdxgen.js | |
shasum -a 256 build/cdxgenx > build/cdxgenx.sha256 | |
chmod + build/cdxgenx | |
./build/cdxgenx --help | |
deno compile --no-terminal --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --target x86_64-pc-windows-msvc --output build/cdxgenx.exe bin/cdxgen.js | |
shasum -a 256 build/cdxgenx.exe > build/cdxgenx.exe.sha256 | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --target x86_64-apple-darwin --output build/cdxgenx-darwin-amd64 bin/cdxgen.js | |
shasum -a 256 build/cdxgenx-darwin-amd64 > build/cdxgenx-darwin-amd64.sha256 | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --target aarch64-apple-darwin --output build/cdxgenx-darwin-arm64 bin/cdxgen.js | |
shasum -a 256 build/cdxgenx-darwin-arm64 > build/cdxgenx-darwin-arm64.sha256 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
build/cdxgenx | |
build/cdxgenx.sha256 | |
build/cdxgenx.exe | |
build/cdxgenx.exe.sha256 | |
build/cdxgenx-darwin-amd64 | |
build/cdxgenx-darwin-amd64.sha256 | |
build/cdxgenx-darwin-arm64 | |
build/cdxgenx-darwin-arm64.sha256 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: deno-builds | |
path: build | |
sae-builds: | |
strategy: | |
matrix: | |
os: [windows, macos, ubuntu] | |
include: | |
- os: windows | |
build: | | |
npx caxa --input . --output "cdxgen.exe" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js" | |
.\cdxgen.exe --version | |
(Get-FileHash .\cdxgen.exe).hash | Out-File -FilePath .\cdxgen.exe.sha256 | |
npm install --omit=optional | |
npx caxa --input . --exclude cdxgen.exe cdxgen.exe.sha256 --output "cdx-verify.exe" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/verify.js" | |
.\cdx-verify.exe --version | |
(Get-FileHash .\cdx-verify.exe).hash | Out-File -FilePath .\cdx-verify.exe.sha256 | |
artifact: cdxgen.exe | |
vartifact: cdx-verify.exe | |
- os: macos | |
build: | | |
npx caxa --input . --output "cdxgen.app" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js" | |
tar -czf "cdxgen.app.tgz" cdxgen.app | |
shasum -a 256 cdxgen.app.tgz > cdxgen.app.tgz.sha256 | |
rm -rf node_modules | |
npm install --omit=optional | |
npx caxa --input . --exclude cdxgen.app cdxgen.app.tgz cdxgen.app.tgz.sha256 --output "cdx-verify.app" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/verify.js" | |
tar -czf "cdx-verify.app.tgz" cdx-verify.app | |
shasum -a 256 cdx-verify.app.tgz > cdx-verify.app.tgz.sha256 | |
artifact: cdxgen.app.tgz | |
vartifact: cdx-verify.app.tgz | |
- os: ubuntu | |
build: | | |
npx caxa --input . --output "cdxgen" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js" | |
chmod +x cdxgen | |
./cdxgen --version | |
sha256sum cdxgen > cdxgen.sha256 | |
rm -rf node_modules | |
npm install --omit=optional | |
npx caxa --input . --exclude cdxgen cdxgen.sha256 --output "cdx-verify" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/verify.js" | |
chmod +x cdx-verify | |
./cdx-verify --version | |
sha256sum cdx-verify > cdx-verify.sha256 | |
artifact: cdxgen | |
vartifact: cdx-verify | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.x' | |
- name: Produce sae | |
run: | | |
npm ci | |
${{ matrix.build }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact }} | |
path: ${{ matrix.artifact }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.vartifact }} | |
path: ${{ matrix.vartifact }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
${{ matrix.artifact }} | |
${{ matrix.artifact }}.sha256 | |
${{ matrix.vartifact }} | |
${{ matrix.vartifact }}.sha256 |