Skip to content

Merge branch 'master' of github.com:fragglet/ipxbox #13

Merge branch 'master' of github.com:fragglet/ipxbox

Merge branch 'master' of github.com:fragglet/ipxbox #13

Workflow file for this run

name: Continuous Integration
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pcap
run: |
sudo apt update
sudo apt install libpcap-dev
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: go build -v ipxbox.go
- name: Test
run: |
go test network/pipe/*.go
go test network/filter/*.go
go test ipx/*.go
crosscompile:
strategy:
matrix:
goarch: [386, amd64, arm64]
goos: [darwin, freebsd, linux, windows]
exclude:
- goarch: 386
goos: darwin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: |
mkdir artifacts
cd artifacts
go build -tags nopcap -v ../ipxbox.go
go build -tags nopcap -v ../standalone/ipxbox_uplink.go
env:
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
# Github packages artifacts in .zip files which don't preserve
# permissions, so we must make an inner tar. Sigh.
- name: Tar artifacts
run: |
mv artifacts artifacts2
mkdir artifacts
tar -C artifacts2 -czf artifacts/contents.tar.gz .
if: ${{ matrix.goos != 'windows' }}
- name: Upload build
uses: actions/upload-artifact@v1
with:
path: "artifacts"
name: ipxbox_${{ matrix.goos }}_${{ matrix.goarch }}