diff --git a/.github/workflows/build-short-new.yml b/.github/workflows/build-short-new.yml new file mode 100644 index 0000000..b2c0a85 --- /dev/null +++ b/.github/workflows/build-short-new.yml @@ -0,0 +1,12 @@ +name: 'Build and Test Hub 2' + +on: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build and Test + uses: lbryio/hub \ No newline at end of file diff --git a/Dockerfile.action b/Dockerfile.action new file mode 100644 index 0000000..54a8e87 --- /dev/null +++ b/Dockerfile.action @@ -0,0 +1,5 @@ +FROM jeffreypicard/hub-github-env + +COPY scripts/build_and_test.sh /build_and_test.sh + +ENTRYPOINT ["/build_and_test.sh"] \ No newline at end of file diff --git a/Dockerfile.github b/Dockerfile.github new file mode 100644 index 0000000..4848e1f --- /dev/null +++ b/Dockerfile.github @@ -0,0 +1,12 @@ +FROM golang:1.16.11-bullseye + +RUN apt-get update && \ + apt-get upgrade && \ + apt-get install git libsnappy-dev liblz4-dev libzstd-dev zlib1g-dev +RUN git clone https://github.com/facebook/rocksdb.git && \ + cd rocksdb && \ + git checkout v6.26.1 && \ + make shared_lib && \ + make install-shared + +CMD ["bash"] diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..d5404b3 --- /dev/null +++ b/action.yml @@ -0,0 +1,5 @@ +name: 'Build and Test' +description: 'Build and test hub' +runs: + using: 'docker' + image: 'Dockerfile.action' \ No newline at end of file diff --git a/scripts/build_and_test.sh b/scripts/build_and_test.sh new file mode 100755 index 0000000..a267f85 --- /dev/null +++ b/scripts/build_and_test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +go build . +go test -v -race ./...