From 2de9f1e45a377f9c87b3a674e77fdd0fda9598ce Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Wed, 9 Aug 2023 10:14:40 -0400 Subject: [PATCH] Add supported Linux build. (#66) * Add supported Linux build. * Updates. Ready for prime time. * Run tests on runners in Camera group. --- .github/workflows/build.yml | 45 ++++++++++++++++++++++++++++------- .github/workflows/test_pr.yml | 6 ++++- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cc53cd..5cefa14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: jobs: windows-build: name: "Build on Windows with eGrabber SDK" - runs-on: [ self-hosted, egrabber ] + runs-on: [ self-hosted, windows, egrabber ] permissions: actions: write @@ -50,16 +50,43 @@ jobs: - uses: actions/upload-artifact@v3 with: - name: Release binaries + name: windows-latest Release binaries path: ${{github.workspace}}/*.zip - unsupported-build: - name: "Build on Mac and Ubuntu" - strategy: - matrix: - platform: [ "ubuntu-latest", "macos-latest" ] + linux-build: + name: "Build on Ubuntu with eGrabber SDK" + runs-on: [ self-hosted, linux, egrabber ] - runs-on: ${{ matrix.platform }} + permissions: + actions: write + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.10.0 + with: + access_token: ${{ github.token }} + + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Configure + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: | + cmake --build ${{github.workspace}}/build --config Release + cpack --config ${{github.workspace}}/build/CPackConfig.cmake -C Release -G ZIP + + - uses: actions/upload-artifact@v3 + with: + name: ubuntu-latest Release binaries + path: ${{github.workspace}}/*.zip + + mac-build: + name: "Build on Mac" + runs-on: macos-latest permissions: actions: write @@ -84,5 +111,5 @@ jobs: - uses: actions/upload-artifact@v3 with: - name: ${{matrix.platform}} Release binaries + name: macos-latest Release binaries path: ${{github.workspace}}/*.zip diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index 983c92f..bc35715 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -13,7 +13,11 @@ env: jobs: test: - runs-on: [ self-hosted, egrabber ] + runs-on: + group: Camera # Vieworks hardware only present on runners in this group + labels: + - self-hosted + - egrabber permissions: actions: write