grafana / xk6-sql

k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)
Apache License 2.0
108 stars 57 forks source link

How to compile it under windows #3

Closed sergiutugulschi closed 3 years ago

sergiutugulschi commented 3 years ago

Running CGO_ENABLED=1 go run ./cmd/xk6/main.go build master \ --with github.com/imiric/xk6-sql 'CGO_ENABLED' is not recognized as an internal or external command, operable program or batch file.

I have installed go, if I run without CGO_ENABLED=1 i'm getting [ERROR] missing flag;

dboreham commented 3 years ago

ymmv, but I am using containers on Windows (with Docker Desktop and WSL2 integration) to bypass the Windows build hassles. Example here : https://github.com/dboreham/xk6-sql-container

imiric commented 3 years ago

Hi there, apologies for the late response, I missed the GitHub notification for this issue.

I added the Windows instructions in fc5bb4f, since the way environment variables are specified works differently on Windows shells. But I confirmed this approach works on Windows 10.