From 849bc584cc3874a7cc1b44a55c69c244c7f7834b Mon Sep 17 00:00:00 2001 From: gdm85 Date: Thu, 13 May 2021 19:00:40 +0200 Subject: [PATCH] Add GitHub actions to build master and each PR --- .github/workflows/go.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..ada858a --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,37 @@ +name: Go build for Linux +on: [push, pull_request] +jobs: + + build: + name: Build + runs-on: ubuntu-18.04 + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.12 + id: go + + - name: Check out repository + uses: actions/checkout@v2 + + - name: Linux build + run: | + make + + - name: Upload Linux build + uses: actions/upload-artifact@v2 + with: + name: linux-amd64 + path: | + doh-client/doh-client + doh-server/doh-server + + - name: Cache + uses: actions/cache@v2 + with: + # A directory to store and save the cache + path: ~/go/pkg/mod + # An explicit key for restoring and saving the cache + key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}