Compare commits

..

3 Commits

Author SHA1 Message Date
Jose Luis Montañes Ojados
81d73e9b08 ci: disable go cache to prevent hangs on self-hosted runner
All checks were successful
Build Linux / build-linux (push) Successful in 57s
Build Windows / build-windows (push) Successful in 2m19s
2026-01-17 02:40:11 +01:00
Jose Luis Montañes Ojados
36111ff781 fix: linux arm64 build error (Dup2 is not available, use unix.Dup2) 2026-01-17 02:38:50 +01:00
Jose Luis Montañes Ojados
3a1db4e80c ci: bundle required DLLs in Windows artifact 2026-01-17 02:38:03 +01:00
3 changed files with 13 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
- name: Install Dependencies
run: |

View File

@@ -14,7 +14,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21' # Adjust to your version
go-version: '1.21'
cache: false
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
@@ -34,9 +35,14 @@ jobs:
# Ensure Go can find the C libraries via pkg-config
export CGO_ENABLED=1
go build -o dist/tui_windows.exe ./cmd/tui
# Copy necessary DLLs for portability
cp /mingw64/bin/libogg-0.dll dist/
cp /mingw64/bin/libopus-0.dll dist/
cp /mingw64/bin/libopusfile-0.dll dist/
cp /mingw64/bin/libportaudio-2.dll dist/ || true
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: tui-windows-binary
path: dist/tui_windows.exe
path: dist/

View File

@@ -4,7 +4,8 @@ package main
import (
"os"
"syscall"
"golang.org/x/sys/unix"
)
func redirectStderr(f *os.File) {
@@ -12,12 +13,12 @@ func redirectStderr(f *os.File) {
// Silence altogether if no debug file
null, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
if err == nil {
syscall.Dup2(int(null.Fd()), int(os.Stderr.Fd()))
_ = unix.Dup2(int(null.Fd()), int(os.Stderr.Fd()))
}
return
}
// Redirect fd 2 (stderr) to our debug file
// This captures C-level library noise (ALSA, PortAudio) into the log
syscall.Dup2(int(f.Fd()), int(os.Stderr.Fd()))
_ = unix.Dup2(int(f.Fd()), int(os.Stderr.Fd()))
}