Fix for upstream changes. (#162) #874
This file contains hidden or 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: "lint-flay" | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Cancel any preceding run on the pull request. | |
concurrency: | |
group: lint-flay-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
# Lint Flay on Ubuntu 22.04. | |
lint-flay: | |
runs-on: ubuntu-22.04 | |
env: | |
CTEST_PARALLEL_LEVEL: 4 | |
IMAGE_TYPE: test | |
ENABLE_TEST_TOOLS: ON | |
CMAKE_ONLY: ON | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Pull P4C and link Flay. | |
run: | | |
git clone --recurse-submodules -b fruffy/flay -j2 https://github.com/fruffy/p4c/ $GITHUB_WORKSPACE/../p4c | |
ln -sf $GITHUB_WORKSPACE $GITHUB_WORKSPACE/../p4c/backends/p4tools/modules/ | |
- name: Build (Ubuntu 22.04) | |
run: | | |
sudo apt-get install -y libgmp-dev libelf-dev zlib1g-dev libjansson-dev | |
tools/ci-build.sh | |
working-directory: ../p4c | |
- name: Run cpplint on C/C++ files. | |
run: cmake --build . --target cpplint | |
working-directory: ../p4c/build | |
- name: Run clang-format on C/C++ files. | |
run: cmake --build . --target clang-format | |
working-directory: ../p4c/build | |
- name: Run black and isort on Python files. | |
run: | | |
cmake --build . --target black | |
cmake --build . --target isort | |
working-directory: ../p4c/build |