From 3f2b050703989b2d04ac06e4fba3125397486aa5 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Wed, 4 Oct 2023 11:48:29 -0400 Subject: [PATCH] separate blackfly and oryx test jobs (#37) --- .github/workflows/test_pr.yml | 57 +++++++++++++++++++++++++++++++++-- tests/CMakeLists.txt | 6 +++- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index bc9f2df..8b6b1fa 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -11,11 +11,60 @@ env: BUILD_TYPE: Release jobs: - test: + test-blackfly: runs-on: - self-hosted - spinnaker + - windows # pwsh, msvc - BFLY-U3-23S6M-C # for tests + + permissions: + actions: write + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.10.0 + with: + access_token: ${{ github.token }} + + - name: Enable long paths + run: | + git config --global core.longpaths true + shell: pwsh + + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + ref: ${{ github.event.pull_request.head.sha }} + + - name: Get CMake 3.24 + uses: lukka/get-cmake@latest + with: + useCloudCache: false + useLocalCache: true + cmakeVersion: 3.24.3 + + - name: Install MSVC + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64_x86 + + - name: Configure + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}} -L blackfly --output-on-failure + + test-oryx: + runs-on: + - self-hosted + - spinnaker + - windows # pwsh, msvc - ORX-10GS-51S5M-C # for tests permissions: @@ -58,12 +107,14 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} -L acquire-driver-spinnaker --output-on-failure + run: ctest -C ${{env.BUILD_TYPE}} -L oryx --output-on-failure merge: name: Automerge runs-on: "ubuntu-latest" - needs: test + needs: + - test-blackfly + - test-oryx if: ${{ github.actor == 'dependabot[bot]' }} steps: - name: Checkout PR diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b77c992..2dced24 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -58,9 +58,13 @@ else() ) add_test(NAME test-${tgt} COMMAND ${tgt}) - set_tests_properties(test-${tgt} PROPERTIES LABELS acquire-driver-spinnaker) if(name MATCHES "^oryx") set_tests_properties(test-${tgt} PROPERTIES FIXTURES_REQUIRED setup-oryx) + set_tests_properties(test-${tgt} PROPERTIES LABELS "acquire-driver-spinnaker;oryx") + elseif(name MATCHES "^blackfly") + set_tests_properties(test-${tgt} PROPERTIES LABELS "acquire-driver-spinnaker;blackfly") + else() # list-devices + set_tests_properties(test-${tgt} PROPERTIES LABELS "acquire-driver-spinnaker;blackfly;oryx") endif() endforeach()