Swift: publish C++ generated code as artifacts

This commit is contained in:
Paolo Tranquilli 2022-05-13 11:35:36 +02:00
Родитель 39fd1b48fc
Коммит 8cb9fd7eec
2 изменённых файлов: 18 добавлений и 2 удалений

18
.github/workflows/swift-codegen.yml поставляемый
Просмотреть файл

@ -18,8 +18,24 @@ jobs:
- name: Run unit tests
run: |
bazel test //swift/codegen/test --test_output=errors
- name: Check that code was generated
- name: Check that QL generated code was checked in
run: |
bazel run //swift/codegen
git add swift
git diff --exit-code --stat HEAD
- name: Generate C++ files
run: |
bazel run //swift/codegen:trapgen -- --cpp-output=$PWD
bazel run //swift/codegen:cppgen -- --cpp-output=$PWD
- uses: actions/upload-artifact@v3
with:
name: TrapEntries.h
path: TrapEntries.h
- uses: actions/upload-artifact@v3
with:
name: TrapTags.h
path: TrapTags.h
- uses: actions/upload-artifact@v3
with:
name: TrapClasses.h
path: TrapClasses.h

Просмотреть файл

@ -21,7 +21,7 @@ def _init_options():
Option("--cpp-output", tags=["cpp"], type=_abspath, required=True)
Option("--cpp-namespace", tags=["cpp"], default="codeql")
Option("--trap-affix", tags=["cpp"], default="Trap")
Option("--cpp-include-dir", tags=["cpp"], required=True)
Option("--cpp-include-dir", tags=["cpp"], default="swift/extractor/trap")
def _abspath(x):