From 507fa23f669dc15301984f1c4b7ac392452918ff Mon Sep 17 00:00:00 2001 From: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com> Date: Fri, 16 Sep 2022 13:24:13 +0530 Subject: [PATCH 1/2] Updated Workflow Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com> --- .github/workflows/CI.yml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f836096..ffc90bd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,30 +1,52 @@ +--- +# Github Actions CI +# -*- compile-command: "yamllint -f parsable CI.yml" -*- + name: CI +# Trigger the workflow on push or pull request on: push: - branches: [master] + branches: + - '*' + tags: + - '*' pull_request: + workflow_dispatch: jobs: run-tests: name: Run test cases - runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] go: [1.17, 1.16] cgo_enabled: [0, 1] + runs-on: ${{ matrix.os }} + steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} + cache: true + + - name: Print Go version and environment + shell: bash + run: | + printf "Using go at: $(which go)\n" + printf "Go version: $(go version)\n" + printf "\n\nGo environment:\n\n" + go env + printf "\n\nSystem environment:\n\n" + env - name: Run tests run: go test -v ./... env: - CGO_ENABLED: ${{ matrix.go }} - + CGO_ENABLED: ${{ matrix.cgo_enabled }} From 69928ad83ed60a5d341dc8e8ffceddcdae3e4d0e Mon Sep 17 00:00:00 2001 From: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com> Date: Fri, 16 Sep 2022 14:18:58 +0530 Subject: [PATCH 2/2] Fixed build constraints for CGO Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com> --- ieproxy_darwin.go | 3 +++ ieproxy_windows.go | 3 +++ pac_darwin.go | 3 +++ pac_windows.go | 3 +++ 4 files changed, 12 insertions(+) diff --git a/ieproxy_darwin.go b/ieproxy_darwin.go index 5d53555..9d887c4 100644 --- a/ieproxy_darwin.go +++ b/ieproxy_darwin.go @@ -1,3 +1,6 @@ +//go:build darwin && cgo +// +build darwin,cgo + package ieproxy /* diff --git a/ieproxy_windows.go b/ieproxy_windows.go index 7fd3750..7bf0868 100644 --- a/ieproxy_windows.go +++ b/ieproxy_windows.go @@ -1,3 +1,6 @@ +//go:build windows && cgo +// +build windows,cgo + package ieproxy import ( diff --git a/pac_darwin.go b/pac_darwin.go index a8bf90e..71552b2 100644 --- a/pac_darwin.go +++ b/pac_darwin.go @@ -1,3 +1,6 @@ +//go:build darwin && cgo +// +build darwin,cgo + package ieproxy /* diff --git a/pac_windows.go b/pac_windows.go index 6a2ee67..995232f 100644 --- a/pac_windows.go +++ b/pac_windows.go @@ -1,3 +1,6 @@ +//go:build windows && cgo +// +build windows,cgo + package ieproxy import (