64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
# ------------------------------------------------------------
|
|
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
# ------------------------------------------------------------
|
|
|
|
name: components-contrib
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
tags:
|
|
- v*
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.target_os }}_${{ matrix.target_arch }} binaries
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
GOVER: 1.13.7
|
|
GOOS: ${{ matrix.target_os }}
|
|
GOARCH: ${{ matrix.target_arch }}
|
|
GOPROXY: https://proxy.golang.org
|
|
GOLANGCI_LINT_VER: v1.23.2
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
target_arch: [arm, amd64]
|
|
include:
|
|
- os: ubuntu-latest
|
|
target_os: linux
|
|
- os: windows-latest
|
|
target_os: windows
|
|
- os: macOS-latest
|
|
target_os: darwin
|
|
exclude:
|
|
- os: windows-latest
|
|
target_arch: arm
|
|
- os: macOS-latest
|
|
target_arch: arm
|
|
steps:
|
|
- name: Set up Go ${{ env.GOVER }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ env.GOVER }}
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VER }}
|
|
if: matrix.target_arch != 'arm'
|
|
run: |
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${{ env.GOROOT }}/bin" "${{ env.GOLANGCI_LINT_VER }}"
|
|
- name: Run make lint
|
|
if: matrix.target_arch != 'arm'
|
|
run: make lint
|
|
- name: Run make go.mod check-diff
|
|
if: matrix.target_arch != 'arm'
|
|
run: make go.mod check-diff
|
|
- name: Run make test
|
|
if: matrix.target_arch != 'arm'
|
|
run: make test |