fix windows CI appempt 27 of ~1000 #439
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: Install MinGW-w64 | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-mingw-w64-x86-64 | |
- name: Download DuckDB | |
run: | | |
# Get both the Windows library and the header files | |
curl -L -o libduckdb.zip https://github.com/duckdb/duckdb/releases/download/v0.10.0/libduckdb-windows-amd64.zip | |
curl -L -o duckdb-headers.zip https://github.com/duckdb/duckdb/releases/download/v0.10.0/libduckdb-src.zip | |
# Extract Windows library | |
unzip libduckdb.zip -d duckdb | |
# Extract headers and maintain structure | |
unzip duckdb-headers.zip -d duckdb-src | |
mkdir -p duckdb/include | |
cp duckdb-src/duckdb.h duckdb/include/ | |
cp duckdb-src/duckdb.hpp duckdb/include/ | |
ls -la duckdb | |
ls -la duckdb/include | |
- name: Build | |
run: | | |
cd desktopcollector | |
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc \ | |
CGO_LDFLAGS="-L$(pwd)/../duckdb -lduckdb_static" \ | |
CGO_CFLAGS="-I$(pwd)/../duckdb/include" \ | |
go build -v -tags=duckdb_use_lib -o ../otel-desktop-viewer.exe | |
- name: Exporter Go Tests | |
run: | | |
cd desktopexporter | |
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc \ | |
CGO_LDFLAGS="-L$(pwd)/../duckdb -lduckdb_static" \ | |
CGO_CFLAGS="-I$(pwd)/../duckdb/include" \ | |
go test ./... | |
# - name: Integration | |
# run: ./.github/workflows/integration.sh | |
# shell: bash |