Skip to content

feat(judge): 以 Claim 审查指纹结果(合约下沉 utils/jev),并恢复 Go 1.17 支持 #73

feat(judge): 以 Claim 审查指纹结果(合约下沉 utils/jev),并恢复 Go 1.17 支持

feat(judge): 以 Claim 审查指纹结果(合约下沉 utils/jev),并恢复 Go 1.17 支持 #73

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
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: 'stable'
cache: true
# go.mod declares go 1.17: vet's stdversion check flags any newer
# standard library API, and tidy must not raise the go line.
- name: Tidy
run: |
go mod tidy -go=1.17 -compat=1.17
git diff --exit-code go.mod go.sum
- name: Vet
run: go vet ./...
- name: Build
run: go build ./...
- name: Test
run: go test -short -timeout 300s -race -count=1 ./...
re2:
name: re2 module
runs-on: ubuntu-latest
defaults:
run:
working-directory: re2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.x'
cache: true
- name: Vet
run: go vet -tags "re2_cgo re2_static" ./...
- name: Test
run: go test -tags "re2_cgo re2_static" -count=1 ./...
go117:
name: Go 1.17 module build and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go 1.17
uses: actions/setup-go@v5
with:
go-version: '1.17.x'
- name: Build
env:
GOTOOLCHAIN: local
run: go build ./...
- name: Test
env:
GOTOOLCHAIN: local
run: go test -short -timeout 300s -count=1 ./...
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