Skip to content

Commit

Permalink
add github build and test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gytsto committed Apr 22, 2024
1 parent e7a12dd commit e7331b7
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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/
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 ./...

0 comments on commit e7331b7

Please sign in to comment.