-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (44 loc) · 1.11 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: build
on:
push:
branches:
- main
pull_request:
env:
LD_LIBRARY_PATH: /home/runner/work/ksot/ksot/nb-server/lib
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
GO_VERSION: 1.21
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: bulid libyang
run: |
cd nb-server/libyang
mkdir build; cd build
echo "/home/runner/work/ksot/ksot/nb-server/bin" >> $GITHUB_PATH
cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/runner/work/ksot/ksot/nb-server ..
make
make install
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Test nb-server
run: |
cd nb-server
go test ./...
- name: Test github-server
run: |
cd github-server
go test ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --snapshot --clean