Skip to content

Commit

Permalink
CI: build on all platform (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier authored May 26, 2021
1 parent b9a0f98 commit 959fe9e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 18 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,30 @@ 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:
strategy:
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
Expand All @@ -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 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 959fe9e

Please sign in to comment.