From 027fb781bdc899c7e79cc7415a33418fc679cec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= <1671644+arrufat@users.noreply.github.com> Date: Thu, 3 Feb 2022 12:00:56 +0900 Subject: [PATCH] GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python --- .github/workflows/build_cmake.yml | 43 ++++++++++++++++++++++++++++++ .github/workflows/build_python.yml | 28 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/workflows/build_cmake.yml create mode 100644 .github/workflows/build_python.yml 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