2021-06-30 12:18:22 +00:00
|
|
|
name: Continuous integration
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-12-01 13:30:16 +00:00
|
|
|
- stable
|
2022-04-22 11:56:54 +00:00
|
|
|
- alpha
|
2021-06-30 12:18:22 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-12-01 13:30:16 +00:00
|
|
|
- stable
|
2022-04-22 11:56:54 +00:00
|
|
|
- alpha
|
2022-02-10 14:47:28 +00:00
|
|
|
env:
|
|
|
|
CGO_ENABLED: "1"
|
|
|
|
CGO_CXXFLAGS: "-std=c++17"
|
2021-06-30 12:18:22 +00:00
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-05-04 04:11:34 +00:00
|
|
|
os: [ ubuntu-20.04, macos-11, windows-2022 ] # list of os: https://github.com/actions/virtual-environments
|
2021-06-30 12:18:22 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
2022-03-18 04:27:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-06-30 12:18:22 +00:00
|
|
|
- run: git submodule update --init --recursive --force
|
2022-03-18 04:27:44 +00:00
|
|
|
- uses: actions/setup-go@v3
|
2021-06-30 12:18:22 +00:00
|
|
|
with:
|
2022-03-19 03:02:28 +00:00
|
|
|
go-version: 1.18.x
|
2022-04-11 01:54:34 +00:00
|
|
|
- uses: actions/cache@v3
|
2021-06-30 12:18:22 +00:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
|
2022-05-04 04:11:34 +00:00
|
|
|
|
|
|
|
- name: Install deps
|
|
|
|
if: matrix.os == 'ubuntu-20.04'
|
|
|
|
run: sudo apt update && sudo apt install build-essential
|
|
|
|
shell: bash
|
|
|
|
- name: Install deps
|
|
|
|
if: matrix.os == 'windows-2022'
|
|
|
|
run: choco upgrade mingw cmake -y --no-progress
|
|
|
|
|
2021-06-30 12:18:22 +00:00
|
|
|
- name: Lint
|
|
|
|
if: matrix.os == 'ubuntu-20.04'
|
2022-03-11 01:49:54 +00:00
|
|
|
uses: golangci/golangci-lint-action@v3
|
2021-06-30 12:18:22 +00:00
|
|
|
with:
|
2022-05-10 03:14:02 +00:00
|
|
|
version: v1.46
|
2022-05-04 04:11:34 +00:00
|
|
|
|
|
|
|
- name: Test win
|
|
|
|
if: matrix.os == 'windows-2022'
|
2022-02-10 14:47:28 +00:00
|
|
|
run: go test ./...
|
2022-05-04 04:11:34 +00:00
|
|
|
- name: Test
|
|
|
|
if: matrix.os != 'windows-2022'
|
|
|
|
run: go test -tags gofuzzbeta ./...
|