forked from XiaochenCui/libtask
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.42 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
name: windows & linux
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.target }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- target: amd64
flags: -O3 -fomit-frame-pointer
- target: x86
flags: -m32 -O3 -fomit-frame-pointer
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: cmake build & test example
run: |
mkdir build
cd build
cmake ..
cmake --build .
cd bin
./chan_3
./primes
./testdelay 2
build-windows:
name: Windows (${{ matrix.arch }})
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
arch: [amd64, x86]
steps:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: actions/checkout@v3
- name: cmake build & test examples
run: |
mkdir build
cd build
cmake .. -D CMAKE_GENERATOR_PLATFORM=Win32
cmake --build .
cd bin/Debug
.\chan_1.exe
.\chan_2.exe
.\chan_3.exe
.\primes.exe
.\testdelay.exe 2