mirror of
https://github.com/la5nta/pat
synced 2026-08-13 17:46:54 -04:00
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: build
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [ review_requested ]
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
go-version: [ '1.x' ]
|
|
include:
|
|
- os: ubuntu-latest
|
|
go-version: '1.26'
|
|
gotoolchain: local
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
GOTOOLCHAIN: ${{ matrix.gotoolchain }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Setup Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
check-latest: true
|
|
cache: true
|
|
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
name: Cache libax25
|
|
id: cache-libax25
|
|
uses: actions/cache@v5
|
|
env:
|
|
cache-name: cache-libax25
|
|
with:
|
|
path: .build
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.go-version }}-${{ hashFiles('make.bash') }}
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.go-version }}-
|
|
- if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-libax25.outputs.cache-hit != 'true' }}
|
|
name: Setup libax25
|
|
run: ./make.bash libax25
|
|
- name: Display Go version
|
|
run: go version && go env
|
|
- name: Vet
|
|
run: go vet ./...
|
|
- name: Govulncheck
|
|
if: ${{ matrix.go-version == '1.x' && matrix.os == 'ubuntu-latest' }}
|
|
run: go tool govulncheck ./...
|
|
- name: Build
|
|
run: ./make.bash
|