fix windows CI appempt 9 of ~1000 #421
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] | |
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 | |
# Add these steps for Windows | |
- name: Set up MinGW | |
if: matrix.os == 'windows-latest' | |
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 | |
# Create lib directory in MINGW | |
mkdir C:\mingw64\lib | |
mkdir C:\mingw64\include | |
# Copy files to standard locations | |
copy duckdb.dll C:\Windows\System32\libduckdb.dll | |
copy duckdb.lib C:\mingw64\lib\libduckdb.a | |
copy duckdb.h C:\mingw64\include\ | |
# Set environment variables for CGO | |
echo "CGO_LDFLAGS=-LC:/mingw64/lib -lduckdb" >> $env:GITHUB_ENV | |
echo "CGO_CFLAGS=-IC:/mingw64/include" >> $env:GITHUB_ENV | |
echo "CGO_ENABLED=1" >> $env:GITHUB_ENV | |
# Build step | |
- name: Build | |
run: | | |
cd desktopcollector | |
go build -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 |