diff --git a/.github/workflows/ccpp.yaml b/.github/workflows/ccpp.yaml index 13f46326..8971b2e6 100644 --- a/.github/workflows/ccpp.yaml +++ b/.github/workflows/ccpp.yaml @@ -3,14 +3,26 @@ name: C/C++ CI on: [push] jobs: - linux-build: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: install deps run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev libgtest-dev clang-format - - name: lint + - name: cpp-lint run: ./clang-linting.sh + - name: install python + run: sudo apt install python3 python3-pip + - name: install python-deps + run: pip3 install mypy flake8 + - name: python-lint + run: cd python && mypy ./src ./tests && flake8 + linux-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: install deps + run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev libgtest-dev clang-format - name: cmake configure for realsies run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON - name: cmake build @@ -26,15 +38,13 @@ jobs: - name: install deps run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev - name: install python-deps - run: pip3 install pytest mypy flake8 + run: pip3 install pytest pytest-xdist - name: go into path run: cd python - name: build python run: cd python && sudo python3 -m pip install -e .[test] - - name: lint - run: cd python && mypy ./src ./tests && flake8 - name: run tests - run: cd python/tests && pytest + run: cd python/tests && pytest -n4 windows-build: runs-on: windows-latest steps: @@ -47,10 +57,8 @@ jobs: triplet: x64-windows-release token: ${{ github.token }} github-binarycache: true - - name: lint - run: ./clang-linting.sh - name: cmake configure for realsies - run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON + run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake - name: cmake build run: cmake --build build -j4 - name: run tests @@ -60,9 +68,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: install deps - run: brew install cmake pkg-config jsoncpp eigen curl libtins glfw glew spdlog flatbuffers - - name: lint - run: ./clang-linting.sh + run: brew install cmake pkg-config jsoncpp eigen curl libtins glfw glew spdlog flatbuffers googletest - name: cmake configure for realsies run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON - name: cmake build