diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 53a252f..7ae30fa 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -11,34 +11,86 @@ on: - '!.github/workflows/debug.yml' pull_request: branches: + - main - dev jobs: build: - name: Debug build + name: Linux Debug build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ^1.22 + - name: Build + run: | + make test + build_go120: + name: Linux Debug build (Go 1.20) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ~1.20 + continue-on-error: true + - name: Build + run: | + make test + build_go121: + name: Linux Debug build (Go 1.21) runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Get latest go version - id: version + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ~1.21 + continue-on-error: true + - name: Build run: | - echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') + make test + build__windows: + name: Windows Debug build + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: ${{ steps.version.outputs.go_version }} - - name: Add cache to Go proxy + go-version: ^1.22 + continue-on-error: true + - name: Build run: | - version=`git rev-parse HEAD` - mkdir build - pushd build - go mod init build - go get -v github.com/sagernet/sing-tun@$version - popd + make test + build_darwin: + name: macOS Debug build + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ^1.22 continue-on-error: true - name: Build run: | - go build -v . \ No newline at end of file + make test \ No newline at end of file diff --git a/go.mod b/go.mod index 5d357d1..5cfda58 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sagernet/sing-tun -go 1.18 +go 1.20 require ( github.com/fsnotify/fsnotify v1.7.0 @@ -10,7 +10,7 @@ require ( github.com/sagernet/nftables v0.3.0-beta.2 github.com/sagernet/sing v0.5.0-alpha.9 go4.org/netipx v0.0.0-20231129151722-fdeea329fbba - golang.org/x/net v0.24.0 + golang.org/x/net v0.26.0 golang.org/x/sys v0.21.0 ) diff --git a/go.sum b/go.sum index ce7c720..55a9c72 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1Y github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=