fix windows CI appempt 16 of ~1000 #428
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: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
os: [windows-latest] | |
include: | |
- os: windows-latest | |
env: | |
NO_WINDOWS_SERVICE: 0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23' | |
- name: Set up MinGW | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
update: true | |
install: mingw-w64-x86_64-gcc | |
# Download and setup DuckDB for Windows | |
- name: Setup DuckDB (Windows) | |
if: matrix.os == 'windows-latest' | |
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" | |
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 | |
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 | |
run: | | |
cd desktopcollector | |
go build -v -o ../otel-desktop-viewer | |
env: | |
CGO_ENABLED: 1 | |
- name: Exporter Go Tests | |
run: cd desktopexporter; go test ./... | |
# - name: Integration | |
# run: ./.github/workflows/integration.sh | |
# shell: bash |