Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6761b65
The openDAQ ci workflow build Windows job refactoring
Nov 25, 2025
1d92dc4
Move dependencies installation and setup steps into build-sdk action
Nov 27, 2025
0a8a3fc
Add missing Python 3.14 version
Nov 27, 2025
fd3d9a9
Remove cmake_generator_platform for Win32
Dec 2, 2025
14f3c9c
Remove step renaming Clang directory
Dec 4, 2025
4d29add
Setup python 3.14 explicitly
Dec 4, 2025
f799bed
The openDAQ ci workflow build Linux job refactoring
Dec 1, 2025
46b799a
Remove Python package installation from apt (should be done by setup-…
Dec 5, 2025
98de5fa
Downgrade Python to 3.12
Dec 5, 2025
e5dd683
Disable python-setup and numpy installation via pip
Dec 5, 2025
ae31f2c
Remove packaging steps from build-linux job
Dec 8, 2025
b17d084
Add ubuntu22.04 and clang-16 matrix configs
Dec 8, 2025
cc89a55
Remove clang-tidy and disable bindings temporary
Dec 8, 2025
ba94d45
Dump ICMP ping UID allowed
Dec 9, 2025
760c5cc
Run tests with sudo
Dec 9, 2025
a982881
Add ccache
Dec 9, 2025
114e430
Grant CAP_NET_RAW Linux capability instead of using sudo for running …
Dec 9, 2025
bb58326
Enable Python and C# bindings
Dec 9, 2025
ba5d495
Add ccache setup action
Dec 10, 2025
f2e8b9d
Cleanup debug steps
Dec 10, 2025
5ea75ff
Enable Windows build and test
Dec 10, 2025
d21aaa2
Call ccache-setup from actions/ccache-setup branch
Dec 10, 2025
f1d5501
Disable 64 bits Ubuntu matrix keys
Dec 11, 2025
0d6f41b
Add trace for executable files info to check bitness
Dec 11, 2025
2f008c2
Add 32 bit asm flag
Dec 11, 2025
4c78d2e
Add flag for Boost.Context i686 asm file selection
Dec 11, 2025
2c4848e
Add system name Linux to CMake defines
Dec 11, 2025
735a0b0
Enable -fPIC for 32-bit Linux shared libraries
Dec 11, 2025
4ff994a
Install mono runtime even for 32 bits builds
Dec 11, 2025
2c7c651
Disable bcrypt asm for 32-bit Linux (x86.S not included in build)
Dec 11, 2025
d937bbd
Disable 32 bits build
Dec 11, 2025
b5f7c02
Disable ccache for gcc-14 to verify low disk space issue is fixed
Dec 12, 2025
6711ee5
Enable 32 bits linux build-and-test functionality
Dec 12, 2025
cff2cae
Fix force fallback to the BF_body macro instead of including x86.S di…
Dec 12, 2025
a85930d
Update with main ci workflow
Jan 12, 2026
12bdeb2
Disable bindings
Jan 12, 2026
b678388
Disable asm for bcrypt
Jan 13, 2026
f73b73a
Add -ffloat-store flag for 32-bit Linux to fix x87 FPU precision issues
Jan 13, 2026
d27fb0f
Increase timeout from 180 up to 240 minutes for build_linux job
Jan 13, 2026
eb43800
Move 32-bits Linux specific flags to CMakeLists
Jan 14, 2026
324dd66
Add bcrypt/opcua asm fallback patches
Jan 14, 2026
7edc0e5
Remove -Wno-error=stringop-overflow error suppression
Jan 15, 2026
136f32c
Disable audio device module warnings as errors for linux 32-bit
Jan 15, 2026
71e8b4f
Change i686 -> i386
Jan 15, 2026
13a280d
Disable patches
Jan 16, 2026
7e6533f
Fix boost io dependency
Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 254 additions & 0 deletions .github/actions/build-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
name: Build openDAQ SDK
description: Configure, build and test openDAQ SDK

inputs:
additional-dependencies:
description: 'Additional packages to install (apt on Linux, choco on Windows)'
required: false
default: ''
cmake-generator:
description: 'CMake generator (e.g., "Ninja", "Visual Studio 17 2022")'
required: false
default: ''
cmake-config-preset:
description: 'CMake configure preset name'
required: false
default: ''
cmake-config-args:
description: 'Additional CMake configure arguments (e.g., -D flags)'
required: false
default: ''
cmake-build-type:
description: 'Build configuration (Release, Debug). Required for multi-config generators (Visual Studio)'
required: false
default: ''
enable-32bit:
description: 'Build for 32-bit architecture'
required: false
default: 'false'
enable-tests:
description: 'Run tests after build'
required: false
default: 'false'
ctest-preset:
description: 'CTest preset name'
required: false
default: ''

outputs:
gtest-xml-path:
description: 'Path to GTest XML reports directory'
value: ${{ steps.test.outputs.gtest-xml-path }}

runs:
using: composite
steps:
- name: Check inputs
shell: bash
env:
CMAKE_GENERATOR: ${{ inputs.cmake-generator }}
run: |
if [ -z "$CMAKE_GENERATOR" ]; then
echo "::error::✗ The cmake-generator input is not set."
exit 1
fi

- name: Set up Python
if: ${{ !(inputs.enable-32bit == 'true' && runner.os == 'Linux') }}
uses: actions/setup-python@v5
with:
python-version: '3.14'
architecture: ${{ inputs.enable-32bit == 'true' && 'x86' || 'x64' }}

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2

- name: Install Windows dependencies
if: runner.os == 'Windows' && inputs.additional-dependencies != ''
shell: pwsh
run: choco install ${{ inputs.additional-dependencies }} -y --no-progress

- name: Remove conflicting packages (for 32-bit build)
if: runner.os == 'Linux' && inputs.enable-32bit == 'true'
shell: bash
run: |
echo "Removing bootloader packages that conflict with i386 multi-arch"
if ! sudo apt-get remove -y --allow-remove-essential shim-signed grub-efi-amd64-signed grub2-common grub-efi-amd64-bin grub-common; then
echo "::warning::Failed to remove bootloader packages"
fi
echo "Removing pre-installed 64-bit Python to avoid conflicts with 32-bit build"
if ! sudo apt-get remove -y python3 python3-pip python3-dev; then
echo "::warning::Failed to remove pre-installed Python packages"
fi
sudo apt-get autoremove -y

- name: Install Linux dependencies
if: runner.os == 'Linux'
shell: bash
env:
ENABLE_32BIT: ${{ inputs.enable-32bit }}
run: |
DEV_PACKAGES=(
libx11-dev
libxi-dev
libxcursor-dev
libxrandr-dev
libgl-dev
libudev-dev
libfreetype6-dev
)

if [ "$ENABLE_32BIT" == "true" ]; then
sudo dpkg --add-architecture i386
DEV_PACKAGES=("${DEV_PACKAGES[@]/%/:i386}" python3:i386 python3-dev:i386 gcc-multilib g++-multilib \
libx11-6:i386 libxrandr2:i386 libxcursor1:i386 libxi6:i386 libgl1:i386)
fi

sudo apt-get update && sudo apt-get install -y --no-install-recommends \
${{ inputs.additional-dependencies || '' }} \
lld mono-runtime libmono-system-json-microsoft4.0-cil libmono-system-data4.0-cil \
"${DEV_PACKAGES[@]}"

- name: Install macOS dependencies
if: runner.os == 'macOS'
shell: bash
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install mono ${{ inputs.additional-dependencies }}

- name: Install ninja-build
if: inputs.cmake-generator == 'Ninja'
uses: seanmiddleditch/gha-setup-ninja@v5

- name: Setup MSYS2 MINGW64
if: runner.os == 'Windows' && env.CXX == 'g++'
id: msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
install: mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc

- name: Add MSYS2 MINGW64 to PATH
if: runner.os == 'Windows' && env.CXX == 'g++'
shell: bash
run: |
echo "${{ steps.msys2.outputs.msys2-location }}/mingw64/bin" >> $GITHUB_PATH
echo "Added MSYS2 MINGW64 to PATH: ${{ steps.msys2.outputs.msys2-location }}/mingw64/bin"

# https://github.com/actions/runner-images/issues/10001
- name: Setup MSVC toolchain
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Setup Intel LLVM compiler
if: runner.os == 'Windows' && env.CXX == 'icx'
uses: ./.github/actions/setup-compiler-icx

- name: Install Python dependencies
if: ${{ !(inputs.enable-32bit == 'true' && runner.os == 'Linux') }}
shell: bash
run: |
echo "Installing numpy for Python: $(python --version)"
python -m pip install numpy
echo "Done installing Python dependencies"

- name: Configure
id: cmake-config
shell: bash
env:
CMAKE_BUILD_TYPE: ${{ inputs.cmake-build-type }}
CMAKE_GENERATOR: ${{ inputs.cmake-generator }}
CI_GIT_BRANCH: ${{ github.head_ref }}
ENABLE_32BIT: ${{ inputs.enable-32bit }}
run: |
CMAKE_BUILD_PATH="build"
mkdir -p "$CMAKE_BUILD_PATH"
CMAKE_BUILD_PATH=$(cd "$CMAKE_BUILD_PATH" && pwd)
echo "build-path=$CMAKE_BUILD_PATH" >> "$GITHUB_OUTPUT"

# Detect Visual Studio generator
IS_VISUAL_STUDIO=false
if [[ "$CMAKE_GENERATOR" == "Visual Studio"* ]]; then
IS_VISUAL_STUDIO=true
fi

CMAKE_ARGS=""
if [ -n "${{ inputs.cmake-config-preset }}" ]; then
CMAKE_ARGS="--preset ${{ inputs.cmake-config-preset }}"
fi

# Visual Studio specific options
if [ "$IS_VISUAL_STUDIO" == "true" ]; then
CMAKE_ARGS="$CMAKE_ARGS -DOPENDAQ_MSVC_SINGLE_PROCESS_BUILD=ON"
fi

# 32-bit build configuration
if [ "$ENABLE_32BIT" == "true" ]; then
if [ "$IS_VISUAL_STUDIO" == "true" ]; then
CMAKE_ARGS="$CMAKE_ARGS -A Win32"
else
CMAKE_ARGS="$CMAKE_ARGS -DOPENDAQ_FORCE_COMPILE_32BIT=ON"
fi
fi

if [ -n "$CMAKE_BUILD_TYPE" ]; then
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
fi

CMAKE_ARGS="$CMAKE_ARGS -DCI_GIT_BRANCH=$CI_GIT_BRANCH"

echo "::group::CMake Configure"
cmake -B "$CMAKE_BUILD_PATH" -G "$CMAKE_GENERATOR" $CMAKE_ARGS ${{ inputs.cmake-config-args }}
echo "::endgroup::"

- name: Build
shell: bash
env:
SHORT_SHA: ci # .NET bindings version suffix (e.g., 1.0.0-beta-ci)
CMAKE_BUILD_TYPE: ${{ inputs.cmake-build-type }}
CMAKE_BUILD_PATH: ${{ steps.cmake-config.outputs.build-path }}
run: |
CMAKE_BUILD_ARGS=""
if [ -n "$CMAKE_BUILD_TYPE" ]; then
CMAKE_BUILD_ARGS="--config $CMAKE_BUILD_TYPE"
fi

echo "::group::CMake Build"
cmake --build "$CMAKE_BUILD_PATH" $CMAKE_BUILD_ARGS
echo "::endgroup::"

- name: Test
id: test
if: inputs.enable-tests == 'true'
shell: bash
env:
CMAKE_BUILD_TYPE: ${{ inputs.cmake-build-type }}
CMAKE_BUILD_PATH: ${{ steps.cmake-config.outputs.build-path }}
run: |
GTEST_XML_PATH="$CMAKE_BUILD_PATH/test_results"
mkdir -p "$GTEST_XML_PATH"

if command -v cygpath &> /dev/null; then
GTEST_XML_PATH=$(cygpath -w "$GTEST_XML_PATH")
fi

export GTEST_OUTPUT="xml:$GTEST_XML_PATH/"
echo "gtest-xml-path=$GTEST_XML_PATH" >> "$GITHUB_OUTPUT"

CTEST_ARGS=""
if [ -n "${{ inputs.ctest-preset }}" ]; then
CTEST_ARGS="--preset ${{ inputs.ctest-preset }}"
fi

if [ -n "$CMAKE_BUILD_TYPE" ]; then
CTEST_ARGS="$CTEST_ARGS --build-config $CMAKE_BUILD_TYPE"
fi

SUDO_CMD=""
if command -v sudo &> /dev/null; then
SUDO_CMD="sudo -E"
fi

echo "::group::CTest"
$SUDO_CMD ctest --test-dir "$CMAKE_BUILD_PATH" --output-on-failure $CTEST_ARGS
echo "::endgroup::"
97 changes: 97 additions & 0 deletions .github/actions/setup-compiler-icx/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Setup Intel LLVM Compiler
description: Install and configure Intel LLVM C++ compiler (icx) from oneAPI toolkit

runs:
using: composite
steps:
- name: Download installer
if: runner.os == 'Windows'
id: download-windows
shell: pwsh
run: |
$url = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1f18901e-877d-469d-a41a-a10f11b39336/intel-oneapi-base-toolkit-2025.3.0.372_offline.exe"
$output = "$env:TEMP\oneapi_installer.exe"

Write-Host "Downloading Intel oneAPI Base Toolkit..."
Write-Host "See: https://github.com/oneapi-src/oneapi-ci"
Write-Host "URL: $url"
Write-Host "Output: $output"

curl.exe -L -o $output $url --retry 5 --retry-delay 5 --fail --show-error

if ($LASTEXITCODE -ne 0) {
Write-Error "Download failed with exit code $LASTEXITCODE"
exit 1
}

if (-not (Test-Path $output)) {
Write-Error "Downloaded file not found: $output"
exit 1
}

$size = (Get-Item $output).Length / 1MB
Write-Host "Download complete: $([math]::Round($size, 2)) MB"

- name: Install oneAPI
if: runner.os == 'Windows'
id: install-windows
shell: pwsh
run: |
Write-Host "Extracting installer..."
$extract = Start-Process -Wait -PassThru -FilePath "$env:TEMP\oneapi_installer.exe" `
-ArgumentList "-s", "-x", "-f", "$env:TEMP\oneapi_extracted", "--log", "extract.log"
if ($extract.ExitCode -ne 0) {
Write-Error "Extraction failed with exit code $($extract.ExitCode)"
Get-Content extract.log -ErrorAction SilentlyContinue
exit 1
}

Write-Host "Installing component: intel.oneapi.win.cpp-dpcpp-common"
$installArgs = "-s --action install --eula=accept --components=intel.oneapi.win.cpp-dpcpp-common -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=."
Write-Host "Running: bootstrapper.exe $installArgs"
$install = Start-Process -Wait -PassThru -FilePath "$env:TEMP\oneapi_extracted\bootstrapper.exe" -ArgumentList $installArgs
if ($install.ExitCode -ne 0) {
Write-Error "Installation failed with exit code $($install.ExitCode)"
Get-ChildItem *.log | ForEach-Object { Write-Host "=== $($_.Name) ==="; Get-Content $_ }
exit 1
}

# Verify installation
$compilerPath = "C:\Program Files (x86)\Intel\oneAPI\compiler"
if (-not (Test-Path $compilerPath)) {
Write-Error "Compiler directory not found after installation"
Write-Host "Contents of Intel oneAPI directory:"
Get-ChildItem "C:\Program Files (x86)\Intel\oneAPI" -ErrorAction SilentlyContinue
exit 1
}
Write-Host "Installation complete"
Get-ChildItem $compilerPath

# Cleanup installer files
Remove-Item -Force "$env:TEMP\oneapi_installer.exe" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:TEMP\oneapi_extracted" -ErrorAction SilentlyContinue

# Output scripts for environment setup
"scripts<<EOF" >> $env:GITHUB_OUTPUT
"C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" >> $env:GITHUB_OUTPUT
"C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" >> $env:GITHUB_OUTPUT
"EOF" >> $env:GITHUB_OUTPUT

- name: Export oneAPI environment
if: runner.os == 'Windows'
uses: ./.github/actions/source-script
with:
scripts: ${{ steps.install-windows.outputs.scripts }}

- name: Verify compiler
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "Verifying Intel oneAPI compiler..."
$icxPath = Get-Command icx -ErrorAction SilentlyContinue
if (-not $icxPath) {
Write-Error "icx compiler not found in PATH"
exit 1
}
Write-Host "Found: $($icxPath.Source)"
icx --version
Loading
Loading