Skip to content

Commit c53db6e

Browse files
author
Aliaksandr Adziareika
committed
Add debug info about sys arch
1 parent eac81a7 commit c53db6e

7 files changed

Lines changed: 146 additions & 59 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Documentation
2+
description: Build Doxygen API reference documentation
3+
4+
inputs:
5+
build-path:
6+
description: 'Path to CMake build directory'
7+
required: true
8+
artifact-name:
9+
description: 'Artifact name for upload. If empty, documentation will not be uploaded'
10+
required: false
11+
default: ''
12+
artifact-retention-days:
13+
description: 'Retention days for artifact'
14+
required: false
15+
default: '7'
16+
17+
outputs:
18+
documentation-path:
19+
description: 'Path to documentation zip file'
20+
value: ${{ steps.build.outputs.documentation-path }}
21+
22+
runs:
23+
using: composite
24+
steps:
25+
- name: Build Documentation
26+
id: build
27+
shell: bash
28+
run: |
29+
cmake -B ${{ inputs.build-path }} -DOPENDAQ_BUILD_DOCUMENTATION=ON
30+
cmake --build ${{ inputs.build-path }} --target doc_doxygen
31+
32+
cd ${{ inputs.build-path }}/doc_doxygen/html
33+
zip -r ../opendaq_cpp_api_reference.zip .
34+
35+
echo "documentation-path=${{ inputs.build-path }}/doc_doxygen/opendaq_cpp_api_reference.zip" >> "$GITHUB_OUTPUT"
36+
37+
- name: Upload Documentation
38+
if: inputs.artifact-name != ''
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ${{ inputs.artifact-name }}
42+
path: ${{ steps.build.outputs.documentation-path }}
43+
retention-days: ${{ inputs.artifact-retention-days }}

.github/actions/build-sdk/action.yml

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ inputs:
3030
description: 'Build configuration (Release, Debug). Required for multi-config generators (Visual Studio)'
3131
required: false
3232
default: ''
33-
cmake-build-args:
34-
description: 'Additional CMake build arguments (passed after --)'
35-
required: false
36-
default: ''
3733
enable-32bit:
3834
description: 'Build for 32-bit architecture'
3935
required: false
@@ -62,6 +58,18 @@ inputs:
6258
description: 'Generate C# bindings (true/false/empty). Empty = use preset or cmake-config-args'
6359
required: false
6460
default: ''
61+
upload-artifact:
62+
description: 'Upload installer as artifact (true/false)'
63+
required: false
64+
default: 'false'
65+
package-artifact-name:
66+
description: 'Artifact name for installer upload. If empty, uses package-name from cpack output'
67+
required: false
68+
default: ''
69+
package-artifact-retention-days:
70+
description: 'Retention days for installer artifact'
71+
required: false
72+
default: '7'
6573

