Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
langhuihui committed Dec 21, 2023
1 parent 3b0a12c commit 5d945a2
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 85 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,23 @@ jobs:
path: ~/go/pkg/mod
key: runner.os−go−{ { hashFiles('**/go.sum') } }
restore-keys: ${{ runner.os }}-go-

- name: Download PRIVATE dependencies
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.GO_MODULE_PRIVATE_KEY }}"
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
export GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
go mod download
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: v1.8.3
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
45 changes: 0 additions & 45 deletions gen.go

This file was deleted.

9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ go 1.20

require (
go.uber.org/zap v1.26.0 // indirect
m7s.live/engine/v4 v4.14.6-0.20231214052800-5927c4a30a0f
m7s.live/plugin/debug/v4 v4.0.1
m7s.live/engine/v4 v4.14.6-0.20231220021402-453ea6a6f244
m7s.live/plugin/debug/v4 v4.0.2-0.20231220021419-8560e3adc2d2
m7s.live/plugin/gb28181/v4 v4.4.4-0.20231212111848-bee261a67086
m7s.live/plugin/hdl/v4 v4.1.10
m7s.live/plugin/hls/v4 v4.3.8-0.20231213072004-7ec5ce26b101
m7s.live/plugin/hook/v4 v4.0.3-0.20231213072035-80b5f6e25286
m7s.live/plugin/jessica/v4 v4.2.1
m7s.live/plugin/logrotate/v4 v4.0.5-0.20231213072057-ea7b8d660ad0
m7s.live/plugin/preview/v4 v4.1.4-0.20231214052634-6e5ce878edd0
m7s.live/plugin/record/v4 v4.4.6-0.20231213072327-1181cbca3686
m7s.live/plugin/record/v4 v4.4.6-0.20231215101053-3733b9f4e61f
m7s.live/plugin/room/v4 v4.0.12-0.20231213072347-4ec68e833905
m7s.live/plugin/rtmp/v4 v4.2.10-0.20231213072600-93973f247912
m7s.live/plugin/rtsp/v4 v4.3.4-0.20231213072710-5e722bf84914
Expand Down Expand Up @@ -52,6 +52,7 @@ require (
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/husanpao/ip v0.0.0-20220711082147-73160bb611a8 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
Expand Down Expand Up @@ -91,7 +92,7 @@ require (
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
github.com/quic-go/quic-go v0.38.1 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/shirou/gopsutil/v3 v3.23.8 // indirect
github.com/shirou/gopsutil/v3 v3.23.11 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/stretchr/testify v1.8.4 // indirect
Expand Down
20 changes: 11 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 h1:gpptm606MZYGaMHMsB4Srmb6EbW/IVHnt04rcMXnkBQ=
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/husanpao/ip v0.0.0-20220711082147-73160bb611a8 h1:4Jk58quTZmzJcTrLlbB5L1Q6qXu49EIjCReWxcBFWKo=
Expand Down Expand Up @@ -236,8 +238,8 @@ github.com/quic-go/quic-go v0.38.1/go.mod h1:ijnZM7JsFIkp4cRyjxJNIzdSfCLmUMg9wdy
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE=
github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ=
github.com/shirou/gopsutil/v3 v3.23.11 h1:i3jP9NjCPUz7FiZKxlMnODZkdSIp2gnzfrvsu9CuWEQ=
github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
Expand Down Expand Up @@ -450,12 +452,12 @@ gorm.io/driver/sqlite v1.5.3 h1:7/0dUgX28KAcopdfbRWWl68Rflh6osa4rDh+m51KL2g=
gorm.io/driver/sqlite v1.5.3/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4=
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7wJM0gzgcm8jkIkECQ=
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
m7s.live/engine/v4 v4.14.6-0.20231214052800-5927c4a30a0f h1:ecSK7dHlmK58R1L0ceX2cNgoNtOxmY4QCskK407HG6E=
m7s.live/engine/v4 v4.14.6-0.20231214052800-5927c4a30a0f/go.mod h1:FRtMPBGzNE6kCLgY0wuS3H7d1btKocRiVe9fAkDtP1g=
m7s.live/engine/v4 v4.14.6-0.20231220021402-453ea6a6f244 h1:9sCtX8OiQJayEczhp8ggBDiHf2jkxDlVH0qNScEW1Lo=
m7s.live/engine/v4 v4.14.6-0.20231220021402-453ea6a6f244/go.mod h1:FRtMPBGzNE6kCLgY0wuS3H7d1btKocRiVe9fAkDtP1g=
m7s.live/plugin/cascade/v4 v4.0.0-20231214061644-15d42e824ff6 h1:65DfJnp9r3ply9yN2ToM/5EaKvgeu08atLaDSye95ns=
m7s.live/plugin/cascade/v4 v4.0.0-20231214061644-15d42e824ff6/go.mod h1:/O9oNK/f+Ku1h4TzhYOjnWiXmzTvzRSZyuE3jRB/GIU=
m7s.live/plugin/debug/v4 v4.0.1 h1:sX0UADsiikwSol8qx+8aQzGeaFa8yJFa/cUKpBs5Lzw=
m7s.live/plugin/debug/v4 v4.0.1/go.mod h1:A/C1ViacCOK7EPeeCfiwlUrC2TUtRdEqzrR0Yd9b1KQ=
m7s.live/plugin/debug/v4 v4.0.2-0.20231220021419-8560e3adc2d2 h1:gSkJ5fz9sV0UGcKVegdKqKELp59xJy6ONL7hKhpd/bg=
m7s.live/plugin/debug/v4 v4.0.2-0.20231220021419-8560e3adc2d2/go.mod h1:muzikl1KrHfbT/+2aHzKg9qDGfpArViQAtpcfFrST88=
m7s.live/plugin/gb28181/v4 v4.4.4-0.20231212111848-bee261a67086 h1:0GDyECZQLVbnNATSKJmNxd951d2NnFsxXZK8Ecl089k=
m7s.live/plugin/gb28181/v4 v4.4.4-0.20231212111848-bee261a67086/go.mod h1:mK5embLQwDULFJjA7jBls1Cwvow98lTWS6n/uZ7Ampk=
m7s.live/plugin/hdl/v4 v4.1.10 h1:6/3aCaVvqpc4m/oyhW1jgQeYfPHINiKGAP+FGptVNqU=
Expand All @@ -472,8 +474,8 @@ m7s.live/plugin/preview/v4 v4.1.4-0.20231214052634-6e5ce878edd0 h1:DaYwxaa+/NG2L
m7s.live/plugin/preview/v4 v4.1.4-0.20231214052634-6e5ce878edd0/go.mod h1:iYhWqFbTvTNDFplbTOrE5X9M6ED7gCKkKMuM5QmBocg=
m7s.live/plugin/ps/v4 v4.1.5-0.20231213072312-25570d9571b3 h1:Ibo6vCb8VpqnpIQ2/3PFIr35BMku/2/j44f8cms77AM=
m7s.live/plugin/ps/v4 v4.1.5-0.20231213072312-25570d9571b3/go.mod h1:RAb507iNmPG43I5kUA6ewF1fTRHDRsKbIVkIdLdKeeI=
m7s.live/plugin/record/v4 v4.4.6-0.20231213072327-1181cbca3686 h1:UVun29MJLxVNPdpIEGkbnVNg6hJbvkoY9fWHiR9IfU8=
m7s.live/plugin/record/v4 v4.4.6-0.20231213072327-1181cbca3686/go.mod h1:lwVE6xn4sGQBLOWgshw3L1fa5zyEM7NlmQ8otTQGXUY=
m7s.live/plugin/record/v4 v4.4.6-0.20231215101053-3733b9f4e61f h1:NXbePsmM1JKOdcuU3XUI9eqGjjG6HYZxMHxkS+/3QXg=
m7s.live/plugin/record/v4 v4.4.6-0.20231215101053-3733b9f4e61f/go.mod h1:lwVE6xn4sGQBLOWgshw3L1fa5zyEM7NlmQ8otTQGXUY=
m7s.live/plugin/room/v4 v4.0.12-0.20231213072347-4ec68e833905 h1:Sw0MUvHze5ueZT6YnwmJjyK7M9Apsum1VCaWgJKCzjE=
m7s.live/plugin/room/v4 v4.0.12-0.20231213072347-4ec68e833905/go.mod h1:/bhhkT3bMh3q08HEO2eTC9sr8xV0XIcODEAJryeSVUI=
m7s.live/plugin/rtmp/v4 v4.2.10-0.20231213072600-93973f247912 h1:aM+sdeVQHghyQ2mrFo1kkuNnAFp8nAPcQgztbmQQYT4=
Expand Down
24 changes: 1 addition & 23 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ archives:
files:
- conf/*
builds:
- id: "with-debug"
- id: "all"
env:
- CGO_ENABLED=1
- GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
ldflags:
- -s -w -X main.version={{.Tag}}
ignore:
- goos: darwin
goarch: arm64
- goos: windows
goarch: arm64
goos:
- linux
- windows
Expand All @@ -24,21 +19,4 @@ builds:
- arm64
hooks:
pre:
- bash -c "debug=1 go generate ./..."
- go mod tidy

- id: "without-debug"
env:
- CGO_ENABLED=1
- GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
ldflags:
- -s -w -X main.version={{.Tag}}
goos:
- windows
- darwin
goarch:
- arm64
hooks:
pre:
- bash -c "debug=0 go generate ./..."
- go mod tidy
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
_ "m7s.live/plugin/room/v4"
_ "m7s.live/plugin/rtmp/v4"
_ "m7s.live/plugin/rtsp/v4"

_ "m7s.live/plugin/snappro/v4"
_ "m7s.live/plugin/transcode/v4"
_ "m7s.live/plugin/webrtc/v4"
Expand Down

0 comments on commit 5d945a2

Please sign in to comment.