Skip to content

Commit 6ef46d5

Browse files
committed
Add pkg-config setup for cross-platform builds; update workflows for Linux and Windows
1 parent a058281 commit 6ef46d5

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

.github/workflows/go_build_linux_386.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
export CC=i686-linux-gnu-gcc
4747
export CGO_CFLAGS="-I/usr/local/i686/include"
4848
export CGO_LDFLAGS="-L/usr/local/i686/lib -lyara -static"
49+
export PKG_CONFIG_PATH="/usr/local/i686/lib/pkgconfig"
4950
5051
go build -trimpath -tags yara_static -a -ldflags '-s -w -extldflags "-static"' -o fastfinder-386 .
5152
ls -l fastfinder-386

.github/workflows/go_build_linux_amd64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- name: Run Unit Tests
3232
run: |
3333
sudo ldconfig
34+
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
3435
# Test AMD64
3536
go test ./... -v
3637

.github/workflows/go_build_linux_arm64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
export CC=aarch64-linux-gnu-gcc
5050
export CGO_CFLAGS="-I/usr/local/aarch64/include"
5151
export CGO_LDFLAGS="-L/usr/local/aarch64/lib -lyara -static"
52+
export PKG_CONFIG_PATH="/usr/local/aarch64/lib/pkgconfig"
5253
5354
go build -trimpath -tags yara_static -a -ldflags '-s -w -extldflags "-static"' -o fastfinder-arm64 .
5455
ls -l fastfinder-arm64

.github/workflows/go_build_windows_386.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
make
2828
unzip
2929
wget
30+
pkg-config
3031
3132
- name: Install YARA v4.5.5 (i386)
3233
run: |

.github/workflows/go_build_windows_amd64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
make
2828
unzip
2929
wget
30+
pkg-config
3031
- name: Install YARA v4.5.5
3132
run: |
3233
wget -c https://github.com/VirusTotal/yara/archive/refs/tags/v4.5.5.zip -O /tmp/yara.zip

.github/workflows/go_build_windows_arm64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
make
2424
unzip
2525
wget
26+
pkg-config
2627
2728
- name: Install LLVM-MinGW (for ARM64)
2829
run: |

0 commit comments

Comments
 (0)