Skip to content
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

Build fixes for CGO #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 3 additions & 0 deletions ieproxy_darwin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build darwin && cgo
// +build darwin,cgo

package ieproxy

/*
Expand Down
3 changes: 3 additions & 0 deletions ieproxy_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build windows && cgo
// +build windows,cgo

package ieproxy

import (
Expand Down
3 changes: 3 additions & 0 deletions pac_darwin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build darwin && cgo
// +build darwin,cgo

package ieproxy

/*
Expand Down
3 changes: 3 additions & 0 deletions pac_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build windows && cgo
// +build windows,cgo

package ieproxy

import (
Expand Down