File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ native-linux-unittests :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Install native toolchain
14+ run : |
15+ sudo apt-get update
16+ sudo apt-get install -y g++
17+
18+ - name : Build unit tests
19+ working-directory : build
20+ run : |
21+ mkdir -p bin
22+ g++ -c -std=c++11 -Wall -pedantic-errors -Wpedantic -Wconversion -DMOODYCAMEL_STATIC -pthread -g -O0 -fno-elide-constructors -fno-exceptions ../c_api/blockingconcurrentqueue.cpp ../c_api/concurrentqueue.cpp
23+ g++ -std=c++11 -Wall -pedantic-errors -Wpedantic -Wconversion -DMOODYCAMEL_STATIC -pthread -g -O0 -fno-elide-constructors ../tests/common/simplethread.cpp ../tests/common/systemtime.cpp ../tests/unittests/unittests.cpp blockingconcurrentqueue.o concurrentqueue.o -o bin/unittests -lrt
24+
25+ - name : Run unit tests
26+ working-directory : build
27+ run : ./bin/unittests --disable-prompt --iterations 1
28+
29+ riscv64-linux-unittests :
30+ runs-on : ubuntu-latest
31+ steps :
32+ - uses : actions/checkout@v4
33+
34+ - name : Install RISC-V toolchain and QEMU
35+ run : |
36+ sudo apt-get update
37+ sudo apt-get install -y g++-riscv64-linux-gnu qemu-user-static
38+
39+ - name : Build RISC-V unit tests
40+ working-directory : build
41+ run : |
42+ mkdir -p bin-riscv
43+ riscv64-linux-gnu-g++ -c -std=c++11 -Wall -pedantic-errors -Wpedantic -Wconversion -DMOODYCAMEL_STATIC -pthread -g -O0 -fno-elide-constructors -fno-exceptions ../c_api/blockingconcurrentqueue.cpp ../c_api/concurrentqueue.cpp
44+ riscv64-linux-gnu-g++ -std=c++11 -Wall -pedantic-errors -Wpedantic -Wconversion -DMOODYCAMEL_STATIC -pthread -g -O0 -fno-elide-constructors ../tests/common/simplethread.cpp ../tests/common/systemtime.cpp ../tests/unittests/unittests.cpp blockingconcurrentqueue.o concurrentqueue.o -o bin-riscv/unittests-riscv64 -lrt
45+
46+ - name : Run RISC-V unit tests under QEMU
47+ working-directory : build
48+ run : qemu-riscv64-static -L /usr/riscv64-linux-gnu ./bin-riscv/unittests-riscv64 --disable-prompt --iterations 1
Original file line number Diff line number Diff line change @@ -454,9 +454,10 @@ I've written quite a few unit tests as well as a randomized long-running fuzz te
454454core queue algorithm through the [ CDSChecker] [ cdschecker ] C++11 memory model model checker. Some of the
455455inner algorithms were tested separately using the [ Relacy] [ relacy ] model checker, and full integration
456456tests were also performed with Relacy.
457- I've tested
458- on Linux (Fedora 19) and Windows (7), but only on x86 processors so far (Intel and AMD). The code was
459- written to be platform-independent, however, and should work across all processors and OSes.
457+ I've tested
458+ on Linux (Fedora 19) and Windows (7) on x86 processors (Intel and AMD), and the GitHub Actions CI now also
459+ cross-compiles and runs the unit tests for ` riscv64 ` Linux under QEMU. The code was written to be
460+ platform-independent, and should work across all processors and OSes.
460461
461462Due to the complexity of the implementation and the difficult-to-test nature of lock-free code in general,
462463there may still be bugs. If anyone is seeing buggy behaviour, I'd like to hear about it! (Especially if
You can’t perform that action at this time.
0 commit comments