From c83158d965465735853d424a8e78abeeef36ca5e Mon Sep 17 00:00:00 2001 From: Magnus Kokk Date: Sun, 24 Nov 2024 17:19:31 +0200 Subject: [PATCH] Disable rtmidi driver in CI --- .github/workflows/go.yml | 2 ++ .github/workflows/release.yml | 2 ++ cmd/balafon/main.go | 1 - driver_cgo.go | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 driver_cgo.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 35643d7..41394aa 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,4 +20,6 @@ jobs: go-version: 1.22 - name: Run test + env: + CGO_ENABLED: 0 run: go test ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7797105..1ec0c82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: wangyoucao577/go-release-action@v1 + env: + CGO_ENABLED: 1 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} diff --git a/cmd/balafon/main.go b/cmd/balafon/main.go index f5762e1..24890bc 100644 --- a/cmd/balafon/main.go +++ b/cmd/balafon/main.go @@ -13,7 +13,6 @@ import ( "github.com/spf13/cobra" "gitlab.com/gomidi/midi/v2" "gitlab.com/gomidi/midi/v2/drivers" - _ "gitlab.com/gomidi/midi/v2/drivers/rtmididrv" "golang.org/x/term" ) diff --git a/driver_cgo.go b/driver_cgo.go new file mode 100644 index 0000000..9afd351 --- /dev/null +++ b/driver_cgo.go @@ -0,0 +1,7 @@ +//go:build cgo + +package balafon + +import ( + _ "gitlab.com/gomidi/midi/v2/drivers/rtmididrv" +)