From 05f6e89529aeddaa9b6377280b9433514472fc7d Mon Sep 17 00:00:00 2001 From: Heath Henley Date: Tue, 10 Feb 2026 16:36:47 -0500 Subject: [PATCH 1/4] Adding auto build --- .github/workflows/build-test-package.yml | 118 +++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/build-test-package.yml diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml new file mode 100644 index 0000000..4e0d47c --- /dev/null +++ b/.github/workflows/build-test-package.yml @@ -0,0 +1,118 @@ +name: Build Test Package + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + build-test-package: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - name: windows-release + os: windows-latest + artifact_name: farsounder-sdk-windows-release + archive_path: farsounder-sdk-windows-release.zip + - name: ubuntu-release + os: ubuntu-24.04 + artifact_name: farsounder-sdk-ubuntu-release + archive_path: farsounder-sdk-ubuntu-release.tar.gz + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Linux build dependencies + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake libssl-dev pkg-config + + - name: Configure (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: cmake -S . -B build -DFARSOUNDER_BUILD_TESTS=ON + + - name: Configure (Ubuntu) + if: runner.os == 'Linux' + shell: bash + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DFARSOUNDER_BUILD_TESTS=ON + + - name: Build (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: cmake --build build --config Release --parallel 2 + + - name: Build (Ubuntu) + if: runner.os == 'Linux' + shell: bash + run: cmake --build build --parallel 2 + + - name: Test (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: ctest --test-dir build -C Release --output-on-failure + + - name: Test (Ubuntu) + if: runner.os == 'Linux' + shell: bash + run: ctest --test-dir build --output-on-failure + + - name: Install (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: cmake --install build --config Release --prefix "$env:GITHUB_WORKSPACE/stage" + + - name: Install (Ubuntu) + if: runner.os == 'Linux' + shell: bash + run: cmake --install build --prefix "$GITHUB_WORKSPACE/stage" + + - name: Validate package contents (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + Get-ChildItem "$env:GITHUB_WORKSPACE/stage" -Recurse | Select-Object FullName + if (-not (Test-Path "$env:GITHUB_WORKSPACE/stage/bin/farsounder.dll")) { throw "Missing stage/bin/farsounder.dll" } + if (-not (Test-Path "$env:GITHUB_WORKSPACE/stage/lib/farsounder.lib")) { throw "Missing stage/lib/farsounder.lib" } + if (-not (Test-Path "$env:GITHUB_WORKSPACE/stage/include/farsounder")) { throw "Missing stage/include/farsounder" } + if (-not (Test-Path "$env:GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfig.cmake")) { throw "Missing CMake package config" } + if (-not (Test-Path "$env:GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfigVersion.cmake")) { throw "Missing CMake package version file" } + if (-not (Test-Path "$env:GITHUB_WORKSPACE/stage/share/farsounder/LICENSE")) { throw "Missing LICENSE" } + + - name: Validate package contents (Ubuntu) + if: runner.os == 'Linux' + shell: bash + run: | + find "$GITHUB_WORKSPACE/stage" -maxdepth 5 -print + test -f "$GITHUB_WORKSPACE/stage/lib/libfarsounder.so" + test -d "$GITHUB_WORKSPACE/stage/include/farsounder" + test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfig.cmake" + test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfigVersion.cmake" + test -f "$GITHUB_WORKSPACE/stage/share/farsounder/LICENSE" + + - name: Archive package (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: Compress-Archive -Path "$env:GITHUB_WORKSPACE/stage/*" -DestinationPath "$env:GITHUB_WORKSPACE/${{ matrix.archive_path }}" + + - name: Archive package (Ubuntu) + if: runner.os == 'Linux' + shell: bash + run: tar -C "$GITHUB_WORKSPACE/stage" -czf "$GITHUB_WORKSPACE/${{ matrix.archive_path }}" . + + - name: Upload package artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact_name }} + path: ${{ matrix.archive_path }} + if-no-files-found: error + retention-days: 14 From c535e51544862f387f2162e83bf443dd68835961 Mon Sep 17 00:00:00 2001 From: Heath Henley Date: Tue, 10 Feb 2026 16:59:36 -0500 Subject: [PATCH 2/4] Remove todo --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index e4138fc..022f5c2 100644 --- a/README.md +++ b/README.md @@ -132,5 +132,4 @@ ctest --test-dir build -C Debug --output-on-failure - example server for testing without the SDK demo running - tests --> make transport layer injectable for easier testing? - create example to test/demo async stuff -- github actions build / test - docs From bfc4918aafebfb7db370db17af81a73e8c229743 Mon Sep 17 00:00:00 2001 From: Heath Henley Date: Tue, 10 Feb 2026 17:10:18 -0500 Subject: [PATCH 3/4] Fix: zip of zip (flatten) --- .github/workflows/build-test-package.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index 4e0d47c..f1bb2e9 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -19,11 +19,9 @@ jobs: - name: windows-release os: windows-latest artifact_name: farsounder-sdk-windows-release - archive_path: farsounder-sdk-windows-release.zip - name: ubuntu-release os: ubuntu-24.04 artifact_name: farsounder-sdk-ubuntu-release - archive_path: farsounder-sdk-ubuntu-release.tar.gz steps: - name: Checkout @@ -99,20 +97,10 @@ jobs: test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfigVersion.cmake" test -f "$GITHUB_WORKSPACE/stage/share/farsounder/LICENSE" - - name: Archive package (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: Compress-Archive -Path "$env:GITHUB_WORKSPACE/stage/*" -DestinationPath "$env:GITHUB_WORKSPACE/${{ matrix.archive_path }}" - - - name: Archive package (Ubuntu) - if: runner.os == 'Linux' - shell: bash - run: tar -C "$GITHUB_WORKSPACE/stage" -czf "$GITHUB_WORKSPACE/${{ matrix.archive_path }}" . - - name: Upload package artifact uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact_name }} - path: ${{ matrix.archive_path }} + path: stage if-no-files-found: error retention-days: 14 From 4bc29a380cedd2d839c5a6fe9492934415cc1433 Mon Sep 17 00:00:00 2001 From: Heath Henley Date: Tue, 10 Feb 2026 17:37:26 -0500 Subject: [PATCH 4/4] Apply robo-suggestions Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-test-package.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index f1bb2e9..b0a372c 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -37,12 +37,12 @@ jobs: - name: Configure (Windows) if: runner.os == 'Windows' shell: pwsh - run: cmake -S . -B build -DFARSOUNDER_BUILD_TESTS=ON + run: cmake -S . -B build -DFARSOUNDER_BUILD_TESTS=ON -DFARSOUNDER_BUILD_EXAMPLES=OFF - name: Configure (Ubuntu) if: runner.os == 'Linux' shell: bash - run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DFARSOUNDER_BUILD_TESTS=ON + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DFARSOUNDER_BUILD_TESTS=ON -DFARSOUNDER_BUILD_EXAMPLES=OFF - name: Build (Windows) if: runner.os == 'Windows' @@ -91,11 +91,11 @@ jobs: shell: bash run: | find "$GITHUB_WORKSPACE/stage" -maxdepth 5 -print - test -f "$GITHUB_WORKSPACE/stage/lib/libfarsounder.so" - test -d "$GITHUB_WORKSPACE/stage/include/farsounder" - test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfig.cmake" - test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfigVersion.cmake" - test -f "$GITHUB_WORKSPACE/stage/share/farsounder/LICENSE" + test -f "$GITHUB_WORKSPACE/stage/lib/libfarsounder.so" || { echo 'ERROR: Expected library not found: $GITHUB_WORKSPACE/stage/lib/libfarsounder.so'; exit 1; } + test -d "$GITHUB_WORKSPACE/stage/include/farsounder" || { echo 'ERROR: Expected include directory not found: $GITHUB_WORKSPACE/stage/include/farsounder'; exit 1; } + test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfig.cmake" || { echo 'ERROR: Expected CMake config not found: $GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfig.cmake'; exit 1; } + test -f "$GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfigVersion.cmake" || { echo 'ERROR: Expected CMake config version file not found: $GITHUB_WORKSPACE/stage/lib/cmake/farsounder/farsounderConfigVersion.cmake'; exit 1; } + test -f "$GITHUB_WORKSPACE/stage/share/farsounder/LICENSE" || { echo 'ERROR: Expected license file not found: $GITHUB_WORKSPACE/stage/share/farsounder/LICENSE'; exit 1; } - name: Upload package artifact uses: actions/upload-artifact@v4