From 5810b8c1394f7a0d2f3563c01e060f5f5bc9a859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8F=A9?= <1939311091@qq.com> Date: Mon, 28 Aug 2023 23:10:15 +0800 Subject: [PATCH 1/3] feat: support GitHub Actions CI and semantic-release --- .github/workflows/build.yml | 11 ----------- .github/workflows/ci.yml | 14 +++++++++++++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20ec513..43a2532 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,17 +16,6 @@ jobs: ports: - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres - env: - POSTGRES_PASSWORD: postgres - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d5aee1..8661957 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,20 @@ jobs: go-version: 1.18 - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texi2html zlib1g-dev + sudo apt install -y libavdevice-dev libavfilter-dev libswscale-dev libavcodec-dev libavformat-dev libswresample-dev libavutil-dev + sudo apt-get install yasm + export FFMPEG_ROOT=$HOME/ffmpeg + export CGO_LDFLAGS="-L$FFMPEG_ROOT/lib/ -lavcodec -lavformat -lavutil -lswscale -lswresample -lavdevice -lavfilter" + export CGO_CFLAGS="-I$FFMPEG_ROOT/include" + export LD_LIBRARY_PATH=$HOME/ffmpeg/lib + - name: Run tests run: go test -v -coverprofile=./profile.cov ./... + - name: Install goveralls env: GO111MODULE: off @@ -39,4 +51,4 @@ jobs: npm install --save-dev semantic-release@17.2.4 npx semantic-release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3ffb015bd2d0bb7850fbd922cd263703fe731105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8F=A9?= <1939311091@qq.com> Date: Mon, 28 Aug 2023 23:14:51 +0800 Subject: [PATCH 2/3] feat: support GitHub Actions CI and semantic-release --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8661957..da36412 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,6 @@ jobs: export CGO_CFLAGS="-I$FFMPEG_ROOT/include" export LD_LIBRARY_PATH=$HOME/ffmpeg/lib - - name: Run tests - run: go test -v -coverprofile=./profile.cov ./... - - name: Install goveralls env: GO111MODULE: off From 56b390b614d3ddc299aeaa6369d95cf5cf1d99ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8F=A9?= <1939311091@qq.com> Date: Mon, 28 Aug 2023 23:19:20 +0800 Subject: [PATCH 3/3] feat: support GitHub Actions CI and semantic-release --- .github/workflows/ci.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da36412..4fe27cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,16 +26,6 @@ jobs: export CGO_CFLAGS="-I$FFMPEG_ROOT/include" export LD_LIBRARY_PATH=$HOME/ffmpeg/lib - - name: Install goveralls - env: - GO111MODULE: off - run: go get github.com/mattn/goveralls - - - name: Send coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: goveralls -coverprofile=profile.cov -service=github - semantic-release: needs: [ test ] runs-on: ubuntu-latest