Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update build/release process and add static binary builds #22

Merged
merged 4 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 17 additions & 39 deletions .github/workflows/buildTests.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,34 @@
name: build tests for flannel-cni
name: build tests for flannel cni-plugin

on: [push, pull_request]

env:
GO_VERSION: "1.15.15"
LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le"
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: go mod vendor
run: go mod vendor

- name: build linux
run: |
set -e
for arch in ${LINUX_ARCHES}; do
echo "Building for arch $arch"
ARCH=$arch make build_linux
file dist/flannel-$arch
rm dist/*
done

- name: build windows
run: make build_windows

test:
name: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ "1.16.10" ]
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: WillAbides/setup-go[email protected]
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ matrix.go }}

- run: go version

- name: go mod vendor
run: go mod vendor
- name: build all
run: make build_all

- name: test linux
- name: run tests
run: make test_linux
Loading