diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml new file mode 100644 index 000000000..503972b04 --- /dev/null +++ b/.github/workflows/build_cmake.yml @@ -0,0 +1,43 @@ +name: CMake + +on: + pull_request: + push: + +env: + config: Release + build_dir: build + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + + steps: + - uses: actions/checkout@v2 + + - name: Configure + working-directory: ${{ github.workspace }}/dlib/test + run: cmake . -B ${{ env.build_dir }} + + - name: Build + working-directory: ${{ github.workspace }}/dlib/test + run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest + + - name: Test + working-directory: ${{ github.workspace }}/dlib/test/${{ env.build_dir }} + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + ./${{ env.config }}/dtest.exe --runall + elif [ "$RUNNER_OS" == "macOS" ]; then + ./dtest --runall --no_test_timer + else + ./dtest --runall + fi; diff --git a/.github/workflows/build_python.yml b/.github/workflows/build_python.yml new file mode 100644 index 000000000..03c0b92ef --- /dev/null +++ b/.github/workflows/build_python.yml @@ -0,0 +1,28 @@ +name: Python + +on: + pull_request: + push: + +env: + config: Release + build_dir: build + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + + steps: + - uses: actions/checkout@v2 + + - name: Build + working-directory: ${{ github.workspace }} + run: python setup.py build