mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Swift: added trapgen
This checks in the trapgen script generating trap entries in C++. The codegen suite has been slightly reorganized, moving the templates directory up one level and chopping everything into smaller bazel packages. Running tests is now done via ``` bazel run //swift/codegen/test ``` With respect to the PoC, the nested `codeql::trap` namespace has been dropped in favour of a `Trap` prefix (or suffix in case of entries) within the `codeql` namespace. Also, generated C++ code is not checked in in git any more, and generated during build. Finally, labels get printed in hex in the trap file. `TrapLabel` is for the moment only default-constructible, so only one single label is possible. `TrapArena`, that is responsible for creating disjoint labels will come in a later commit.
This commit is contained in:
8
.github/workflows/swift-codegen.yml
vendored
8
.github/workflows/swift-codegen.yml
vendored
@@ -13,18 +13,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/fetch-codeql
|
||||
- uses: bazelbuild/setup-bazelisk@v2
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '~3.8'
|
||||
cache: 'pip'
|
||||
- uses: ./.github/actions/fetch-codeql
|
||||
- uses: bazelbuild/setup-bazelisk@v2
|
||||
- name: Install dependencies
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
pip install -r swift/codegen/requirements.txt
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
bazel test //swift/codegen:tests --test_output=errors
|
||||
bazel test //swift/codegen/test --test_output=errors
|
||||
- name: Check that code was generated
|
||||
run: |
|
||||
bazel run //swift/codegen
|
||||
|
||||
7
.github/workflows/swift-qltest.yml
vendored
7
.github/workflows/swift-qltest.yml
vendored
@@ -29,6 +29,13 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/fetch-codeql
|
||||
- uses: bazelbuild/setup-bazelisk@v2
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '~3.8'
|
||||
cache: 'pip'
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
pip install -r codegen/requirements.txt
|
||||
- name: Build Swift extractor
|
||||
run: |
|
||||
bazel run //swift:create-extractor-pack
|
||||
|
||||
Reference in New Issue
Block a user