Skip to content

Commit

Permalink
Brings back windows sae builds (#1390)
Browse files Browse the repository at this point in the history
* Brings back windows sae builds

Signed-off-by: Prabhu Subramanian <[email protected]>

* Update readme

Signed-off-by: Prabhu Subramanian <[email protected]>

---------

Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Sep 24, 2024
1 parent 919220f commit 6aac1f3
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 68 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/binary-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Binary builds

on:
push:
branches:
- master
- release/*
tags:
- 'v*'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
sae-builds:
strategy:
matrix:
os: [windows-latest]
include:
- os: windows-latest
build: |
Remove-Item ci -Recurse -Force
Remove-Item contrib -Recurse -Force
Remove-Item tools_config -Recurse -Force
npx @appthreat/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
Remove-Item node_modules -Recurse -Force
npm install --omit=optional --omit=dev --no-package-lock --no-audit --no-fund
npx @appthreat/caxa --input . --output "cdxgen-slim.exe" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js"
.\cdxgen-slim.exe --version
(Get-FileHash .\cdxgen-slim.exe).hash | Out-File -FilePath .\cdxgen-slim.exe.sha256
npx @appthreat/caxa --input . --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
.\cdxgen.exe --help
.\cdxgen-slim.exe --help
artifact: cdxgen.exe
sartifact: cdxgen-slim.exe
vartifact: cdx-verify.exe
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Produce sae
run: |
npm install --omit=dev --no-package-lock --no-audit --no-fund
${{ matrix.build }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.sartifact }}
path: ${{ matrix.sartifact }}
- 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.sartifact }}
${{ matrix.sartifact }}.sha256
${{ matrix.vartifact }}
${{ matrix.vartifact }}.sha256
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyclonedx/cdxgen",
"version": "10.10.0",
"version": "10.10.1",
"exports": "./lib/cli/index.js",
"compilerOptions": {
"allowJs": true,
Expand Down
5 changes: 3 additions & 2 deletions docs/PROJECT_TYPES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ _Note: there are multiple project types / aliases that will produce the same out

| Language/Platform | Project Types | Package Formats | Supported Evidence | Supports Transitives |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------- |
| Node.js | `npm`, `pnpm`, `nodejs`, `js`, `javascript`, `typescript`, `ts`, `tsx` | `npm-shrinkwrap.json`, `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `rush.js`, `bower.json`, `.min.js` | Yes, except for `.min.` ||
| Node.js | `npm`, `pnpm`, `nodejs`, `js`, `javascript`, `typescript`, `ts`, `tsx` | `npm-shrinkwrap.json`, `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `rush.js`, `bower.json`, `.min.js` | Yes, except for `.min.js` ||
| Java (Default) | `java`, `groovy`, `kotlin`, `scala`, `jvm`, `gradle`, `mvn`, `maven`, `sbt` | `pom.xml` [1], `build.gradle`, `.kts`, `sbt`, `bazel` | Yes, unless `pom.xml` is manually parsed due to unavailability of maven or errors) ||
| Java (Specific version) | `java8`, `java11`, `java17`, `java21`, `java22` | `pom.xml` [1], `build.gradle`, `.kts`, `sbt`, `bazel` | Yes, unless `pom.xml` is manually parsed due to unavailability of maven or errors) ||
| Java (Specific version) | `java8`, `java11`, `java17`, `java21`, `java22`, `java23` | `pom.xml` [1], `build.gradle`, `.kts`, `sbt`, `bazel` | Yes, unless `pom.xml` is manually parsed due to unavailability of maven or errors) ||
| Android | `android`, `apk`, `aab` | `apk`, `aab` | - | - |
| JAR | `jar` | `.jar` | - | - |
| JAR (Gradle Cache) | `gradle-index`, `gradle-cache` | `$HOME/caches/modules-2/files-2.1/\*\*/\*.jar` | - | - |
Expand All @@ -26,6 +26,7 @@ _Note: there are multiple project types / aliases that will produce the same out
| Golang | `go`, `golang` | `binary`, `go.mod`, `go.sum`, `Gopkg.lock` | Yes except binary ||
| Rust | `rust`, `rust-lang`, `cargo` | `binary`, `Cargo.toml`, `Cargo.lock` | Only for `Cargo.lock` | - |
| Ruby | `ruby`, `gems` | `Gemfile.lock`, `gemspec` | Only for `Gemfile.lock` | - |
| PHP | `php`, `composer` | Composer.lock | Yes ||
| .NET (#C) | `csharp`, `netcore`, `dotnet`, `vb`, `dotnet-framework` | `.csproj`, `.vbproj`, `.fsproj`, `packages.config`, `project.assets.json` [3], `packages.lock.json`, `.nupkg`, `paket.lock`, `binary` | Only for `project.assets.json`, `packages.lock.json`, `paket.lock` | - |
| Dart | `dart`, `flutter`, `pub` | `pubspec.lock`, `pubspec.yaml` | Only for `pubspec.lock` | - |
| Haskell | `haskell`, `hackage`, `cabal` | `cabal.project.freeze` | Yes | |
Expand Down
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ If you are a [Homebrew](https://brew.sh/) user, you can also install [cdxgen](ht
brew install cdxgen
```

For Windows, Single Application Executable (sae) builds are available from GitHub [Releases](https://github.com/CycloneDX/cdxgen/releases) in two flavours:

- cdxgen.exe - Node 22 runtime + CLI with the optional binary plugins (atom, dosai, etc)
- cdxgen-slim.exe - Node 22 runtime + CLI

## Usage

Minimal example.
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyclonedx/cdxgen",
"version": "10.10.0",
"version": "10.10.1",
"exports": "./lib/cli/index.js",
"include": ["*.js", "lib/**", "bin/**", "data/**", "types/**"],
"exclude": [
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3226,8 +3226,8 @@ test("parsePnpmLock", async () => {
expect(parsedList.dependenciesList).toHaveLength(462);
expect(parsedList.pkgList.filter((pkg) => !pkg.scope)).toHaveLength(3);
parsedList = await parsePnpmLock("./pnpm-lock.yaml");
expect(parsedList.pkgList.length).toEqual(648);
expect(parsedList.dependenciesList.length).toEqual(648);
expect(parsedList.pkgList.length).toEqual(647);
expect(parsedList.dependenciesList.length).toEqual(647);
expect(parsedList.pkgList[0]).toEqual({
group: "@ampproject",
name: "remapping",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyclonedx/cdxgen",
"version": "10.10.0",
"version": "10.10.1",
"description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image",
"homepage": "http://github.com/cyclonedx/cdxgen",
"author": "Prabhu Subramanian <[email protected]>",
Expand Down
Loading

0 comments on commit 6aac1f3

Please sign in to comment.