6674
outputs:
6775
build-path:
@@ -142,41 +150,24 @@ runs:
142150
env:
143151
ENABLE_32BIT: ${{ inputs.enable-32bit }}
144152
run: |
145-
DEV_PACKAGES=(
146-
libx11-dev
147-
libxi-dev
148-
libxcursor-dev
149-
libxrandr-dev
150-
libgl-dev
151-
libudev-dev
152-
libfreetype6-dev
153-
)
154-
155153
if [ "$ENABLE_32BIT" == "true" ]; then
156154
sudo dpkg --add-architecture i386
157-
DEV_PACKAGES=("${DEV_PACKAGES[@]/%/:i386}" python3:i386 python3-dev:i386 gcc-multilib g++-multilib \
158-
libx11-6:i386 libxrandr2:i386 libxcursor1:i386 libxi6:i386 libgl1:i386)
155+
PKG_FILE=".github/packages/apt-i386.txt"
156+
else
157+
PKG_FILE=".github/packages/apt.txt"
159158
fi
160159
161160
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
162161
${{ inputs.additional-dependencies || '' }} \
163-
lld mono-runtime libmono-system-json-microsoft4.0-cil libmono-system-data4.0-cil \
164-
"${DEV_PACKAGES[@]}"
162+
$(cat "$PKG_FILE")
165163
166164
- name: Install Linux dependencies (yum)
167165
if: steps.detect-linux.outputs.pkg-manager == 'yum'
168166
shell: bash
169167
run: |
170168
yum install -y \
171169
${{ inputs.additional-dependencies }} \
172-
mono-core \
173-
freetype-devel \
174-
libudev-devel \
175-
libX11-devel \
176-
libXi-devel \
177-
libXcursor-devel \
178-
libXrandr-devel \
179-
mesa-libGL-devel
170+
$(cat .github/packages/yum.txt)
180171
181172
- name: Install macOS dependencies
182173
if: runner.os == 'macOS'
@@ -297,17 +288,12 @@ runs:
297288
SHORT_SHA: ${{ inputs.bindings-csharp-version-suffix }}
298289
CMAKE_BUILD_TYPE: ${{ inputs.cmake-build-type }}
299290
CMAKE_BUILD_PATH: ${{ steps.cmake-config.outputs.build-path }}
300-
CMAKE_BUILD_ARGS_EXTRA: ${{ inputs.cmake-build-args }}
301291
run: |
302292
CMAKE_BUILD_ARGS=""
303293
if [ -n "$CMAKE_BUILD_TYPE" ]; then
304294
CMAKE_BUILD_ARGS="--config $CMAKE_BUILD_TYPE"
305295
fi
306296
307-
if [ -n "$CMAKE_BUILD_ARGS_EXTRA" ]; then
308-
CMAKE_BUILD_ARGS="$CMAKE_BUILD_ARGS -- $CMAKE_BUILD_ARGS_EXTRA"
309-
fi
310-
311297
echo "::group::CMake Build"
312298
cmake --build "$CMAKE_BUILD_PATH" $CMAKE_BUILD_ARGS
313299
echo "::endgroup::"
@@ -386,3 +372,11 @@ runs:
386372
else
387373
echo "package-path=$PACKAGE_FILE_PATH" >> $GITHUB_OUTPUT
388374
fi
375+
376+
- name: Upload Installer
377+
if: inputs.cpack-generator != '' && inputs.upload-artifact == 'true'
378+
uses: actions/upload-artifact@v4
379+
with:
380+
name: ${{ inputs.package-artifact-name || steps.build-installer.outputs.package-name }}
381+
path: ${{ steps.build-installer.outputs.package-path }}
382+
retention-days: ${{ inputs.package-artifact-retention-days }}

.github/packages/apt-i386.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
lld
2+
mono-runtime
3+
libmono-system-json-microsoft4.0-cil
4+
libmono-system-data4.0-cil
5+
gcc-multilib
6+
g++-multilib
7+
python3:i386
8+
python3-dev:i386
9+
libx11-dev:i386
10+
libxi-dev:i386
11+
libxcursor-dev:i386
12+
libxrandr-dev:i386
13+
libgl-dev:i386
14+
libudev-dev:i386
15+
libfreetype6-dev:i386
16+
libx11-6:i386
17+
libxrandr2:i386
18+
libxcursor1:i386
19+
libxi6:i386
20+
libgl1:i386

.github/packages/apt.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
lld
2+
mono-runtime
3+
libmono-system-json-microsoft4.0-cil
4+
libmono-system-data4.0-cil
5+
libx11-dev
6+
libxi-dev
7+
libxcursor-dev
8+
libxrandr-dev
9+
libgl-dev
10+
libudev-dev
11+
libfreetype6-dev

.github/packages/yum.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mono-core
2+
freetype-devel
3+
libudev-devel
4+
libX11-devel
5+
libXi-devel
6+
libXcursor-devel
7+
libXrandr-devel
8+
mesa-libGL-devel
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/cmake/Packing.cmake b/cmake/Packing.cmake
2+
index 84f62445..12345678 100644
3+
--- a/cmake/Packing.cmake
4+
+++ b/cmake/Packing.cmake
5+
@@ -85,6 +85,12 @@ elseif(_PACKING_OS_NAME STREQUAL "windows")
6+
endif()
7+
8+
# Architecture
9+
+message(STATUS "=== Architecture Debug Info ===")
10+
+message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
11+
+message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
12+
+message(STATUS "CMAKE_SIZEOF_VOID_P: ${CMAKE_SIZEOF_VOID_P}")
13+
+message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
14+
+message(STATUS "===============================")
15+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
16+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64")
17+
set(_PACKING_ARCH_NAME "ARM_64")

