Skip to content

Commit

Permalink
go back to prebuilding on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Dec 19, 2024
1 parent e9113d5 commit b24d11b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
run: swift build --build-tests --quiet
- name: Build Again
if: always()
run: swift build --build-tests --verbose
run: |
dir .build\plugins\outputs\swiftgodot\SwiftGodot\destination\CodeGeneratorPlugin\GeneratedSources
swift build --build-tests --verbose
- name: Run tests (XCTest)
run: swift test --skip-build --no-parallel --disable-swift-testing
- name: Run tests (Swift testing)
Expand Down
23 changes: 15 additions & 8 deletions Plugins/CodeGeneratorPlugin/plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,26 @@ import PackagePlugin
}
arguments.append(context.package.directoryURL.appending(path: "doc").path)
arguments.append("--singlefile")
commands.append(
Command.prebuildCommand(
displayName: "Generating Swift API from \(api) to \(genSourcesDir)",
executable: generator,
arguments: arguments,
outputFilesDirectory: genSourcesDir
)
)
#else
outputFiles.append(contentsOf: knownBuiltin.map { genSourcesDir.appending(["generated-builtin", $0]) })
outputFiles.append(contentsOf: known.map { genSourcesDir.appending(["generated", $0]) })
commands.append(
Command.buildCommand(
displayName: "Generating Swift API from \(api) to \(genSourcesDir)",
executable: generator,
arguments: arguments,
inputFiles: [api],
outputFiles: outputFiles))
#endif

commands.append(
Command.buildCommand(
displayName: "Generating Swift API from \(api) to \(genSourcesDir)",
executable: generator,
arguments: arguments,
inputFiles: [api],
outputFiles: outputFiles))

return commands
}
}
Expand Down

0 comments on commit b24d11b

Please sign in to comment.