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"
|
2022-11-20 03:41:20 +00:00
|
|
|
CGO_CXXFLAGS: "-g -O2 -std=c++17"
|
|
|
|
GO111MODULE: "on"
|
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-06-12 09:14:18 +00:00
|
|
|
- name: configure Pagefile
|
|
|
|
if: matrix.os == 'windows-2022'
|
2022-11-20 03:41:20 +00:00
|
|
|
uses: al-cheb/configure-pagefile-action@v1.3
|
2022-06-12 09:14:18 +00:00
|
|
|
with:
|
|
|
|
minimum-size: 8GB
|
2022-03-18 04:27:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-05-24 18:00:09 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0 # fetch git tags for "git describe"
|
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'
|
2022-10-19 02:31:10 +00:00
|
|
|
run: |
|
|
|
|
choco upgrade mingw -y --no-progress --version 11.2.0.07112021
|
|
|
|
choco install cmake -y --no-progress --version 3.23.1
|
2022-05-04 04:11:34 +00:00
|
|
|
|
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-10-21 06:31:03 +00:00
|
|
|
version: v1.50
|
2022-08-30 02:50:23 +00:00
|
|
|
args: --config=.golangci.yml --out-${NO_FUTURE}format colored-line-number
|
2022-05-24 18:00:09 +00:00
|
|
|
|
2022-05-04 04:11:34 +00:00
|
|
|
- name: Test win
|
|
|
|
if: matrix.os == 'windows-2022'
|
2022-11-20 03:41:20 +00:00
|
|
|
run: make test-no-fuzz
|