CI: build on all platform (#343)

This commit is contained in:
Loyalsoldier
2021-05-26 13:29:48 +08:00
committed by GitHub
parent b9a0f98d69
commit 959fe9ef9f
2 changed files with 54 additions and 18 deletions
+16 -18
View File
@@ -2,16 +2,22 @@ on:
push:
branches:
- master
paths-ignore:
- "**.md"
- "docs/**"
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/nightly-build.yml"
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
paths-ignore:
- "**.md"
- "docs/**"
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/nightly-build.yml"
name: nightly-build
jobs:
build:
@@ -19,8 +25,7 @@ jobs:
fail-fast: false
matrix:
go-version: ["1.16"]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
@@ -30,14 +35,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make test
- name: Build
run: make
- name: Upload Binary
uses: actions/upload-artifact@v2
with:
name: build-${{ matrix.platform }}
path: ./build/
run: |
make geosite.dat geoip.dat
make release -j$(nproc)
+38
View File
@@ -0,0 +1,38 @@
name: Test
on:
push:
branches:
- master
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/test.yml"
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/test.yml"
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: ["1.16"]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make test