File tree Expand file tree Collapse file tree 4 files changed +49
-3
lines changed
Expand file tree Collapse file tree 4 files changed +49
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Linux (aarch64)
2+ on :
3+ push :
4+ branches :
5+ - main
6+ tags :
7+ - ' *'
8+ pull_request :
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+ - name : Install aarch64 Toolchain
16+ run : sudo apt install g++-aarch64-linux-gnu qemu qemu-user qemu-user-static
17+ - name : Install Clang 17
18+ run : |
19+ wget https://apt.llvm.org/llvm.sh
20+ chmod +x ./llvm.sh
21+ sudo ./llvm.sh 17
22+ - name : Configure
23+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DRPP_TEST=ON -DRPP_QEMU=ON
24+ env :
25+ CXX : clang++-17 --target=aarch64-linux-gnu
26+ CXXFLAGS : -march=armv8-a
27+ AR : aarch64-linux-gnu-ar
28+ AS : aarch64-linux-gnu-as
29+ LD : aarch64-linux-gnu-ld
30+ STRIP : aarch64-linux-gnu-strip
31+ - name : Build
32+ run : cmake --build build -- -j
33+ - name : Test
34+ run : ctest --test-dir build --output-on-failure
Original file line number Diff line number Diff line change 1818 chmod +x ./llvm.sh
1919 sudo ./llvm.sh 17
2020 - name : Configure
21- run : CXX=clang++-17 cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DRPP_TEST=ON
21+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DRPP_TEST=ON
22+ env :
23+ CXX : clang++-17
2224 - name : Build
2325 run : cmake --build build -- -j
2426 - name : Test
Original file line number Diff line number Diff line change 1515 - name : Install Clang 17
1616 run : brew install llvm@17
1717 - name : Configure
18- run : CXX=/usr/local/opt/llvm/bin/clang++ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DRPP_TEST=ON
18+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DRPP_TEST=ON
19+ env :
20+ CXX : /usr/local/opt/llvm/bin/clang++
1921 - name : Build
2022 run : cmake --build build -- -j
2123 - name : Test
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.17)
33project (rpp LANGUAGES CXX)
44
55option (RPP_TEST "Build tests" OFF )
6+ option (RPP_QEMU "Run tests with qemu-aarch64" OFF )
67
78add_subdirectory ("rpp/" )
89
@@ -22,8 +23,15 @@ if(RPP_TEST)
2223
2324 foreach (test ${TEST_SOURCES} )
2425 get_filename_component (testname ${test} NAME_WE )
26+
27+ if (RPP_QEMU)
28+ set (command qemu-aarch64 -L /usr/aarch64-linux-gnu/ $<TARGET_FILE:${testname} >)
29+ else ()
30+ set (command $<TARGET_FILE:${testname} >)
31+ endif ()
32+
2533 add_test (NAME ${testname}
26- COMMAND $<TARGET_FILE: ${testname} >
34+ COMMAND ${command}
2735 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /test" )
2836 endforeach (test ${TEST_SOURCES} )
2937endif ()
You can’t perform that action at this time.
0 commit comments