Skip to content

Commit

Permalink
Merge pull request #48 from guillaumerose/ci
Browse files Browse the repository at this point in the history
ci: cross compile and upload artifacts
  • Loading branch information
guillaumerose authored Sep 16, 2021
2 parents 5876374 + 6633800 commit 32999eb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ jobs:
go-version: 1.17

- name: Build
run: make

run: make cross qemu-wrapper vm

- uses: actions/upload-artifact@v2
with:
name: gvproxy
path: bin/gvproxy*
16 changes: 16 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: golangci-lint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ CONTAINER_RUNTIME ?= podman
LDFLAGS = -ldflags '-s -w'

.PHONY: build
build: gvproxy
go build $(LDFLAGS) -o bin/qemu-wrapper ./cmd/qemu-wrapper
GOOS=linux CGO_ENABLED=0 go build $(LDFLAGS) -o bin/vm ./cmd/vm
build: gvproxy qemu-wrapper vm

.PHONY: gvproxy
gvproxy:
go build $(LDFLAGS) -o bin/gvproxy ./cmd/gvproxy

.PHONY: qemu-wrapper
qemu-wrapper:
go build $(LDFLAGS) -o bin/qemu-wrapper ./cmd/qemu-wrapper

.PHONY: vm
vm:
GOOS=linux CGO_ENABLED=0 go build $(LDFLAGS) -o bin/vm ./cmd/vm

.PHONY: clean
clean:
rm -rf ./bin
Expand Down

0 comments on commit 32999eb

Please sign in to comment.