diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..af2439f0f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + include: + - arch: x86_64 + target_os: linux + - arch: i686 + target_os: linux + - arch: aarch64 + target_os: linux + - arch: armv7 + target_os: linux + - arch: armv5 + target_os: linux + - arch: x86_64 + target_os: android + - arch: i686 + target_os: android + - arch: aarch64 + target_os: android + - arch: armv7 + target_os: android + - arch: x86_64 + target_os: windows + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v5 + - run: export GOOS=${{ matrix.target_os }} + - run: export GOARCH=${{ matrix.arch }} + - run: go build -o ./dist/ + - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: wireguard-go-${{ matrix.target_os }}-${{ matrix.arch }} + path: dist/ \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..07c445325 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: test + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + include: + - arch: x86_64 + target_os: linux + - arch: i686 + target_os: linux + - arch: aarch64 + target_os: linux + - arch: armv7 + target_os: linux + - arch: armv5 + target_os: linux + - arch: x86_64 + target_os: android + - arch: i686 + target_os: android + - arch: aarch64 + target_os: android + - arch: armv7 + target_os: android + - arch: x86_64 + target_os: windows + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v5 + - run: export GOOS=${{ matrix.target_os }} + - run: export GOARCH=${{ matrix.arch }} + - run: go build + - run: go test ./... \ No newline at end of file