Skip to content

Commit

Permalink
Build platforms matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
tzununbekov committed Feb 15, 2024
1 parent e633182 commit 4f393ed
Showing 1 changed file with 55 additions and 2 deletions.
57 changes: 55 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: Test and build
on: [pull_request]
on:
push:
branches:
- master
- ci-migration
tags:
- 'v*'
pull_request:

env:
GOFLAGS: "-count=1"
RELEASE_BUILD: false
SNAPSHOT_BUILD: false

jobs:
test-and-build:
unit-tests:
runs-on: ubuntu-latest
environment: production

Expand All @@ -31,6 +40,17 @@ jobs:
file: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}

e2e-tests:
runs-on: ubuntu-latest
environment: production

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -42,3 +62,36 @@ jobs:

- name: E2E NAT test
run: go run mage.go -v TestE2ENAT

build:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
environment: production
needs: e2e-tests

strategy:
max-parallel: 3
matrix:
platform:
- PackageLinuxAmd64
- PackageLinuxArm
- PackageLinuxDebianAmd64
- PackageLinuxDebianArm64
- PackageLinuxDebianArm
- PackageLinuxRaspberryImage
- PackageMacOSAmd64
- PackageMacOSArm64
- PackageWindowsAmd64
- PackageAndroid
- PackageAndroidProvider
- PackageDockerSwaggerRedoc

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'

- name: Build package
run: go run mage.go -v ${{ matrix.platform }}

0 comments on commit 4f393ed

Please sign in to comment.