Bump actions/upload-artifact from 2 to 4 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Swift: Check code generation" | |
on: | |
pull_request: | |
paths: | |
- "swift/**" | |
- .github/workflows/swift-codegen.yml | |
- .github/actions/fetch-codeql/action.yml | |
branches: | |
- main | |
jobs: | |
codegen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/fetch-codeql | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- uses: actions/setup-python@v3 | |
- uses: pre-commit/action@v3.0.0 | |
name: Check that python code is properly formatted | |
with: | |
extra_args: autopep8 --all-files | |
- name: Run unit tests | |
run: | | |
bazel test //swift/codegen/test --test_output=errors | |
- uses: pre-commit/action@v3.0.0 | |
name: Check that QL generated code was checked in | |
with: | |
extra_args: swift-codegen --all-files | |
- name: Generate C++ files | |
run: | | |
bazel run //swift/codegen:codegen -- --generate=trap,cpp --cpp-output=$PWD/swift-generated-cpp-files | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: swift-generated-cpp-files | |
path: swift-generated-cpp-files/** |