.github/workflows/package-sandbox.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,7 @@ jobs:
137137
cpack-generator: ${{ matrix.cpack-generator }}
138138
generate-csharp-bindings: false
139139
generate-python-bindings: false
140-
141-
- name: Upload SDK Installer
142-
uses: actions/upload-artifact@v4
143-
with:
144-
name: Package (${{ matrix.name }})
145-
path: ${{ steps.build-sdk.outputs.package-path }}
146-
retention-days: 7
140+
upload-artifact: true
147141

148142
- name: Package Python Bindings
149143
if: matrix.generate-python-bindings == true
@@ -226,6 +220,7 @@ jobs:
226220

227221
outputs:
228222
linux_x64_artifact_name: ${{ env.linux_x64_artifact }}
223+
simulator_package_name: ${{ steps.set-simulator-output.outputs.name }}
229224

230225
env:
231226
CC: gcc
@@ -252,6 +247,14 @@ jobs:
252247
cmake-config-args: ${{ matrix.cmake-defines }}
253248
cmake-build-type: ${{ matrix.cmake-build-type }}
254249

250+
- name: Debug architecture info
251+
run: |
252+
echo "=== System Architecture Debug ==="
253+
echo "uname -m: $(uname -m)"
254+
echo "uname -a: $(uname -a)"
255+
echo "arch: $(arch)"
256+
echo "================================="
257+
255258
- name: Build SDK
256259
id: build-sdk
257260
uses: ./.github/actions/build-sdk
@@ -264,30 +267,19 @@ jobs:
264267
cpack-generator: DEB
265268
generate-csharp-bindings: false
266269
generate-python-bindings: false
270+
upload-artifact: true
267271

268-
- name: Upload Package
269-
uses: actions/upload-artifact@v4
270-
with:
271-
name: Package (${{ matrix.name }})
272-
path: ${{ steps.build-sdk.outputs.package-path }}
273-
retention-days: 7
272+
- name: Set simulator package output
273+
id: set-simulator-output
274+
if: matrix.generate-simulator-app == true
275+
run: echo "name=${{ steps.build-sdk.outputs.package-name }}" >> $GITHUB_OUTPUT
274276

275277
- name: Build Documentation
276278
if: matrix.generate-doxygen-doc == true
277-
shell: bash
278-
run: |
279-
cmake -B ${{ steps.build-sdk.outputs.build-path }} -G "${{ matrix.cmake-generator }}" -DOPENDAQ_BUILD_DOCUMENTATION=ON
280-
cmake --build ${{ steps.build-sdk.outputs.build-path }} --target doc_doxygen
281-
cd ${{ steps.build-sdk.outputs.build-path }}/doc_doxygen/html
282-
zip -r ../opendaq_cpp_api_reference.zip .
283-
284-
- name: Upload API Reference
285-
if: matrix.generate-doxygen-doc == true
286-
uses: actions/upload-artifact@v4
279+
uses: ./.github/actions/build-doc
287280
with:
288-
name: API Reference
289-
path: ${{ steps.build-sdk.outputs.build-path }}/doc_doxygen/opendaq_cpp_api_reference.zip
290-
retention-days: 7
281+
build-path: ${{ steps.build-sdk.outputs.build-path }}
282+
artifact-name: API Reference
291283

292284
- name: Build Simulator App
293285
if: matrix.generate-simulator-app == true
@@ -545,7 +537,7 @@ jobs:
545537
- name: Download package
546538
uses: actions/download-artifact@v4
547539
with:
548-
name: Package (Linux x86_64 GCC Release)
540+
name: ${{ needs.package_linux.outputs.simulator_package_name }}
549541
path: ${{ env.simulator_directory }}
550542

551543
- name: Download simulator app
@@ -602,7 +594,9 @@ jobs:
602594
- name: Delete unused artifacts
603595
uses: geekyeggo/delete-artifact@v5
604596
with:
605-
name: ${{ env.simulator_app_artifact }}
597+
name: |
598+
${{ env.simulator_app_artifact }}
599+
${{ needs.package_linux.outputs.simulator_package_name }}
606600
607601
dotnet_bindings:
608602
runs-on: windows-latest

0 commit comments

Comments
 (0)