-
Notifications
You must be signed in to change notification settings - Fork 1.9k
48 lines (39 loc) · 2.1 KB
/
Copy pathci.yml
File metadata and controls
48 lines (39 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI
on:
push:
pull_request:
jobs:
native-linux-unittests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install native toolchain
run: |
sudo apt-get update
sudo apt-get install -y g++
- name: Build unit tests
working-directory: build
run: |
mkdir -p bin
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
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
- name: Run unit tests
working-directory: build
run: ./bin/unittests --disable-prompt --iterations 1
riscv64-linux-unittests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install RISC-V toolchain and QEMU
run: |
sudo apt-get update
sudo apt-get install -y g++-riscv64-linux-gnu qemu-user-static
- name: Build RISC-V unit tests
working-directory: build
run: |
mkdir -p bin-riscv
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
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
- name: Run RISC-V unit tests under QEMU
working-directory: build
run: qemu-riscv64-static -L /usr/riscv64-linux-gnu ./bin-riscv/unittests-riscv64 --disable-prompt --iterations 1