Skip to content

chore: bump utils/parsers to pick up NeutronResult/ProtonFinding types #57

chore: bump utils/parsers to pick up NeutronResult/ProtonFinding types

chore: bump utils/parsers to pick up NeutronResult/ProtonFinding types #57

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
env:
COMPAT_PKGS: >-
github.com/chainreactors/fingers
github.com/chainreactors/fingers/alias
github.com/chainreactors/fingers/common
github.com/chainreactors/fingers/ehole
github.com/chainreactors/fingers/favicon
github.com/chainreactors/fingers/fingerprinthub
github.com/chainreactors/fingers/fingers
github.com/chainreactors/fingers/goby
github.com/chainreactors/fingers/nmap
github.com/chainreactors/fingers/resources
github.com/chainreactors/fingers/wappalyzer
github.com/chainreactors/fingers/xray
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
cache: true
- name: Vet
run: go vet ./...
- name: Build
run: go build ./...
- name: Test
run: go test -short -timeout 300s -race -count=1 ./...
go117-build:
name: Go 1.17 compatibility build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go for vendoring
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
cache: true
- name: Prepare vendor tree
run: go mod vendor
- name: Setup Go 1.17
uses: actions/setup-go@v5
with:
go-version: '1.17.x'
- name: Build with Go 1.17
env:
GO111MODULE: off
CGO_ENABLED: '0'
run: |
export GOPATH="${RUNNER_TEMP}/gopath"
src="${GOPATH}/src/github.com/chainreactors/fingers"
mkdir -p "$(dirname "${src}")"
cp -a . "${src}"
cd "${src}"
go build -tags="noembed goregexp" ${COMPAT_PKGS}
go111-build:
name: Go 1.11 compatibility build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go for vendoring
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
cache: true
- name: Prepare Go 1.11 vendor tree
shell: bash
run: |
set -euo pipefail
export GO111MODULE=on
export GOPATH="${RUNNER_TEMP}/gopath"
src="${GOPATH}/src/github.com/chainreactors/fingers"
mkdir -p "$(dirname "${src}")"
rsync -a --delete \
--exclude '.git' \
--exclude '.claude' \
--exclude 'dist' \
--exclude 'vendor' \
--exclude 'cmd' \
. "${src}/"
cd "${src}"
go mod vendor
# Go 1.11 does not understand //go:build (Go 1.17+).
# For files that have //go:build but no // +build, convert the
# constraint to the old format so Go 1.11 can parse it.
go run scripts/add_plusbuild.go vendor/
- name: Setup Go 1.11
uses: actions/setup-go@v5
with:
go-version: '1.11.13'
- name: Build with Go 1.11
env:
GO111MODULE: off
CGO_ENABLED: '0'
run: |
export GOPATH="${RUNNER_TEMP}/gopath"
cd "${GOPATH}/src/github.com/chainreactors/fingers"
# Root pkg and nmap excluded (nmap uses strings.ReplaceAll,
# Go 1.12+; root imports nmap). cmd excluded.
go build -tags="noembed goregexp" \
github.com/chainreactors/fingers/alias \
github.com/chainreactors/fingers/common \
github.com/chainreactors/fingers/ehole \
github.com/chainreactors/fingers/favicon \
github.com/chainreactors/fingers/fingerprinthub \
github.com/chainreactors/fingers/fingers \
github.com/chainreactors/fingers/goby \
github.com/chainreactors/fingers/resources \
github.com/chainreactors/fingers/wappalyzer \
github.com/chainreactors/fingers/xray