Skip to content

Commit 36df9d5

Browse files
committed
add ci build
1 parent 477b638 commit 36df9d5

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
20+
- name: Install build dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y build-essential cmake clang make
24+
25+
- name: Configure CMake
26+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
27+
28+
- name: Compile
29+
run: cmake --build build -j $(nproc)
30+
31+
- name: Upload library artifact
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: libCPP-Unix-Bindings
35+
path: build/libCPP-Unix-Bindings.so
36+
retention-days: 14
37+
38+
- name: Attach library to release
39+
if: github.event_name == 'release'
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: build/libCPP-Unix-Bindings.so

0 commit comments

Comments
 (0)