mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Swift: make C++ code generation more self-contained
This is solving a papercut, where the C++ build was relying on the local dbscheme file to be up-to-date, even if all the information for building is actually in `schema.yml`. This made a pure C++ development cycle with changes to `schema.yml` clumsy, as it required a further dbscheme generation step. Now for C++ the dbscheme is generated internally in the build files, and thus a change in `schema.yml` is reflected immediately in the C++ build. A `swift/codegen` step for checked in generated code (including the dbscheme) is still required, but a developer can do it just before running QL tests or committing, instead of during each C++ recompilation. Some directory reorganization was also carried out, moving specific generator modules to a new `generators` python package, and only leaving the two drivers at the top level.
This commit is contained in:
3
.github/workflows/swift-codegen.yml
vendored
3
.github/workflows/swift-codegen.yml
vendored
@@ -25,8 +25,7 @@ jobs:
|
||||
git diff --exit-code --stat HEAD
|
||||
- name: Generate C++ files
|
||||
run: |
|
||||
bazel run //swift/codegen:trapgen -- --cpp-output=$PWD/swift-generated-headers
|
||||
bazel run //swift/codegen:cppgen -- --cpp-output=$PWD/swift-generated-headers
|
||||
bazel run //swift/codegen:cppcodegen -- --cpp-output=$PWD/swift-generated-headers
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: swift-generated-headers
|
||||
|
||||
Reference in New Issue
Block a user