| 1 | name: C/C++ CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [ main ] |
| 6 | pull_request: |
| 7 | branches: [ main ] |
| 8 | |
| 9 | jobs: |
| 10 | build-test-ubuntu: |
| 11 | runs-on: ubuntu-18.04 |
| 12 | steps: |
| 13 | - run: | |
| 14 | sudo apt-get update |
| 15 | sudo apt install g++-10 gcc-10 libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev |
| 16 | - uses: actions/checkout@v2 |
| 17 | - name: setup |
| 18 | run: mkdir build |
| 19 | - name: configure |
| 20 | working-directory: ./build |
| 21 | run: ../configure |
| 22 | env: |
| 23 | CC: gcc-10 |
| 24 | CXX: g++-10 -Werror -Wno-error=stringop-overflow |
| 25 | - name: make |
| 26 | working-directory: ./build |
| 27 | run: make |
| 28 | - name: make test |
| 29 | working-directory: ./build |
| 30 | run: make test |
| 31 | build-test-ubuntu-cmake: |
| 32 | runs-on: ubuntu-22.04 |
| 33 | steps: |
| 34 | - run: | |
| 35 | sudo apt-get update |
| 36 | sudo apt install g++-10 gcc-10 cmake libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev libeigen3-dev libopencv-dev libtoon-dev |
| 37 | - uses: actions/checkout@v2 |
| 38 | - name: setup |
| 39 | run: mkdir build |
| 40 | - name: configure |
| 41 | working-directory: ./build |
| 42 | run: cmake -DCMAKE_BUILD_TYPE=Debug -DCVD_ENABLE_OPENCV_TESTS=ON .. |
| 43 | env: |
| 44 | CC: gcc-10 |
| 45 | CXX: g++-10 -Werror -fsanitize=address,undefined -fno-omit-frame-pointer -DCVD_IMAGE_DEBUG -DTIFF_DISABLE_DEPRECATED -Wno-error=stringop-overflow |
| 46 | - name: make |
| 47 | run: make |
| 48 | working-directory: ./build |
| 49 | - name: ctest |
| 50 | working-directory: ./build |
| 51 | run: ASAN_OPTIONS=fast_unwind_on_malloc=0 ctest . || (cat ./Testing/Temporary/LastTest.log; exit 1) |
| 52 | clang-format-ubuntu: |
| 53 | runs-on: ubuntu-18.04 |
| 54 | steps: |
| 55 | - run: | |
| 56 | sudo apt-get update |
| 57 | sudo apt install clang-format-10 |
| 58 | - uses: actions/checkout@v2 |
| 59 | - name: format |
| 60 | run: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.cc' -o -name '*.cxx' \) -a -not -path ./progs/video_iOS/\* | xargs -n 1 clang-format-10 --verbose -i |
| 61 | - run: | |
| 62 | if ! git diff-index --exit-code --quiet HEAD; then |
| 63 | git diff |
| 64 | exit 1 |
| 65 | fi |
| 66 | build-test-ubuntu-cmake-light: |
| 67 | runs-on: ubuntu-18.04 |
| 68 | steps: |
| 69 | - run: | |
| 70 | sudo apt-get update |
| 71 | sudo apt install g++-10 gcc-10 cmake |
| 72 | - uses: actions/checkout@v2 |
| 73 | - name: setup |
| 74 | run: mkdir build |
| 75 | - name: configure |
| 76 | working-directory: ./build |
| 77 | run: cmake -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=TRUE .. |
| 78 | env: |
| 79 | CC: gcc-10 |
| 80 | CXX: g++-10 -Werror -Wno-stringop-overflow |
| 81 | - name: make |
| 82 | run: make |
| 83 | working-directory: ./build |
| 84 | build-windows: |
| 85 | runs-on: windows-2019 |
| 86 | steps: |
| 87 | - uses: actions/checkout@v2 |
| 88 | - name: Add msbuild to PATH |
| 89 | uses: microsoft/[email protected] |
| 90 | - name: setup |
| 91 | run: md build |
| 92 | - name: configure |
| 93 | working-directory: ./build |
| 94 | run: cmake -DCVD_ENABLE_PROGS=OFF -DCVD_ENABLE_TESTS=OFF -DCVD_ENABLE_EXAMPLES=OFF .. |
| 95 | - name: compile |
| 96 | working-directory: ./build |
| 97 | run: msbuild CVD.sln |
| 98 | |
| 99 | |
| 100 |