Skip to content

Commit 6cad070

Browse files
committed
add ci build
1 parent 477b638 commit 6cad070

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build & Release CPP-Unix-Bindings
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "**" ]
8+
release:
9+
types: [ created ]
10+
11+
jobs:
12+
build:
13+
name: Build shared library
14+
runs-on: ubuntu-latest
15+
env:
16+
CC: clang
17+
CXX: clang++
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v3
22+
23+
- name: Install build dependencies
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y build-essential cmake clang make
27+
28+
- name: Configure CMake
29+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
30+
31+
- name: Compile
32+
run: cmake --build build -j $(nproc)
33+
34+
- name: Upload library artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: libCPP-Unix-Bindings
38+
path: build/libCPP-Unix-Bindings.so
39+
retention-days: 14
40+
41+
- name: Attach library to release
42+
if: github.event_name == 'release'
43+
uses: softprops/action-gh-release@v1
44+
with:
45+
files: build/libCPP-Unix-Bindings.so

0 commit comments

Comments
 (0)