From 48612c88801da35d817fd72b4bc047fda8b09269 Mon Sep 17 00:00:00 2001 From: RSWilli Date: Thu, 28 Mar 2024 16:43:53 +0100 Subject: [PATCH 1/2] prepare for v1.0.0 --- .github/workflows/build.yml | 19 +++++++++--------- .github/workflows/tests.yml | 7 ++----- Makefile | 40 ------------------------------------- README.md | 6 +++--- go.mod | 2 +- 5 files changed, 16 insertions(+), 58 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d533c2..349bdbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,22 +12,23 @@ jobs: matrix: strategy: matrix: - os: [ubuntu-latest, windows-latest, "macos-latest"] + os: + - ubuntu-latest + # - windows-latest # see https://github.com/go-gst/go-gst/issues/64 + - macos-latest runs-on: ${{ matrix.os }} steps: - - name: Downgrade mingw to 11.2.0 - if: runner.os == 'Windows' - run: choco install mingw --version 11.2.0 --allow-downgrade + # - name: Downgrade mingw to 11.2.0 + # if: runner.os == 'Windows' + # run: choco install mingw --version 11.2.0 --allow-downgrade - name: Setup GStreamer id: setup_gstreamer - uses: RSWilli/setup-gstreamer@5472e33168ba7b1f3bb01dc81ca067e263633824 - with: - version: 1.22.6 + uses: blinemedical/setup-gstreamer@v1.4.0 - name: checkout uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: "^1.21.0" + go-version: "stable" - name: build shell: bash run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93d128a..98f0157 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,14 +12,12 @@ jobs: steps: - name: Setup GStreamer id: setup_gstreamer - uses: RSWilli/setup-gstreamer@5472e33168ba7b1f3bb01dc81ca067e263633824 - with: - version: 1.22.6 + uses: blinemedical/setup-gstreamer@v1.4.0 - name: Check out code into the Go module directory uses: actions/checkout@v2 - uses: actions/setup-go@v4 with: - go-version: "^1.21.0" + go-version: "stable" - name: Check formatting uses: Jerome1337/gofmt-action@v1.0.5 with: @@ -33,4 +31,3 @@ jobs: - uses: dominikh/staticcheck-action@v1.3.0 with: install-go: false - min-go-version: "1.21" diff --git a/Makefile b/Makefile deleted file mode 100644 index 6ea1bc8..0000000 --- a/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -GO_VERSION ?= 1.15 -DOCKER_IMAGE ?= ghcr.io/tinyzimmer/go-gst:$(GO_VERSION) - -GOPATH ?= $(shell go env GOPATH) -GOBIN ?= $(GOPATH)/bin -GOLANGCI_VERSION ?= v1.33.0 -GOLANGCI_LINT ?= $(GOBIN)/golangci-lint - -PLUGIN_GEN ?= "$(shell go env GOPATH)/bin/gst-plugin-gen" - -$(GOLANGCI_LINT): - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCI_VERSION) - -lint: $(GOLANGCI_LINT) - $(GOLANGCI_LINT) run -v - -docker-build: - docker build . \ - -f .github/Dockerfile \ - --build-arg GO_VERSION=$(GO_VERSION) \ - -t $(DOCKER_IMAGE) - -CMD ?= /bin/bash -docker-run: docker-build - docker run --rm --privileged \ - -v /lib/modules:/lib/modules:ro \ - -v /sys:/sys:ro \ - -v /usr/src:/usr/src:ro \ - -v "$(PWD)":/workspace \ - -w /workspace \ - -e HOME=/tmp \ - $(DOCKER_IMAGE) $(CMD) - -docker-lint: - $(MAKE) docker-run CMD="make lint" - -$(PLUGIN_GEN): - cd cmd/gst-plugin-gen && go build -o $(PLUGIN_GEN) . - -install-plugin-gen: $(PLUGIN_GEN) \ No newline at end of file diff --git a/README.md b/README.md index ed71e02..67b56e4 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ See [pkg.go.dev](https://pkg.go.dev/github.com/go-gst/go-gst) references for documentation and examples. -**This library has not been thoroughly tested and as such is not recommended for mission critical applications yet. If you'd like to try it out and encounter any bugs, feel free to open an Issue or PR. For more information see the [Contributing](#contributing) section.** - -Recently almost all memory handling has been moved into the bindings. Some documentation may still reflect the original need to Unref resources, but in most situations that is not the case anymore. +Please make sure that you have followed the [official gstreamer installation instructions](https://gstreamer.freedesktop.org/documentation/installing/index.html?gi-language=c) before attempting to use the bindings or file an issue. ## Requirements @@ -25,6 +23,8 @@ For building applications with this library you need the following: ### Windows +(also see https://github.com/go-gst/go-gst/issues/64) + Compiling on Windows may require some more dancing around than on macOS or Linux. First, make sure you have [mingw](https://chocolatey.org/packages/mingw) and [pkgconfig](https://chocolatey.org/packages/pkgconfiglite) installed (links are for the Chocolatey packages). Next, go to the [GStreamer downloads](https://gstreamer.freedesktop.org/download/) page and download the latest "development installer" for your MinGW architecture. diff --git a/go.mod b/go.mod index 8efee35..902aa4c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/go-gst/go-gst -go 1.21 +go 1.22 require github.com/mattn/go-pointer v0.0.1 From 9f9db47ad245ce875d305d710e0fe8e9e0c88c9a Mon Sep 17 00:00:00 2001 From: RSWilli Date: Thu, 28 Mar 2024 18:03:03 +0100 Subject: [PATCH 2/2] switch to stable go-glib --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 902aa4c..97c6235 100644 --- a/go.mod +++ b/go.mod @@ -4,4 +4,4 @@ go 1.22 require github.com/mattn/go-pointer v0.0.1 -require github.com/go-gst/go-glib v0.0.0-20231207075824-6d6aaf082c65 +require github.com/go-gst/go-glib v1.0.0 diff --git a/go.sum b/go.sum index 814c770..98e0d51 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/go-gst/go-glib v0.0.0-20231207075824-6d6aaf082c65 h1:G9LRxbnTdpkJAfa6vOwldiWmrtAj2L/7gZlsRZYOITA= -github.com/go-gst/go-glib v0.0.0-20231207075824-6d6aaf082c65/go.mod h1:rXuKU+tCN7pN+b/7oIyWv6MpnlGy+QWd7jRhWUNstjU= +github.com/go-gst/go-glib v1.0.0 h1:/Gl3lk3M3MmWoSEtOyH3bpUxMUvO1gUL35A2drbr/K0= +github.com/go-gst/go-glib v1.0.0/go.mod h1:7Ehl6klsMBT94bf+Bic9qRyEkXARhhqpiZnU2PXeO6I= github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=