mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-20.04
|
|
- ubuntu-22.04
|
|
- macos-11
|
|
- macos-12
|
|
- macos-13
|
|
go:
|
|
- '1.18'
|
|
- '1.19'
|
|
- '1.20'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- name: Lint
|
|
run: |
|
|
go install golang.org/x/lint/golint@latest
|
|
golint -set_exit_status code/...
|
|
go install github.com/gordonklaus/ineffassign@latest
|
|
ineffassign ./...
|
|
|
|
- name: Build Server
|
|
run: go build -v code/server/main.go
|
|
|
|
- name: Build Client
|
|
run: |
|
|
go run contrib/bindata/main.go -pkg shell -o code/client/rule/shell/assets.go -prefix html/shell html/shell/...
|
|
go run contrib/bindata/main.go -pkg vnc -o code/client/rule/vnc/assets.go -prefix html/vnc html/vnc/...
|
|
go run contrib/bindata/main.go -pkg code -o code/client/rule/code/assets.go -prefix html/code html/code/...
|
|
go run contrib/bindata/main.go -pkg dashboard -o code/client/dashboard/assets.go -prefix html/dashboard html/dashboard/...
|
|
go build -v code/client/main.go
|