Skip to content

Commit

Permalink
fix windows CI appempt 17 of ~1000
Browse files Browse the repository at this point in the history
  • Loading branch information
CtrlSpice committed Feb 16, 2025
1 parent 88b46ad commit 22ad8f2
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,20 @@ jobs:
# Download and setup DuckDB for Windows
- name: Setup DuckDB (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
curl -L -o duckdb.zip https://github.com/duckdb/duckdb/releases/download/v0.9.2/libduckdb-windows-amd64.zip
unzip duckdb.zip
# Copy DuckDB files to MinGW directories
copy duckdb.dll "C:\msys64\mingw64\bin\"
# Create import library for MinGW
echo "LIBRARY duckdb.dll" > duckdb.def
echo "EXPORTS" >> duckdb.def
"C:\msys64\mingw64\bin\gendef.exe" "C:\msys64\mingw64\bin\duckdb.dll" >> duckdb.def
"C:\msys64\mingw64\bin\dlltool.exe" -d duckdb.def -l "C:\msys64\mingw64\lib\libduckdb.a"
echo LIBRARY duckdb.dll > duckdb.def
echo EXPORTS >> duckdb.def
C:\msys64\mingw64\bin\gendef.exe C:\msys64\mingw64\bin\duckdb.dll >> duckdb.def
C:\msys64\mingw64\bin\dlltool.exe -d duckdb.def -l C:\msys64\mingw64\lib\libduckdb.a
copy duckdb.h "C:\msys64\mingw64\include\"
# Set environment variables for CGO
echo "CGO_ENABLED=1" >> $env:GITHUB_ENV
echo "CGO_LDFLAGS=-L C:/msys64/mingw64/lib -lduckdb" >> $env:GITHUB_ENV
echo "CGO_CFLAGS=-I C:/msys64/mingw64/include" >> $env:GITHUB_ENV
# Verify installations
set CGO_ENABLED=1
set CGO_LDFLAGS=-L C:/msys64/mingw64/lib -lduckdb
set CGO_CFLAGS=-I C:/msys64/mingw64/include
gcc --version
dir "C:\msys64\mingw64\bin\duckdb.dll"
dir "C:\msys64\mingw64\lib\libduckdb.a"
dir "C:\msys64\mingw64\include\duckdb.h"
# Build step
- name: Build
Expand All @@ -63,6 +57,8 @@ jobs:
go build -v -o ../otel-desktop-viewer
env:
CGO_ENABLED: 1
CGO_LDFLAGS: -L C:/msys64/mingw64/lib -lduckdb
CGO_CFLAGS: -I C:/msys64/mingw64/include

- name: Exporter Go Tests
run: cd desktopexporter; go test ./...
Expand Down

0 comments on commit 22ad8f2

Please sign in to comment.