From a6c781d5c34f9f1666ba9ff834d75f0304bbf5b0 Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Sat, 10 Jun 2023 17:33:28 +0000 Subject: [PATCH] ci: add go {vet,build} job --- .github/workflows/go_build.yml | 28 ++++++++++++++++++++++++++++ contrib/deps-bundle.sh | 4 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/go_build.yml diff --git a/.github/workflows/go_build.yml b/.github/workflows/go_build.yml new file mode 100644 index 0000000..b150162 --- /dev/null +++ b/.github/workflows/go_build.yml @@ -0,0 +1,28 @@ +name: CI +on: + pull_request: + push: + branches: + - main +jobs: + go-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.20.5 + + - name: Fetch deps + run: | + # Hosted with Git LFS. See ./contrib/deps-bundle.sh + wget -q https://github.com/firedancer-io/radiance/raw/deps/deps-bundle.tar.zst + tar -I zstd -xf deps-bundle.tar.zst + + - name: Vet + run: source activate-opt && go vet ./... + + - name: Build + run: source activate-opt && go build -v ./cmd/radiance diff --git a/contrib/deps-bundle.sh b/contrib/deps-bundle.sh index dd4ab21..02bfe07 100755 --- a/contrib/deps-bundle.sh +++ b/contrib/deps-bundle.sh @@ -2,7 +2,7 @@ set -e -# Packs a bundle of dependency files. +# Pack a bundle of dependency files cd -- "$( dirname -- "${BASH_SOURCE[0]}" )"/.. @@ -12,3 +12,5 @@ tar -Izstd -cf deps-bundle.tar.zst \ ./opt/{include,lib,lib64} echo "[+] Created deps-bundle.tar.zst" + +# Now you can commit this file to the deps branch of the repository