File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,20 @@ jobs:
2121 go-version-file : ./go.mod
2222 cache-dependency-path : ./go.sum
2323
24- - name : Install libzmq dependencies (kvcache/kvevents)
24+ - name : Install libzmq and Python dependencies (kvcache/kvevents)
2525 run : |
2626 sudo apt-get update
27+ sudo apt-get install -y pkg-config python3-dev
2728 make download-zmq
2829
30+ - name : Configure CGO for Python
31+ run : |
32+ PYTHON_INCLUDE=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))")
33+ echo "CPATH=${PYTHON_INCLUDE}:${CPATH}" >> $GITHUB_ENV
34+ echo "CGO_ENABLED=1" >> $GITHUB_ENV
35+ echo "CGO_CFLAGS=$(python3-config --cflags --embed)" >> $GITHUB_ENV
36+ echo "CGO_LDFLAGS=$(python3-config --ldflags --embed)" >> $GITHUB_ENV
37+
2938 - name : Set PKG_CONFIG_PATH
3039 run : echo "PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> $GITHUB_ENV
3140
3443 with :
3544 version : ' v2.4.0'
3645 args : " --config=./.golangci.yml"
46+ env :
47+ CGO_ENABLED : ${{ env.CGO_ENABLED }}
48+ CGO_CFLAGS : ${{ env.CGO_CFLAGS }}
49+ CGO_LDFLAGS : ${{ env.CGO_LDFLAGS }}
50+ CPATH : ${{ env.CPATH }}
51+ PKG_CONFIG_PATH : ${{ env.PKG_CONFIG_PATH }}
3752
3853 - name : Run go test
3954 shell : bash
You can’t perform that action at this time.
0 commit comments