diff --git a/.github/workflows/golang-test.yml b/.github/workflows/golang-test.yml index c5e3383166a..df5b30b3cab 100644 --- a/.github/workflows/golang-test.yml +++ b/.github/workflows/golang-test.yml @@ -18,4 +18,33 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Test - run: go test ./... \ No newline at end of file + 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 . \ No newline at end of file diff --git a/iface/iface_darwin.go b/iface/iface_darwin.go index 9e566844da2..aa963e25e56 100644 --- a/iface/iface_darwin.go +++ b/iface/iface_darwin.go @@ -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) diff --git a/resources_amd64.syso b/resources_windows_amd64.syso similarity index 100% rename from resources_amd64.syso rename to resources_windows_amd64.syso