add readme

This commit is contained in:
kaedwen
2023-07-09 15:21:14 +02:00
parent 28ca6cc820
commit 7e89e7c4ba
3 changed files with 27 additions and 5 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
node-version: 18
cache-dependency-path: static
cache: npm
- run: npm --prefix static ci && npm --prefix static run build
- run: make build-static
- uses: actions/upload-artifact@v3
with:
name: static
@@ -71,7 +71,7 @@ jobs:
echo "GOARCH=${{ matrix.target.goarch }}" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=/usr/lib/${{ matrix.target.prefix }}/pkgconfig" >> $GITHUB_ENV
echo "CC=${PREFIX:+$PREFIX-}gcc" >> $GITHUB_ENV
- run: make build-static
- run: make build
- uses: actions/upload-artifact@v3
with:
name: service-${{ matrix.target.os }}-${{ matrix.target.goarch }}
+2 -3
View File
@@ -1,9 +1,8 @@
build:
CGO_ENABLED=1 go build -mod=vendor -o service main.go
CGO_ENABLED=1 go build -mod=vendor -tags=embed -o service main.go
build-static:
CGO_ENABLED=1 go build -mod=vendor -tags=embed -o service main.go
npm --prefix static ci && npm --prefix static run build
build-armhf:
GOARCH=arm \
+23
View File
@@ -0,0 +1,23 @@
# Webrtc streamer based on golang (pion) and gstreamer
This project demonstrates who to stream any source (thanks to gstreamer) in a webrtc session using golang pion to a webrtc client (angular).
## build locally
### Build web client
To build the web client static sources make sure you have `node` and `npm` installed.
```
make build-static
```
### Build service
To build the service make sure you have build the `static` content first.
```
make build
```
## build cross
To build for `arm` or `arm64` just use the sections in the `Makefile`. Make sure you have `podman` installed as it will be used to create the tmp build container.
```
make build-armhf
```