Add exclude_graphdriver_btrfs tag to avoid btrfs CGO dependency

This commit is contained in:
christophe-duc 2026-01-07 16:01:39 -04:00
parent d98a1010a2
commit 5a50175cdc
3 changed files with 7 additions and 4 deletions

View file

@ -63,7 +63,7 @@ jobs:
podman info
- name: Run integration tests
run: |
go test -tags=integration,containers_image_openpgp -v ./pkg/commands/...
go test -tags=integration,containers_image_openpgp,exclude_graphdriver_btrfs -v ./pkg/commands/...
build:
runs-on: ubuntu-latest
env:
@ -85,10 +85,10 @@ jobs:
${{runner.os}}-go-
- name: Build linux binary
run: |
GOOS=linux go build -tags=containers_image_openpgp
GOOS=linux go build -tags=containers_image_openpgp,exclude_graphdriver_btrfs
- name: Build darwin binary
run: |
GOOS=darwin go build -tags=containers_image_openpgp
GOOS=darwin go build -tags=containers_image_openpgp,exclude_graphdriver_btrfs
check-codebase:
runs-on: ubuntu-latest
env:

View file

@ -9,6 +9,7 @@ builds:
- id: binary
tags:
- containers_image_openpgp
- exclude_graphdriver_btrfs
goos:
- darwin
- linux
@ -20,6 +21,7 @@ builds:
- id: snap
tags:
- containers_image_openpgp
- exclude_graphdriver_btrfs
goos:
- linux
goarch:

View file

@ -6,7 +6,8 @@ echo "" > coverage.txt
export GOFLAGS=-mod=vendor
# Use pure Go PGP implementation to avoid CGO dependency on gpgme
BUILD_TAGS="-tags=containers_image_openpgp"
# Exclude btrfs driver to avoid CGO dependency on libbtrfs
BUILD_TAGS="-tags=containers_image_openpgp,exclude_graphdriver_btrfs"
use_go_test=false
if command -v gotest; then