forked from zelang-dev/c-coroutine
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (79 loc) · 2.05 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
name: windows & linux
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
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@v3
- 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 examples
run: |
cd build
./go_channel
./go_sleep
./go_select
./go_wait_group
./go_panic
./co_call_uv
./co_cpp_future_wait
./test_delay 2 5
./chan_3
./primes
./test_map
./test_reflect
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@v3
- name: Configure & build
run: |
mkdir build
cd build
cmake .. -D BUILD_TESTING=ON -A ${{ matrix.arch }}
cmake --build . --config Debug
- name: Run test examples
shell: cmd
run: |
cd build\Debug
.\test_delay.exe 2 5
.\chan_3.exe
.\primes.exe
.\go_channel.exe
.\go_select.exe
.\go_sleep.exe
.\go_wait_group.exe
.\go_panic.exe
.\co_call_uv.exe
.\co_cpp_future_wait.exe
.\test_map
.\test_reflect