Fix clang-format failure #177
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: GitHub Actions | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure | |
run: mkdir build && cd build && cmake .. | |
- name: Build | |
run: cmake --build build --config Release -- -j 2 | |
- name: Run tests | |
run: cd build && ctest -E 'perf_test' --extra-verbose # execute unit_test and unit_test_opencl | |
python_on_windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [3.7] | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Check Python | |
run: python --version | |
- name: Install swig | |
run: choco install swig --yes --limit-output -dv | |
- name: Check swig | |
run: swig.exe -version | |
- name: Build Python | |
run: python setup.py build_ext --inplace | |
working-directory: src/python | |
- name: Run tests | |
run: python bitmap_operation.py | |
working-directory: examples/python | |
build_on_windows: | |
strategy: | |
matrix: | |
config: | |
- name: Release x86 | |
platform: x86 | |
build_config: Release | |
- name: Release x64 | |
platform: x64 | |
build_config: Release | |
name: MSVC (${{ matrix.config.name }}) | |
runs-on: windows-2019 | |
timeout-minutes: 30 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: microsoft/setup-msbuild@v1 | |
- name: build unit tests | |
run: | | |
MSBuild.exe test/unit_tests/unit_tests-vs2019.vcxproj /property:Platform=${{ matrix.config.platform }} /property:Configuration=${{ matrix.config.build_config }} | |
- name: build performance tests | |
run: | | |
MSBuild.exe test/performance_tests/performance_tests-vs2019.vcxproj /property:Platform=${{ matrix.config.platform }} /property:Configuration=${{ matrix.config.build_config }} | |
style: | |
name: Code style check | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 50 | |
- name: Setup clang-format | |
run: | | |
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100 | |
sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff /usr/bin/clang-format-diff-14 100 | |
- name: Check code format | |
run: | | |
bash script/check_code_format.sh |