Skip to content

v2.2: Firewall bypass, interrupt handling, and major improvements #10

v2.2: Firewall bypass, interrupt handling, and major improvements

v2.2: Firewall bypass, interrupt handling, and major improvements #10

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v -race -coverprofile=coverage.out ./...
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
fail_ci_if_error: false
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --timeout=5m
build:
name: Build
runs-on: ubuntu-latest
needs: [test, lint]
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: 386
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
- goos: windows
goarch: 386
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
ext=""
if [ "$GOOS" = "windows" ]; then
ext=".exe"
fi
go build -ldflags="-s -w" -o ipmap_${GOOS}_${GOARCH}${ext} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ipmap-${{ matrix.goos }}-${{ matrix.goarch }}
path: ipmap_*