Skip to content

Commit

Permalink
Merge pull request #29 from wiretrustee/fix-mac-build
Browse files Browse the repository at this point in the history
Fix mac build
  • Loading branch information
braginini authored Jun 15, 2021
2 parents 51337fb + 714c4c3 commit 8b31088
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/golang-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,33 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: go test ./...
run: go test ./...

test_build:
strategy:
matrix:
os: [ windows, linux, darwin ]
go-version: [1.16.x]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install modules
run: go mod tidy

- name: run build
run: GOOS=${{ matrix.os }} go build .
2 changes: 1 addition & 1 deletion iface/iface_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func assignAddr(address string, tunDevice tun.Device) error {
ip := strings.Split(address, "/")
cmd := exec.Command("ifconfig", ifaceName, "inet", address, ip[0])
if out, err := cmd.CombinedOutput(); err != nil {
log.Infoln("Command: %v failed with output %s and error: ", cmd.String(), out)
log.Infof("Command: %v failed with output %s and error: ", cmd.String(), out)
return err
}
_, resolvedNet, err := net.ParseCIDR(address)
Expand Down
File renamed without changes.

0 comments on commit 8b31088

Please sign in to comment.