88
99jobs :
1010 build-and-test-c :
11- name : C Tests (GCC ${{ matrix.gcc-version }}, ${{ matrix.build-type }})
12- runs-on : ubuntu-latest
11+ name : C Tests (GCC ${{ matrix.gcc-version }}, ${{ matrix.build-type }}, ${{ matrix.arch }} )
12+ runs-on : ${{ matrix.runner }}
1313 container : gcc:${{ matrix.gcc-version }}
1414 strategy :
1515 fail-fast : false
1616 matrix :
1717 gcc-version : [13, 14, 15]
1818 build-type : [Debug, Release]
19+ arch : [x86_64, aarch64]
20+ include :
21+ - arch : x86_64
22+ runner : ubuntu-latest
23+ - arch : aarch64
24+ runner : ubuntu-24.04-arm
1925
2026 steps :
2127 - name : Checkout code
@@ -48,14 +54,20 @@ jobs:
4854 cmake -B build-list -DLIST_FEATURES=ON || true
4955
5056 build-and-test-cpp :
51- name : C++ Tests (GCC ${{ matrix.gcc-version }}, ${{ matrix.build-type }})
52- runs-on : ubuntu-latest
57+ name : C++ Tests (GCC ${{ matrix.gcc-version }}, ${{ matrix.build-type }}, ${{ matrix.arch }} )
58+ runs-on : ${{ matrix.runner }}
5359 container : gcc:${{ matrix.gcc-version }}
5460 strategy :
5561 fail-fast : false
5662 matrix :
5763 gcc-version : [13, 14, 15]
5864 build-type : [Debug, Release]
65+ arch : [x86_64, aarch64]
66+ include :
67+ - arch : x86_64
68+ runner : ubuntu-latest
69+ - arch : aarch64
70+ runner : ubuntu-24.04-arm
5971
6072 steps :
6173 - name : Checkout code
@@ -84,18 +96,30 @@ jobs:
8496 ctest --output-on-failure --verbose -R "^test_cpp_"
8597
8698 build-and-test-c-clang :
87- name : C Tests (Clang ${{ matrix.clang-version }}, ${{ matrix.build-type }})
88- runs-on : ubuntu-latest
99+ name : C Tests (Clang ${{ matrix.clang-version }}, ${{ matrix.build-type }}, ${{ matrix.arch }} )
100+ runs-on : ${{ matrix.runner }}
89101 strategy :
90102 fail-fast : false
91103 matrix :
92104 clang-version : [16, 17, 18, 19, 20]
93105 build-type : [Debug, Release]
106+ arch : [x86_64, aarch64]
107+ include :
108+ - arch : x86_64
109+ runner : ubuntu-latest
110+ - arch : aarch64
111+ runner : ubuntu-24.04-arm
94112
95113 steps :
96114 - name : Checkout code
97115 uses : actions/checkout@v4
98116
117+ - name : Add LLVM apt repository
118+ if : matrix.arch == 'aarch64'
119+ run : |
120+ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
121+ echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm.list
122+
99123 - name : Install Clang ${{ matrix.clang-version }}
100124 run : |
101125 sudo apt update
@@ -126,18 +150,30 @@ jobs:
126150 ctest --output-on-failure --verbose -R "^test_(features|vector_ops|thread_safe_detection|resolver_macro)$"
127151
128152 build-and-test-cpp-clang :
129- name : C++ Tests (Clang ${{ matrix.clang-version }}, ${{ matrix.build-type }})
130- runs-on : ubuntu-latest
153+ name : C++ Tests (Clang ${{ matrix.clang-version }}, ${{ matrix.build-type }}, ${{ matrix.arch }} )
154+ runs-on : ${{ matrix.runner }}
131155 strategy :
132156 fail-fast : false
133157 matrix :
134158 clang-version : [16, 17, 18, 19, 20]
135159 build-type : [Debug, Release]
160+ arch : [x86_64, aarch64]
161+ include :
162+ - arch : x86_64
163+ runner : ubuntu-latest
164+ - arch : aarch64
165+ runner : ubuntu-24.04-arm
136166
137167 steps :
138168 - name : Checkout code
139169 uses : actions/checkout@v4
140170
171+ - name : Add LLVM apt repository
172+ if : matrix.arch == 'aarch64'
173+ run : |
174+ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
175+ echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm.list
176+
141177 - name : Install Clang ${{ matrix.clang-version }}
142178 run : |
143179 sudo apt update
@@ -203,7 +239,7 @@ jobs:
203239 path : cppcheck-report.txt
204240
205241 simd-verification :
206- name : SIMD Instruction Verification
242+ name : SIMD Instruction Verification (x86_64)
207243 runs-on : ubuntu-latest
208244
209245 steps :
@@ -238,6 +274,42 @@ jobs:
238274 'objdump -d {} | grep -E "(vpx|vf|vmov|vadd|vmul|vsub)" && echo "Found SIMD in: {}"' \; \
239275 || echo "Note: Some object files may not contain SIMD instructions (expected for scalar fallbacks)"
240276
277+ simd-verification-arm :
278+ name : SIMD Instruction Verification (aarch64)
279+ runs-on : ubuntu-24.04-arm
280+
281+ steps :
282+ - name : Checkout code
283+ uses : actions/checkout@v4
284+
285+ - name : Install GCC 13
286+ run : |
287+ sudo apt update
288+ sudo apt install -y gcc-13 g++-13 binutils
289+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
290+
291+ - name : Install CMake
292+ uses : jwlawson/actions-setup-cmake@v2
293+ with :
294+ cmake-version : ' 3.25.x'
295+
296+ - name : Build Release
297+ run : |
298+ cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13
299+ cmake --build build -j$(nproc)
300+
301+ - name : Check for SIMD instructions
302+ run : |
303+ chmod +x scripts/check_for_simd.sh
304+ ./scripts/check_for_simd.sh || true
305+
306+ - name : Verify object files contain SIMD
307+ run : |
308+ echo "=== Checking for ARM SIMD instructions in object files ==="
309+ find build -name "*.o" -exec sh -c \
310+ 'objdump -d {} | grep -E "(ld1|st1|fmla|fmul|fadd|whilelo|ptrue|cnt)" && echo "Found SIMD in: {}"' \; \
311+ || echo "Note: Some object files may not contain SIMD instructions (expected for scalar fallbacks)"
312+
241313 build-docs :
242314 name : Documentation Check
243315 runs-on : ubuntu-latest
@@ -261,7 +333,7 @@ jobs:
261333 continue-on-error : true
262334
263335 build-artifacts :
264- name : Build & Archive Artifacts
336+ name : Build & Archive Artifacts (x86_64)
265337 runs-on : ubuntu-latest
266338 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
267339
@@ -294,6 +366,44 @@ jobs:
294366 - name : Upload build artifacts
295367 uses : actions/upload-artifact@v4
296368 with :
297- name : libdynemit-libraries
369+ name : libdynemit-libraries-x86_64
370+ path : artifacts/
371+ retention-days : 10
372+
373+ build-artifacts-arm :
374+ name : Build & Archive Artifacts (aarch64)
375+ runs-on : ubuntu-24.04-arm
376+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
377+
378+ steps :
379+ - name : Checkout code
380+ uses : actions/checkout@v4
381+
382+ - name : Install GCC 13
383+ run : |
384+ sudo apt update
385+ sudo apt install -y gcc-13 g++-13
386+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
387+
388+ - name : Install CMake
389+ uses : jwlawson/actions-setup-cmake@v2
390+ with :
391+ cmake-version : ' 3.25.x'
392+
393+ - name : Build Release
394+ run : |
395+ cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13
396+ cmake --build build -j$(nproc)
397+
398+ - name : Package libraries
399+ run : |
400+ mkdir -p artifacts/lib artifacts/include
401+ cp -r build/src/*.a build/features/*/*.a artifacts/lib/ || true
402+ cp -r include/* artifacts/include/
403+
404+ - name : Upload build artifacts
405+ uses : actions/upload-artifact@v4
406+ with :
407+ name : libdynemit-libraries-aarch64
298408 path : artifacts/
299409 retention-days : 10
0 commit comments