Skip to content

Commit 8cb9fd7

Browse files
committed
Swift: publish C++ generated code as artifacts
1 parent 39fd1b4 commit 8cb9fd7

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/swift-codegen.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,24 @@ jobs:
1818
- name: Run unit tests
1919
run: |
2020
bazel test //swift/codegen/test --test_output=errors
21-
- name: Check that code was generated
21+
- name: Check that QL generated code was checked in
2222
run: |
2323
bazel run //swift/codegen
2424
git add swift
2525
git diff --exit-code --stat HEAD
26+
- name: Generate C++ files
27+
run: |
28+
bazel run //swift/codegen:trapgen -- --cpp-output=$PWD
29+
bazel run //swift/codegen:cppgen -- --cpp-output=$PWD
30+
- uses: actions/upload-artifact@v3
31+
with:
32+
name: TrapEntries.h
33+
path: TrapEntries.h
34+
- uses: actions/upload-artifact@v3
35+
with:
36+
name: TrapTags.h
37+
path: TrapTags.h
38+
- uses: actions/upload-artifact@v3
39+
with:
40+
name: TrapClasses.h
41+
path: TrapClasses.h

swift/codegen/lib/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _init_options():
2121
Option("--cpp-output", tags=["cpp"], type=_abspath, required=True)
2222
Option("--cpp-namespace", tags=["cpp"], default="codeql")
2323
Option("--trap-affix", tags=["cpp"], default="Trap")
24-
Option("--cpp-include-dir", tags=["cpp"], required=True)
24+
Option("--cpp-include-dir", tags=["cpp"], default="swift/extractor/trap")
2525

2626

2727
def _abspath(x):

0 commit comments

Comments
 (0)