2022-01-10 18:43:13 +01:00
|
|
|
name: Test Build On Platforms
|
2022-02-01 11:53:24 +01:00
|
|
|
on: [pull_request]
|
2022-01-10 18:43:13 +01:00
|
|
|
jobs:
|
|
|
|
test_build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ windows, linux, darwin ]
|
|
|
|
go-version: [1.17.x]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Cache Go modules
|
2022-01-17 14:01:58 +01:00
|
|
|
uses: actions/cache@v2
|
2022-01-10 18:43:13 +01:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
2022-01-17 14:01:58 +01:00
|
|
|
key: ${{ runner.os }}-go-test-${{ matrix.os }}-${{ hashFiles('**/go.sum') }}
|
2022-01-10 18:43:13 +01:00
|
|
|
restore-keys: |
|
2022-01-17 15:10:18 +01:00
|
|
|
${{ runner.os }}-go-test-${{ matrix.os }}
|
2022-01-10 18:43:13 +01:00
|
|
|
|
|
|
|
- name: Install modules
|
2022-01-17 14:01:58 +01:00
|
|
|
run: GOOS=${{ matrix.os }} go mod tidy
|
2022-01-10 18:43:13 +01:00
|
|
|
|
|
|
|
- name: run build client
|
|
|
|
run: GOOS=${{ matrix.os }} go build .
|
|
|
|
working-directory: client
|
|
|
|
|
|
|
|
- name: run build management
|
|
|
|
run: GOOS=${{ matrix.os }} go build .
|
|
|
|
working-directory: management
|
|
|
|
|
|
|
|
- name: run build signal
|
|
|
|
run: GOOS=${{ matrix.os }} go build .
|
2022-02-01 11:53:24 +01:00
|
|
|
working-directory: signal
|