Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:

android-ci:
needs: build-plugin
timeout-minutes: 90
timeout-minutes: 120
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -165,6 +165,16 @@ jobs:

- run: skip doctor

- name: "Create and export new app"
if: runner.os != 'Linux'
working-directory: ${{ runner.temp }}
run: |
skip init --transpiled-app --free --appid some.app.id some-app SomeApp SomeAppModel
# verify that the project itself is free
skip verify --sbom --free --project some-app
# perform an export of the app
skip export --sbom --show-tree --project some-app

# disables to speed up CI
#- name: "Create and export new Skip Lite app project"
# if: runner.os != 'Linux'
Expand Down
19 changes: 19 additions & 0 deletions Sources/SkipBuild/Commands/ExportCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ Build and export the Skip modules defined in the Package.swift, with libraries e
@Option(help: ArgumentHelp("Destination architectures for native libraries", valueName: "arch"))
var arch: [AndroidArchArgument] = []

@Flag(help: ArgumentHelp("Generate SPDX SBOM files alongside export artifacts"))
var sbom: Bool = false

func performCommand(with out: MessageQueue) async {
await withLogStream(with: out) {
try await runExport(with: out)
Expand Down Expand Up @@ -318,6 +321,22 @@ Build and export the Skip modules defined in the Package.swift, with libraries e
try fs.removeFileTree(projectOutputBaseFolder) // only export the zip file; remove the sources
}

// Generate SBOM files if requested
if self.sbom {
let projectURL = URL(fileURLWithPath: self.project).standardized
let sbomFiles = try await SBOMGenerator.generateSBOMFiles(
generateIOS: self.ios,
generateAndroid: self.android,
projectPath: projectURL.path,
packageName: packageName,
packageJSON: packageJSON,
outputDirAbsolute: outputFolderAbsolute,
command: self,
out: out
)
createdURLs.append(contentsOf: sbomFiles)
}

let outputFolderTitle = outputFolder.abbreviatingWithTilde

await out.write(status: .pass, "Skip export \(packageName) to \(outputFolderTitle) (\(startTime.timingSecondsSinceNow))")
Expand Down
Loading
Loading