mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-24 08:54:30 +00:00
build: add re2_cgo to CI for native libre2 performance
Linux CI installs libre2-dev and uses -tags re2_cgo. Windows CI uses msys2/setup-msys2 with pacboy re2 for CGO mode. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
1 parent
7ce7b850d4
commit
61b18d1503
1 file changed
+41
-15
+41
-15
@@ -12,16 +12,9 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
basic:
|
||||
name: basic checks (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
|
||||
basic-linux:
|
||||
name: basic checks (ubuntu)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
@@ -34,18 +27,51 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
|
||||
- name: Install libre2-dev
|
||||
run: sudo apt-get update -qq && sudo apt-get install -y libre2-dev g++
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Test
|
||||
run: go test -count=1 -timeout 300s ./...
|
||||
run: go test -tags re2_cgo -count=1 -timeout 300s ./...
|
||||
|
||||
- name: Test (race detector)
|
||||
if: runner.os == 'Linux'
|
||||
run: go test -race -count=1 -timeout 300s ./...
|
||||
run: go test -tags re2_cgo -race -count=1 -timeout 300s ./...
|
||||
|
||||
- name: Vet
|
||||
run: go vet ./...
|
||||
run: go vet -tags re2_cgo ./...
|
||||
|
||||
- name: Build packages
|
||||
run: go build ./...
|
||||
run: go build -tags re2_cgo ./...
|
||||
|
||||
basic-windows:
|
||||
name: basic checks (windows)
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
pacboy: gcc:p re2:p pkg-config:p go:p
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Test
|
||||
run: go test -tags re2_cgo -count=1 -timeout 300s ./...
|
||||
|
||||
- name: Vet
|
||||
run: go vet -tags re2_cgo ./...
|
||||
|
||||
- name: Build packages
|
||||
run: go build -tags re2_cgo ./...
|
||||
Reference in new issue
Block a user