-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add windows runners #443
Changes from all commits
a581152
0f2fa06
ae3795e
d2f38cf
de76480
f7d3a81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
1.21.x, | ||
1.22.x, | ||
] | ||
os: [ubuntu-latest, macos-12, macos-14] | ||
os: [ubuntu-latest, macos-12, macos-14, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
|
@@ -43,15 +43,26 @@ jobs: | |
- name: Test | ||
if: matrix.os == 'ubuntu-latest' | ||
run: APP_BRANCH=${APP_REF:11} DOCKER_GATEWAY_HOST=172.17.0.1 DOCKER_HOST_HTTP="http://172.17.0.1" make | ||
- name: Set CGO_LDFLAGS / pact_ffi lib on PATH | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
"CGO_LDFLAGS=-L$env:TMP" >> $env:GITHUB_ENV | ||
"$env:TMP" >> $env:GITHUB_PATH | ||
- name: Skip Avro plugin & test (windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
"SKIP_PLUGIN_AVRO=1" >> $env:GITHUB_ENV | ||
- name: Test (unit) | ||
if: matrix.os != 'ubuntu-latest' | ||
run: make test | ||
- name: Test (pact) | ||
if: matrix.os != 'ubuntu-latest' | ||
run: make pact_local | ||
- name: Install goveralls | ||
if: matrix.os != 'windows-latest' | ||
run: go install github.com/mattn/goveralls@latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. goveralls had an error on windows, but a yak shave for another day |
||
- name: Send coverage | ||
if: matrix.os != 'windows-latest' | ||
run: goveralls -coverprofile=coverage.txt -service=github -parallel | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,10 @@ PLUGIN_PACT_AVRO_VERSION=0.0.5 | |
|
||
GO_VERSION?=1.22 | ||
ci:: docker deps clean bin test pact | ||
PACT_DOWNLOAD_DIR=/tmp | ||
ifeq ($(OS),Windows_NT) | ||
PACT_DOWNLOAD_DIR=$$TMP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use TMP var which is available in powershell and cmd prompt |
||
endif | ||
|
||
# Run the ci target from a developer machine with the environment variables | ||
# set as if it was on Travis CI. | ||
|
@@ -61,10 +65,6 @@ clean: | |
rm -rf build output dist examples/pacts | ||
|
||
deps: download_plugins | ||
@echo "--- 🐿 Fetching build dependencies " | ||
cd /tmp; \ | ||
go install github.com/mitchellh/gox@latest; \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doesn't look to be used in this repo, and the repo is archived. May be a hangover from pact-go v1 |
||
cd - | ||
|
||
download_plugins: | ||
@echo "--- 🐿 Installing plugins"; \ | ||
|
@@ -106,7 +106,7 @@ cli: | |
|
||
install: bin | ||
echo "--- 🐿 Installing Pact FFI dependencies" | ||
./build/pact-go -l DEBUG install --libDir /tmp | ||
./build/pact-go -l DEBUG install --libDir $(PACT_DOWNLOAD_DIR) | ||
|
||
pact: clean install docker | ||
@echo "--- 🔨 Running Pact examples" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build darwin || linux | ||
|
||
package native | ||
|
||
import "C" | ||
|
||
type CUlong = C.ulong |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build windows | ||
|
||
package native | ||
|
||
import "C" | ||
|
||
type CUlong = C.ulonglong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documented in #442