Skip to content

Commit e066882

Browse files
committed
Make CI workflow.
1 parent cfd8224 commit e066882

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
posix:
10+
name: ${{ matrix.name }}
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- name: Ubuntu 22.04 GCC
18+
os: ubuntu-22.04
19+
cc: gcc
20+
cxx: g++
21+
packages: build-essential
22+
cc_flags: -march=native
23+
24+
- name: Ubuntu 22.04 Clang
25+
os: ubuntu-22.04
26+
cc: clang
27+
cxx: clang++
28+
packages: clang
29+
cc_flags: -march=native
30+
31+
- name: Ubuntu 24.04 GCC
32+
os: ubuntu-24.04
33+
cc: gcc
34+
cxx: g++
35+
packages: build-essential
36+
cc_flags: -march=native
37+
38+
- name: Ubuntu 24.04 Clang
39+
os: ubuntu-24.04
40+
cc: clang
41+
cxx: clang++
42+
packages: clang
43+
cc_flags: -march=native
44+
45+
env:
46+
CC: ${{ matrix.cc }}
47+
CXX: ${{ matrix.cxx }}
48+
CC_FLAGS: ${{ matrix.cc_flags }}
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
54+
- name: Install dependencies
55+
run: |
56+
sudo apt-get update
57+
sudo apt-get install -y cmake expect ${{ matrix.packages }}
58+
59+
- name: Show tool versions
60+
run: |
61+
cmake --version
62+
"${CC}" --version
63+
64+
- name: Configure
65+
run: |
66+
cmake \
67+
-DCMAKE_C_FLAGS="-Werror ${CC_FLAGS}" \
68+
-S platforms/posix \
69+
-B platforms/posix/build
70+
71+
- name: Build
72+
run: cmake --build platforms/posix/build
73+
74+
- name: Test
75+
working-directory: platforms/posix/build
76+
run: ctest -V

0 commit comments

Comments
 (0)