mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 02:34:26 +08:00
调整持续集成,linux ci修改为centos7
This commit is contained in:
parent
77d2df1695
commit
577fe86917
4
.github/workflows/android.yml
vendored
4
.github/workflows/android.yml
vendored
@ -37,10 +37,10 @@ jobs:
|
|||||||
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
||||||
path: Android/app/build/outputs/apk/debug/*
|
path: Android/app/build/outputs/apk/debug/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 90
|
||||||
|
|
||||||
- name: issue评论
|
- name: issue评论
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/feature/test'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
5
.github/workflows/docker.yml
vendored
5
.github/workflows/docker.yml
vendored
@ -21,7 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
@ -39,7 +39,6 @@ jobs:
|
|||||||
# Install the cosign tool except on PR
|
# Install the cosign tool except on PR
|
||||||
# https://github.com/sigstore/cosign-installer
|
# https://github.com/sigstore/cosign-installer
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: sigstore/cosign-installer@d572c9c13673d2e0a26fabf90b5748f36886883f
|
uses: sigstore/cosign-installer@d572c9c13673d2e0a26fabf90b5748f36886883f
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
@ -53,7 +52,6 @@ jobs:
|
|||||||
# Login against a Docker registry except on PR
|
# Login against a Docker registry except on PR
|
||||||
# https://github.com/docker/login-action
|
# https://github.com/docker/login-action
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
@ -71,6 +69,7 @@ jobs:
|
|||||||
# Build and push Docker image with Buildx (don't push on PR)
|
# Build and push Docker image with Buildx (don't push on PR)
|
||||||
# https://github.com/docker/build-push-action
|
# https://github.com/docker/build-push-action
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/feature/test'
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
||||||
with:
|
with:
|
||||||
|
42
.github/workflows/linux.yml
vendored
42
.github/workflows/linux.yml
vendored
@ -13,9 +13,6 @@ jobs:
|
|||||||
- name: 下载submodule源码
|
- name: 下载submodule源码
|
||||||
run: mv -f .gitmodules_github .gitmodules && git submodule sync && git submodule update --init
|
run: mv -f .gitmodules_github .gitmodules && git submodule sync && git submodule update --init
|
||||||
|
|
||||||
- name: apt-get安装依赖库(非必选)
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y cmake libssl-dev libsdl-dev libavcodec-dev libavutil-dev libswscale-dev libresample-dev libusrsctp-dev
|
|
||||||
|
|
||||||
- name: 下载 SRTP
|
- name: 下载 SRTP
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -24,11 +21,34 @@ jobs:
|
|||||||
ref: v2.3.0
|
ref: v2.3.0
|
||||||
path: 3rdpart/libsrtp
|
path: 3rdpart/libsrtp
|
||||||
|
|
||||||
- name: 编译 SRTP
|
- name: 启动 Docker 容器, 在Docker 容器中执行脚本
|
||||||
run: cd 3rdpart/libsrtp && ./configure --enable-openssl && make -j $(nproc) && sudo make install
|
run: |
|
||||||
|
docker pull centos:7
|
||||||
- name: 编译
|
docker run -v $(pwd):/root -w /root --rm centos:7 sh -c "
|
||||||
run: mkdir -p linux_build && cd linux_build && cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_FFMPEG=true && make -j $(nproc)
|
set -x
|
||||||
|
yum install -y git wget gcc gcc-c++ make unzip ffmpeg-devel libavutil-devel libswscale-devel libresample-devel usrsctp-devel
|
||||||
|
|
||||||
|
wget https://github.com/openssl/openssl/archive/refs/heads/OpenSSL_1_1_1-stable.zip
|
||||||
|
unzip OpenSSL_1_1_1-stable.zip
|
||||||
|
cd openssl-OpenSSL_1_1_1-stable
|
||||||
|
./config no-shared --prefix=/root/release
|
||||||
|
make -j $(nproc)
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
wget https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5.tar.gz
|
||||||
|
tar -xvf cmake-3.29.5.tar.gz
|
||||||
|
cd cmake-3.29.5
|
||||||
|
OPENSSL_ROOT_DIR=/root/release ./configure
|
||||||
|
make -j $(nproc)
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
cd 3rdpart/libsrtp && ./configure --enable-openssl --with-openssl-dir=/root/release && make -j $(nproc) && make install
|
||||||
|
cd ../../
|
||||||
|
|
||||||
|
mkdir -p linux_build && cd linux_build && cmake .. -DOPENSSL_ROOT_DIR=/root/release -DCMAKE_BUILD_TYPE=Release -DENABLE_FFMPEG=true && make -j $(nproc)
|
||||||
|
"
|
||||||
|
|
||||||
- name: 设置环境变量
|
- name: 设置环境变量
|
||||||
run: |
|
run: |
|
||||||
@ -43,10 +63,10 @@ jobs:
|
|||||||
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
||||||
path: release/*
|
path: release/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 90
|
||||||
|
|
||||||
- name: issue评论
|
- name: issue评论
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/feature/test'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -60,5 +80,5 @@ jobs:
|
|||||||
+ '- git hash: ${{ github.sha }} \n'
|
+ '- git hash: ${{ github.sha }} \n'
|
||||||
+ '- 编译日期: ${{ env.DATE }}\n'
|
+ '- 编译日期: ${{ env.DATE }}\n'
|
||||||
+ '- 打包ci名: ${{ github.workflow }}\n'
|
+ '- 打包ci名: ${{ github.workflow }}\n'
|
||||||
+ '- 说明: 本二进制在ubuntu-20.04(x64)上编译,请确保您的机器系统不低于此版本,并提前`sudo apt-get install -y libssl-dev libsdl-dev libavcodec-dev libavutil-dev libswscale-dev libresample-dev libusrsctp-dev`安装依赖项\n'
|
+ '- 说明: 本二进制在centos7(x64)上编译,请确保您的机器系统不低于此版本,并提前`sudo yum check-update && sudo yum install -y openssl-devel ffmpeg-devel libavutil-devel libswscale-devel libresample-devel usrsctp-devel`安装依赖项\n'
|
||||||
})
|
})
|
||||||
|
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
@ -43,10 +43,10 @@ jobs:
|
|||||||
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
||||||
path: release/*
|
path: release/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 90
|
||||||
|
|
||||||
- name: issue评论
|
- name: issue评论
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/feature/test'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
2
.github/workflows/style.yml
vendored
2
.github/workflows/style.yml
vendored
@ -4,7 +4,7 @@ on: [pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -45,10 +45,10 @@ jobs:
|
|||||||
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
name: ${{ github.workflow }}_${{ env.BRANCH }}_${{ env.DATE }}
|
||||||
path: release/*
|
path: release/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 90
|
||||||
|
|
||||||
- name: issue评论
|
- name: issue评论
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/feature/test'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user