Skip to content

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuzeyu authored Jul 6, 2024
1 parent 2576269 commit e7fe079
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,36 @@ on:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
target_arch: [aarch64, arm64, x86_64]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.7

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5.0.1
with:
go-version: 1.19

- name: Build
run: |
sudo apt update && sudo apt install -y libpcap-dev
go build -v ./...
go build -v -tags pcap ./...
go build -v -tags rawsocket ./...
go build -o ./phantomsocks-original
go build -o ./phantomsocks-pcap -tags pcap
go build -o ./phantomsocks-rawsocket -tags rawsocket
- name: upload
uses: actions/upload-artifact@v4
with:
name: linuxps-${{ matrix.target_arch }}
path: ./phantomsocks*

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.7

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5.0.1
with:
go-version: 1.19

Expand All @@ -39,19 +47,29 @@ jobs:
go build -v ./...
go build -v -tags pcap ./...
go build -v -tags windivert ./...
- name: upload
uses: actions/upload-artifact@v4
with:
name: winps-${{ matrix.target_arch }}
path: ./phantomsocks*

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.7

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5.0.1
with:
go-version: 1.19

- name: Build
run: |
go build -v ./...
go build -v -tags pcap ./...
- name: upload
uses: actions/upload-artifact@v4
with:
name: macps-${{ matrix.target_arch }}
path: ./phantomsocks*

0 comments on commit e7fe079

Please sign in to comment.