forked from mjansson/rpmalloc
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (81 loc) · 2.08 KB
/
ci.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Windows & Ubuntu & Apple macOS
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build-ubuntu:
name: Linux ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: amd64
flags: -m64
- target: x86
flags: -m32
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -q -y
sudo apt-get install -y gcc-multilib g++-multilib valgrind libc6-dbg libc6-dbg:i386
- name: Configure & build
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DCMAKE_C_FLAGS=${{ matrix.flags }} ..
cmake --build .
- name: Run test
run: |
cd build
./main_test
./storage_test
./atomicity_test
build-windows:
name: Windows (${{ matrix.arch }})
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
arch: [x64, Win32]
steps:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: actions/checkout@v4
- name: Configure & build
run: |
mkdir build
cd build
cmake .. -D BUILD_TESTING=ON -A ${{ matrix.arch }}
cmake --build . --config Debug
- name: Run test
shell: cmd
run: |
cd build\Debug
.\main_test.exe
.\storage_test.exe
.\atomicity_test.exe
build-macos:
name: macOS
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
brew install cmake
- name: Configure & build
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON ..
cmake --build .
- name: Run test examples
run: |
cd build
./main_test
./storage_test
./atomicity_test