Skip to content

Commit e08b5b2

Browse files
authored
Create c-cpp.yml
1 parent 4d6825a commit e08b5b2

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/c-cpp.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: compilation and test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build-ubuntu-clang:
11+
name: ubuntu-clang
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Create build directory
18+
run: mkdir build
19+
20+
- name: Configure CMake
21+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
22+
23+
- name: Build
24+
run: cmake --build ${{github.workspace}}/build
25+
26+
- name: Test
27+
working-directory: ${{github.workspace}}/build
28+
run: ./test
29+
30+
build-macos:
31+
name: macos
32+
runs-on: macos-latest
33+
34+
steps:
35+
- uses: actions/checkout@v3
36+
37+
- name: Create build directory
38+
run: mkdir build
39+
40+
- name: Configure CMake
41+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
42+
43+
- name: Build
44+
run: cmake --build ${{github.workspace}}/build
45+
46+
- name: Test
47+
working-directory: ${{github.workspace}}/build
48+
run: ./test
49+
50+
build-windows:
51+
name: windows
52+
runs-on: windows-latest
53+
54+
steps:
55+
- uses: actions/checkout@v3
56+
57+
- name: Create build directory
58+
run: mkdir build
59+
60+
- name: Configure CMake
61+
working-directory: ${{github.workspace}}
62+
run: cmake -S . -B build
63+
64+
- name: Build
65+
working-directory: ${{github.workspace}}
66+
run: cmake --build ${{github.workspace}}/build

0 commit comments

Comments
 (0)