mirror of
https://github.com/oneclickvirt/backtrace.git
synced 2025-02-23 09:25:40 +08:00
update
This commit is contained in:
parent
d51a928592
commit
25c6b2ce13
20
.github/workflows/go.yaml
vendored
20
.github/workflows/go.yaml
vendored
@ -1,20 +0,0 @@
|
|||||||
name: Go
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: 'stable'
|
|
||||||
- name: Build
|
|
||||||
run: go build -v ./...
|
|
||||||
- name: Test
|
|
||||||
run: go test -v ./...
|
|
@ -1,30 +1,45 @@
|
|||||||
name: Release
|
name: Build and Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
releases-matrix:
|
build:
|
||||||
|
name: Build and Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: 'stable'
|
||||||
|
|
||||||
|
- name: Build and Test on Default Platform
|
||||||
|
run: |
|
||||||
|
go build -v ./...
|
||||||
|
go test -v ./...
|
||||||
|
|
||||||
|
release-binary:
|
||||||
name: Release Go Binary
|
name: Release Go Binary
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Include amd64 on all platforms.
|
goos: [windows, freebsd, openbsd, linux, darwin]
|
||||||
goos: [windows, freebsd, openbsd, linux, dragonfly, darwin]
|
|
||||||
goarch: [amd64, 386]
|
goarch: [amd64, 386]
|
||||||
exclude:
|
exclude:
|
||||||
# Exclude i386 on darwin and dragonfly.
|
|
||||||
- goarch: 386
|
|
||||||
goos: dragonfly
|
|
||||||
- goarch: 386
|
- goarch: 386
|
||||||
goos: darwin
|
goos: darwin
|
||||||
include:
|
include:
|
||||||
# BEIGIN MacOS ARM64
|
|
||||||
- goos: darwin
|
- goos: darwin
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
# END macOS ARM64
|
|
||||||
# BEGIN Linux ARM 5 6 7
|
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: arm
|
goarch: arm
|
||||||
goarm: 7
|
goarm: 7
|
||||||
@ -34,25 +49,17 @@ jobs:
|
|||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: arm
|
goarch: arm
|
||||||
goarm: 5
|
goarm: 5
|
||||||
# END Linux ARM 5 6 7
|
|
||||||
# BEGIN Android ARM 8
|
|
||||||
- goos: android
|
- goos: android
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
# END Android ARM 8
|
|
||||||
# Windows ARM
|
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm
|
goarch: arm
|
||||||
goarm: 7
|
goarm: 7
|
||||||
# BEGIN Other architectures
|
|
||||||
# BEGIN riscv64 & ARM64
|
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: riscv64
|
goarch: riscv64
|
||||||
# END riscv64 & ARM64
|
|
||||||
# BEGIN MIPS
|
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: mips64
|
goarch: mips64
|
||||||
- goos: linux
|
- goos: linux
|
||||||
@ -67,26 +74,15 @@ jobs:
|
|||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: mips
|
goarch: mips
|
||||||
gomips: softfloat
|
gomips: softfloat
|
||||||
# END MIPS
|
|
||||||
# BEGIN PPC
|
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: ppc64
|
goarch: ppc64
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: ppc64le
|
goarch: ppc64le
|
||||||
# END PPC
|
|
||||||
# BEGIN FreeBSD ARM
|
|
||||||
- goos: freebsd
|
- goos: freebsd
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
- goos: freebsd
|
- goos: freebsd
|
||||||
goarch: arm
|
goarch: arm
|
||||||
goarm: 7
|
goarm: 7
|
||||||
# END FreeBSD ARM
|
|
||||||
# BEGIN S390X
|
|
||||||
- goos: linux
|
|
||||||
goarch: s390x
|
|
||||||
# END S390X
|
|
||||||
# END Other architectures
|
|
||||||
# BEGIN OPENBSD ARM
|
|
||||||
- goos: openbsd
|
- goos: openbsd
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
- goos: openbsd
|
- goos: openbsd
|
||||||
@ -99,11 +95,8 @@ jobs:
|
|||||||
GOMIPS: ${{ matrix.gomips }}
|
GOMIPS: ${{ matrix.gomips }}
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout code
|
||||||
- uses: wangyoucao577/go-release-action@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
- name: Release Go Binary
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
run: |
|
||||||
goos: ${{ matrix.goos }}
|
go build -o backtrace-${{ matrix.goos }}-${{ matrix.goarch }} -v ./...
|
||||||
goarch: ${{ matrix.goarch }}
|
|
||||||
asset_name: backtrace-${{ matrix.goos }}-${{ matrix.goarch }}
|
|
||||||
ldflags: -s -w
|
|
Loading…
Reference in New Issue
Block a user