-
Notifications
You must be signed in to change notification settings - Fork 23
72 lines (61 loc) · 1.92 KB
/
Copy pathlint.yml
File metadata and controls
72 lines (61 loc) · 1.92 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Go Lint and Vet
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
go_vet:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04 ]
wolfssl_configure: [
'--enable-all --enable-opensslall --enable-opensslextra',
]
name: ${{ matrix.os }} go vet
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool
- name: Cache wolfSSL build
id: cache-wolfssl
uses: actions/cache@v4
with:
path: /tmp/wolfssl-install
key: wolfssl-${{ runner.os }}-${{ hashFiles('.github/workflows/lint.yml') }}
- name: Build native wolfSSL
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/wolfSSL/wolfssl.git /tmp/wolfssl
cd /tmp/wolfssl
./autogen.sh
./configure --prefix=/tmp/wolfssl-install ${{ matrix.wolfssl_configure }}
make -j$(nproc)
make install
- name: Install wolfSSL system-wide
run: |
sudo cp -r /tmp/wolfssl-install/lib/* /usr/local/lib/
sudo cp -r /tmp/wolfssl-install/include/* /usr/local/include/
sudo ldconfig
- name: Install Go dependencies
run: |
go get golang.org/x/term
go mod tidy
- name: Run go vet
run: go vet .
- name: Check build
run: go build .