Skip to content

Commit 4e8451a

Browse files
committed
test ci
1 parent 61e1cbc commit 4e8451a

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
9+
pull_request:
10+
branches:
11+
- main
12+
- dev
13+
14+
env:
15+
BUILD_TYPE: Release
16+
17+
jobs:
18+
build:
19+
runs-on: ${{ matrix.os }}
20+
21+
strategy:
22+
matrix:
23+
os: [ ubuntu-20.04, macos-latest, windows-latest ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up CMake
30+
uses: actions/setup-cmake@v1
31+
with:
32+
cmake-version: '3.20.0'
33+
34+
- name: Set up build environment
35+
run: |
36+
if [[ "${{ matrix.os }}" == "ubuntu-20.04" ]]; then
37+
sudo apt-get update && sudo apt-get install -y build-essential
38+
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
39+
brew install cmake
40+
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
41+
choco install cmake
42+
fi
43+
44+
- name: Configure CMake
45+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
46+
47+
- name: Build project
48+
run: cmake --build build --config ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)