diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e603320 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build + +on: + push: + branches: [ main ] + +jobs: + + setup: + name: Build + runs-on: ubuntu-20.04 + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build and push the go-gst docker image + run: make docker-build docker-push diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index afa59de..761e06a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,32 +13,9 @@ jobs: runs-on: ubuntu-20.04 steps: - - name: Set up Go 1.15 - uses: actions/setup-go@v1 - with: - go-version: 1.15 - id: go - - name: Check out code into the Go module directory uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Get dependencies - run: | - go mod download - - - name: Install gstreamer dependencies - run: | - sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ - libgstreamer1.0-0 libgstreamer1.0-dev libgstreamer-plugins-base1.0-0 libgstreamer-plugins-base1.0-dev \ - pkg-config build-essential - - name: Lint all packages run: | - make lint + make docker-lint diff --git a/Makefile b/Makefile index 73305d4..0e3c711 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ docker-push: docker-build docker push $(DOCKER_IMAGE) CMD ?= /bin/bash -docker-run: docker-build +docker-run: docker run --rm --privileged \ -v /lib/modules:/lib/modules:ro \ -v /sys:/sys:ro \ @@ -32,5 +32,5 @@ docker-run: docker-build -e HOME=/tmp \ $(DOCKER_IMAGE) $(CMD) -docker-lint: docker-build +docker-lint: $(MAKE) docker-run CMD="make lint" \ No newline at end of file