feat core: update duplicate_gates_cleaner #78
Workflow file for this run
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: C++ tests | |
| on: | |
| push: | |
| paths: | |
| - '**.cpp' | |
| - '**.hpp' | |
| - '**.c' | |
| - '**.h' | |
| branches: | |
| - 'main' | |
| - 'tools/*' | |
| pull_request: | |
| paths: | |
| - '**.cpp' | |
| - '**.hpp' | |
| - '**.c' | |
| - '**.h' | |
| branches: | |
| - 'main' | |
| - 'tools/*' | |
| workflow_dispatch: | |
| env: | |
| BUILD_TYPE: Release | |
| LINTER_BUILD_TYPE: Debug | |
| jobs: | |
| # Execute unit tests. | |
| unit-tests-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Configure CMake | |
| working-directory: ${{github.workspace}} | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
| - name: Build | |
| working-directory: ${{github.workspace}} | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
| - name: Unit Test | |
| working-directory: ${{github.workspace}}/build/tests/ | |
| run: ./UnitTests | |
| # Check if there are files which need to be formatted. | |
| formatting-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Update clang | |
| run: sudo apt install --only-upgrade clang -y | |
| - name: Install clang-format | |
| run: sudo apt install -y clang-format-18 | |
| - name: Run clang-format | |
| working-directory: ${{github.workspace}} | |
| run: find ./src/ ./app/ -name '*.cpp' -o -name '*.hpp' | xargs clang-format --style="file:.clang-format" --dry-run -Werror | |
| # Check if there are problems in code using linter | |
| linter-check: | |
| # new clang-tidy is not available on older images. | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Install clang-tidy | |
| run: sudo apt install -y clang-tidy | |
| - name: Configure CMake | |
| working-directory: ${{github.workspace}} | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
| - name: Run clang-tidy | |
| working-directory: ${{github.workspace}} | |
| run: clang-tidy ./src/**/*.* -p build/ --config-file=.clang-tidy |