Remove obsolete GitHub Actions workflow and run configuration files
- Deleted the entire GitHub Actions workflow file `.github/workflows/test.yml`, which contained various jobs for building and testing the SRS project across multiple platforms and configurations. - Removed multiple run configuration files from the `.run` directory, including `env.run.xml`, `gb28181.run.xml`, `ingest.run.xml`, `private.run.xml`, `regression-test.run.xml`, `srs-stack.run.xml`, `srs.run.xml`, `srt.run.xml`, and `utest.run.xml`, which were used for configuring different run settings in the project.
This commit is contained in:
parent
b6348581e8
commit
bf4ea37ea3
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
|
|
@ -1,12 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with patreon id.
|
||||
open_collective: srs-server
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ""
|
||||
labels: bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
!!! Before submitting a new bug report, please ensure you have searched for any existing bugs. Duplicate issues or
|
||||
questions that are overly simple or already addressed in the documentation will be removed without any
|
||||
response.
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Version**
|
||||
Desribe your SRS Server version here.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ""
|
||||
labels: feature
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
!!! Before submitting a new feature request, please ensure you have searched for any existing features. Duplicate issues or questions that are overly simple or already addressed in the documentation will be removed without any response.
|
||||
|
||||
**What is the business background? Please provide a description.**
|
||||
Who are the users? How do they utilize this feature? What problem does this feature address?
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
37
.github/workflows/codeql-analysis.yml
vendored
37
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -1,37 +0,0 @@
|
|||
name: "CodeQL"
|
||||
|
||||
# @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
|
||||
on: [push, pull_request]
|
||||
|
||||
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: actions-codeql-analyze
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ["cpp"]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@515828d97454b8354517688ddc5b48402b723750 # v2.1.38
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Build SRS
|
||||
run: |
|
||||
echo "pwd: $(pwd), who: $(whoami)"
|
||||
docker run --rm -v $(pwd):$(pwd) -w $(pwd)/trunk ossrs/srs:ubuntu20-cache \
|
||||
bash -c "./configure && chmod 777 -R objs"
|
||||
cd trunk && ./configure && make
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@515828d97454b8354517688ddc5b48402b723750 # v2.1.38
|
||||
481
.github/workflows/release.yml
vendored
481
.github/workflows/release.yml
vendored
|
|
@ -1,481 +0,0 @@
|
|||
name: "Release"
|
||||
|
||||
# @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v7*
|
||||
|
||||
# For draft, need write permission.
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
envs:
|
||||
name: envs
|
||||
steps:
|
||||
##################################################################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# The github.ref is, for example, refs/tags/v6.0.145 or refs/tags/v6.0-r8
|
||||
# Generate variables like:
|
||||
# SRS_TAG=v6.0-r8
|
||||
# SRS_TAG=v6.0.145
|
||||
# SRS_VERSION=6.0.145
|
||||
# SRS_VERSION=6.0-r8
|
||||
# SRS_MAJOR=6
|
||||
# SRS_XYZ=6.0.145
|
||||
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
||||
- name: Generate varaiables
|
||||
run: |
|
||||
SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}')
|
||||
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
|
||||
SRS_VERSION=$(echo ${SRS_TAG}| sed 's/^v//g')
|
||||
echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV
|
||||
SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
|
||||
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
|
||||
VFILE="trunk/src/core/srs_core_version6.hpp"
|
||||
SRS_X=$(cat $VFILE |grep VERSION_MAJOR |awk '{print $3}')
|
||||
SRS_Y=$(cat $VFILE |grep VERSION_MINOR |awk '{print $3}')
|
||||
SRS_Z=$(cat $VFILE |grep VERSION_REVISION |awk '{print $3}')
|
||||
SRS_XYZ=$SRS_X.$SRS_Y.$SRS_Z
|
||||
echo "SRS_XYZ=$SRS_XYZ" >> $GITHUB_ENV
|
||||
# Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
|
||||
outputs:
|
||||
SRS_TAG: ${{ env.SRS_TAG }}
|
||||
SRS_VERSION: ${{ env.SRS_VERSION }}
|
||||
SRS_MAJOR: ${{ env.SRS_MAJOR }}
|
||||
SRS_XYZ: ${{ env.SRS_XYZ }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test:
|
||||
name: test
|
||||
needs:
|
||||
- envs
|
||||
steps:
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
##################################################################################################################
|
||||
# Tests
|
||||
- name: Build test image
|
||||
run: docker build --tag srs:test -f trunk/Dockerfile.test .
|
||||
# For utest
|
||||
- name: Run SRS utest
|
||||
run: docker run --rm srs:test bash -c 'make utest && ./objs/srs_utest'
|
||||
# For regression-test
|
||||
- name: Run SRS regression-test
|
||||
run: |
|
||||
docker run --rm srs:test bash -c 'make && \
|
||||
./objs/srs -c conf/regression-test.conf && sleep 10 && \
|
||||
cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
draft:
|
||||
name: draft
|
||||
needs:
|
||||
- envs
|
||||
steps:
|
||||
- name: Create release draft
|
||||
id: create_draft
|
||||
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
allowUpdates: true
|
||||
tag: ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: true
|
||||
# Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
|
||||
outputs:
|
||||
SRS_RELEASE_ID: ${{ steps.create_draft.outputs.id }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
cygwin64:
|
||||
name: cygwin64
|
||||
needs:
|
||||
- envs
|
||||
- draft
|
||||
steps:
|
||||
# See https://github.com/cygwin/cygwin-install-action#parameters
|
||||
# Note that https://github.com/egor-tensin/setup-cygwin fails to install packages.
|
||||
- name: Setup Cygwin
|
||||
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # master
|
||||
with:
|
||||
platform: x86_64
|
||||
packages: bash make gcc-g++ cmake automake patch pkg-config tcl unzip
|
||||
install-dir: C:\cygwin64
|
||||
##################################################################################################################
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
env:
|
||||
SHELLOPTS: igncr
|
||||
shell: C:\cygwin64\bin\bash.exe --login '{0}'
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
- name: Build SRS
|
||||
env:
|
||||
SHELLOPTS: igncr
|
||||
SRS_WORKSPACE: ${{ github.workspace }}
|
||||
shell: C:\cygwin64\bin\bash.exe --login '{0}'
|
||||
run: |
|
||||
export PATH=/usr/bin:/usr/local/bin &&
|
||||
which make gcc g++ patch cmake pkg-config uname grep sed &&
|
||||
(make --version; gcc --version; patch --version; cmake --version; pkg-config --version) &&
|
||||
(aclocal --version; autoconf --version; automake --version; uname -a) &&
|
||||
cd $(cygpath -u $SRS_WORKSPACE)/trunk && ./configure --gb28181=on --h265=on && make
|
||||
##################################################################################################################
|
||||
- name: Package SRS
|
||||
env:
|
||||
SHELLOPTS: igncr
|
||||
SRS_WORKSPACE: ${{ github.workspace }}
|
||||
shell: C:\cygwin64\bin\bash.exe --login '{0}'
|
||||
run: |
|
||||
cd $(cygpath -u $SRS_WORKSPACE) &&
|
||||
if [[ $(echo $SRS_TAG |grep -qE '^v' && echo YES) != YES ]]; then
|
||||
SRS_VERSION=$(./trunk/objs/srs -v 2>&1); echo "Change version to ${SRS_VERSION}";
|
||||
fi &&
|
||||
"/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" /DSRS_VERSION=${SRS_VERSION} \
|
||||
/DCYGWIN_DIR="C:\cygwin64" trunk/packaging/nsis/srs.nsi &&
|
||||
mv trunk/packaging/nsis/SRS-Windows-x86_64-${SRS_VERSION}-setup.exe . && ls -lh *.exe &&
|
||||
echo "SRS_CYGWIN_TAR=SRS-Windows-x86_64-${SRS_VERSION}-setup.exe" >> $GITHUB_ENV &&
|
||||
echo "SRS_CYGWIN_MD5=$(md5sum SRS-Windows-x86_64-${SRS_VERSION}-setup.exe| awk '{print $1}')" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
- name: Upload Release Assets Cygwin
|
||||
id: upload-release-assets-cygwin
|
||||
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
release_id: ${{ env.SRS_RELEASE_ID }}
|
||||
assets_path: ${{ env.SRS_CYGWIN_TAR }}
|
||||
# Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
|
||||
outputs:
|
||||
SRS_CYGWIN_TAR: ${{ env.SRS_CYGWIN_TAR }}
|
||||
SRS_CYGWIN_MD5: ${{ env.SRS_CYGWIN_MD5 }}
|
||||
runs-on: windows-latest
|
||||
|
||||
linux:
|
||||
name: linux
|
||||
needs:
|
||||
- envs
|
||||
- draft
|
||||
steps:
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
##################################################################################################################
|
||||
# Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be
|
||||
# srs-server-xxx.tar.gz, because the package is named srs-server.
|
||||
# Generate variables like:
|
||||
# SRS_SOURCE_TAR=srs-server-6.0.145.tar.gz
|
||||
# SRS_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5
|
||||
- name: Create source tar.gz
|
||||
run: |
|
||||
DEST_DIR=srs-server-$SRS_VERSION && mkdir -p $DEST_DIR &&
|
||||
cp README.md $DEST_DIR && cp LICENSE $DEST_DIR && cp -R trunk $DEST_DIR/trunk &&
|
||||
(cd $DEST_DIR/trunk/3rdparty && rm -rf *.zip openssl-*.gz srs-bench) &&
|
||||
tar zcf ${DEST_DIR}.tar.gz ${DEST_DIR} && du -sh ${DEST_DIR}* && rm -rf ${DEST_DIR} &&
|
||||
echo "SRS_SOURCE_TAR=${DEST_DIR}.tar.gz" >> $GITHUB_ENV &&
|
||||
echo "SRS_SOURCE_MD5=$(md5sum ${DEST_DIR}.tar.gz| awk '{print $1}')" >> $GITHUB_ENV
|
||||
# Create package tar for release
|
||||
# Generate variables like:
|
||||
# SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-6.0.145.zip
|
||||
# SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5
|
||||
- name: Create package zip
|
||||
env:
|
||||
PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }}
|
||||
run: |
|
||||
docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . &&
|
||||
SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip &&
|
||||
docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ &&
|
||||
du -sh $SRS_PACKAGE_ZIP &&
|
||||
echo "SRS_PACKAGE_ZIP=$SRS_PACKAGE_ZIP" >> $GITHUB_ENV &&
|
||||
echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
- name: Upload Release Assets Packager
|
||||
id: upload-release-assets-packager
|
||||
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
release_id: ${{ env.SRS_RELEASE_ID }}
|
||||
assets_path: ${{ env.SRS_PACKAGE_ZIP }}
|
||||
- name: Upload Release Assets Source
|
||||
id: upload-release-assets-source
|
||||
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
release_id: ${{ env.SRS_RELEASE_ID }}
|
||||
assets_path: ${{ env.SRS_SOURCE_TAR }}
|
||||
# Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
|
||||
outputs:
|
||||
SRS_PACKAGE_ZIP: ${{ env.SRS_PACKAGE_ZIP }}
|
||||
SRS_PACKAGE_MD5: ${{ env.SRS_PACKAGE_MD5 }}
|
||||
SRS_SOURCE_TAR: ${{ env.SRS_SOURCE_TAR }}
|
||||
SRS_SOURCE_MD5: ${{ env.SRS_SOURCE_MD5 }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
docker-srs:
|
||||
name: docker-srs
|
||||
needs:
|
||||
- envs
|
||||
steps:
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||
# https://github.com/docker/setup-qemu-action
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
|
||||
##################################################################################################################
|
||||
# Create main images for Docker
|
||||
- name: Login to docker hub
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
|
||||
with:
|
||||
username: "${{ secrets.DOCKER_USERNAME }}"
|
||||
password: "${{ secrets.DOCKER_PASSWORD }}"
|
||||
- name: Build and push images to Docker hub
|
||||
env:
|
||||
PACKAGER: ${{ secrets.SRS_PACKAGER_DOCKER }}
|
||||
run: |
|
||||
echo "Release ossrs/srs:$SRS_TAG"
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
||||
--output "type=image,push=true" \
|
||||
-t ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER \
|
||||
--build-arg CONFARGS='--sanitizer=off --gb28181=on' \
|
||||
-f Dockerfile .
|
||||
# Docker alias images
|
||||
# TODO: FIXME: If stable, please set the latest from 5.0 to 6.0
|
||||
- name: Docker alias images for ossrs/srs
|
||||
uses: akhilerm/tag-push-action@85bf542f43f5f2060ef76262a67ee3607cb6db37 # v2.1.0
|
||||
with:
|
||||
src: ossrs/srs:${{ env.SRS_TAG }}
|
||||
dst: |
|
||||
ossrs/srs:${{ env.SRS_VERSION }}
|
||||
ossrs/srs:${{ env.SRS_MAJOR }}
|
||||
ossrs/srs:v${{ env.SRS_MAJOR }}
|
||||
ossrs/srs:${{ env.SRS_XYZ }}
|
||||
ossrs/srs:v${{ env.SRS_XYZ }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
aliyun-srs:
|
||||
name: aliyun-srs
|
||||
needs:
|
||||
- envs
|
||||
- docker-srs
|
||||
- test
|
||||
steps:
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
|
||||
# Aliyun ACR
|
||||
# TODO: FIXME: If stable, please set the latest from 5.0 to 6.0
|
||||
- name: Login aliyun hub
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
|
||||
with:
|
||||
registry: registry.cn-hangzhou.aliyuncs.com
|
||||
username: "${{ secrets.ACR_USERNAME }}"
|
||||
password: "${{ secrets.ACR_PASSWORD }}"
|
||||
- name: Push to Aliyun registry for ossrs/srs
|
||||
uses: akhilerm/tag-push-action@85bf542f43f5f2060ef76262a67ee3607cb6db37 # v2.1.0
|
||||
with:
|
||||
src: ossrs/srs:${{ env.SRS_TAG }}
|
||||
dst: |
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_VERSION }}
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_XYZ }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
update:
|
||||
name: update
|
||||
needs:
|
||||
- aliyun-srs
|
||||
- envs
|
||||
steps:
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
##################################################################################################################
|
||||
# Generate variables like:
|
||||
# SRS_LH_OSSRS_NET=1.2.3.4
|
||||
- name: Build variables for lh.ossrs.net
|
||||
run: |
|
||||
SRS_LH_OSSRS_NET=$(dig +short lh.ossrs.net)
|
||||
SRS_D_OSSRS_NET=$(dig +short d.ossrs.net)
|
||||
echo "SRS_LH_OSSRS_NET=$SRS_LH_OSSRS_NET" >> $GITHUB_ENV
|
||||
echo "SRS_D_OSSRS_NET=$SRS_D_OSSRS_NET" >> $GITHUB_ENV
|
||||
- name: Release to lh.ossrs.net
|
||||
uses: appleboy/ssh-action@c1965ddd2563844fddc1ec01cafc798365706143 # master
|
||||
with:
|
||||
host: ${{ env.SRS_LH_OSSRS_NET }}
|
||||
username: root
|
||||
key: ${{ secrets.DIGITALOCEAN_SSHKEY }}
|
||||
port: 22
|
||||
envs: SRS_MAJOR
|
||||
timeout: 60s
|
||||
command_timeout: 30m
|
||||
script: |
|
||||
docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR
|
||||
docker rm -f srs-dev
|
||||
#
|
||||
# Cleanup old docker images.
|
||||
for image in $(docker images |grep '<none>' |awk '{print $3}'); do
|
||||
docker rmi -f $image
|
||||
echo "Remove image $image, r0=$?"
|
||||
done
|
||||
- name: Release to d.ossrs.net
|
||||
uses: appleboy/ssh-action@c1965ddd2563844fddc1ec01cafc798365706143 # master
|
||||
with:
|
||||
host: ${{ env.SRS_D_OSSRS_NET }}
|
||||
username: root
|
||||
key: ${{ secrets.DIGITALOCEAN_SSHKEY }}
|
||||
port: 22
|
||||
envs: SRS_MAJOR
|
||||
timeout: 60s
|
||||
command_timeout: 30m
|
||||
script: |
|
||||
docker pull ossrs/srs:$SRS_MAJOR
|
||||
docker rm -f srs-dev
|
||||
#
|
||||
# Cleanup old docker images.
|
||||
for image in $(docker images |grep '<none>' |awk '{print $3}'); do
|
||||
docker rmi -f $image
|
||||
echo "Remove image $image, r0=$?"
|
||||
done
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
release:
|
||||
name: release
|
||||
needs:
|
||||
- update
|
||||
- envs
|
||||
- draft
|
||||
- cygwin64
|
||||
- linux
|
||||
steps:
|
||||
##################################################################################################################
|
||||
- name: Covert output to env
|
||||
run: |
|
||||
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
|
||||
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
|
||||
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
|
||||
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
|
||||
echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
|
||||
echo "SRS_PACKAGE_ZIP=${{ needs.linux.outputs.SRS_PACKAGE_ZIP }}" >> $GITHUB_ENV
|
||||
echo "SRS_PACKAGE_MD5=${{ needs.linux.outputs.SRS_PACKAGE_MD5 }}" >> $GITHUB_ENV
|
||||
echo "SRS_SOURCE_TAR=${{ needs.linux.outputs.SRS_SOURCE_TAR }}" >> $GITHUB_ENV
|
||||
echo "SRS_SOURCE_MD5=${{ needs.linux.outputs.SRS_SOURCE_MD5 }}" >> $GITHUB_ENV
|
||||
echo "SRS_CYGWIN_TAR=${{ needs.cygwin64.outputs.SRS_CYGWIN_TAR }}" >> $GITHUB_ENV
|
||||
echo "SRS_CYGWIN_MD5=${{ needs.cygwin64.outputs.SRS_CYGWIN_MD5 }}" >> $GITHUB_ENV
|
||||
##################################################################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Create release.
|
||||
# TODO: FIXME: Refine the release when 6.0 released
|
||||
# TODO: FIXME: Change prerelease to false and makeLatest to true when 6.0 released
|
||||
- name: Update release
|
||||
id: update_release
|
||||
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
allowUpdates: true
|
||||
tag: ${{ github.ref }}
|
||||
name: Release ${{ env.SRS_TAG }}
|
||||
body: |
|
||||
If you would like to support SRS, please consider contributing to our [OpenCollective](https://opencollective.com/srs-server).
|
||||
|
||||
[${{ github.sha }}](https://github.com/ossrs/srs/commit/${{ github.sha }})
|
||||
${{ github.event.head_commit.message }}
|
||||
|
||||
## Resource
|
||||
* Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
|
||||
* Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
|
||||
* Binary: ${{ env.SRS_CYGWIN_MD5 }} [${{ env.SRS_CYGWIN_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_CYGWIN_TAR }})
|
||||
|
||||
## Resource Mirror: gitee.com
|
||||
* Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
|
||||
* Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
|
||||
* Binary: ${{ env.SRS_CYGWIN_MD5 }} [${{ env.SRS_CYGWIN_TAR }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_CYGWIN_TAR }})
|
||||
|
||||
## Docker
|
||||
* [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
|
||||
* [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
|
||||
* [docker pull ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
|
||||
|
||||
## Docker Mirror: aliyun.com
|
||||
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
|
||||
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
|
||||
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
|
||||
|
||||
## Doc: ossrs.io
|
||||
* [Getting Started](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
|
||||
* [Wiki home](https://ossrs.io/lts/en-us/docs/v7/doc/introduction)
|
||||
* [FAQ](https://ossrs.io/lts/en-us/faq), [Features](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) or [ChangeLogs](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
|
||||
|
||||
## Doc: ossrs.net
|
||||
* [快速入门](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
|
||||
* [中文Wiki首页](https://ossrs.net/lts/zh-cn/docs/v7/doc/introduction)
|
||||
* [中文FAQ](https://ossrs.net/lts/zh-cn/faq), [功能列表](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) 或 [修订历史](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
|
||||
draft: false
|
||||
prerelease: true
|
||||
makeLatest: false
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
release-done:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- update
|
||||
- release
|
||||
steps:
|
||||
- run: echo 'All done'
|
||||
327
.github/workflows/test.yml
vendored
327
.github/workflows/test.yml
vendored
|
|
@ -1,327 +0,0 @@
|
|||
name: "Test"
|
||||
|
||||
# @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
|
||||
on: [push, pull_request]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
# The dependency graph:
|
||||
# test(6m)
|
||||
# multiple-arch-armv7(13m)
|
||||
# multiple-arch-aarch64(7m)
|
||||
# cygwin64-cache(1m)
|
||||
# cygwin64(6m) - Must depends on cygwin64-cache.
|
||||
# fast(0s) - To limit all fastly run jobs after slow jobs.
|
||||
# build-centos7(3m)
|
||||
# build-ubuntu16(3m)
|
||||
# build-ubuntu18(2m)
|
||||
# build-ubuntu20(2m)
|
||||
# build-cross-arm(3m)
|
||||
# build-cross-aarch64(3m)
|
||||
# multiple-arch-amd64(2m)
|
||||
# coverage(3m)
|
||||
|
||||
jobs:
|
||||
cygwin64-cache:
|
||||
name: cygwin64-cache
|
||||
steps:
|
||||
- name: Download Cache for Cygwin
|
||||
run: |
|
||||
echo "Generate convert.sh" &&
|
||||
echo "for file in \$(find objs -type l); do" > convert.sh &&
|
||||
echo " REAL=\$(readlink -f \$file) &&" >> convert.sh &&
|
||||
echo " echo \"convert \$file to \$REAL\" &&" >> convert.sh &&
|
||||
echo " rm -rf \$file &&" >> convert.sh &&
|
||||
echo " cp -r \$REAL \$file" >> convert.sh &&
|
||||
echo "done" >> convert.sh &&
|
||||
cat convert.sh &&
|
||||
docker run --rm -v $(pwd):/srs -w /usr/local/srs-cache/srs/trunk ossrs/srs:cygwin64-cache \
|
||||
bash -c "bash /srs/convert.sh && tar cf /srs/objs.tar.bz2 objs" &&
|
||||
pwd && du -sh *
|
||||
##################################################################################################################
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: srs-cache
|
||||
path: objs.tar.bz2
|
||||
retention-days: 1
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
cygwin64:
|
||||
name: cygwin64
|
||||
needs:
|
||||
- cygwin64-cache
|
||||
steps:
|
||||
# See https://github.com/cygwin/cygwin-install-action#parameters
|
||||
# Note that https://github.com/egor-tensin/setup-cygwin fails to install packages.
|
||||
- name: Setup Cygwin
|
||||
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # master
|
||||
with:
|
||||
platform: x86_64
|
||||
packages: bash make gcc-g++ cmake automake patch pkg-config tcl unzip
|
||||
install-dir: C:\cygwin64
|
||||
##################################################################################################################
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
##################################################################################################################
|
||||
# Note that we must download artifact after checkout code, because it will change the files in workspace.
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: srs-cache
|
||||
# https://github.com/marketplace/actions/delete-artifact?version=v5.0.0#-compatibility
|
||||
- uses: geekyeggo/delete-artifact@v5.0.0
|
||||
with:
|
||||
name: srs-cache
|
||||
##################################################################################################################
|
||||
- name: Build and test SRS
|
||||
env:
|
||||
SHELLOPTS: igncr
|
||||
SRS_WORKSPACE: ${{ github.workspace }}
|
||||
shell: C:\cygwin64\bin\bash.exe --login '{0}'
|
||||
run: |
|
||||
WORKDIR=$(cygpath -u $SRS_WORKSPACE) && export PATH=/usr/bin:/usr/local/bin && cd ${WORKDIR} &&
|
||||
pwd && rm -rf /usr/local/srs-cache && mkdir -p /usr/local/srs-cache/srs/trunk && ls -lh &&
|
||||
tar xf objs.tar.bz2 -C /usr/local/srs-cache/srs/trunk/ && du -sh /usr/local/srs-cache/srs/trunk/* &&
|
||||
cd ${WORKDIR}/trunk && ./configure --h265=on --gb28181=on --utest=on && ls -lh && du -sh * && du -sh objs/* &&
|
||||
cd ${WORKDIR}/trunk && make utest && ./objs/srs_utest
|
||||
runs-on: windows-latest
|
||||
|
||||
build-centos7:
|
||||
name: build-centos7
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Build for CentOS 7
|
||||
- name: Build on CentOS7, baseline
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-baseline .
|
||||
- name: Build on CentOS7, with all features
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-all .
|
||||
- name: Build on CentOS7, without WebRTC
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-no-webrtc .
|
||||
- name: Build on CentOS7, without ASM
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-no-asm .
|
||||
- name: Build on CentOS7, C++98, no FFmpeg
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-ansi-no-ffmpeg .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
build-ubuntu16:
|
||||
name: build-ubuntu16
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Build for Ubuntu16
|
||||
- name: Build on Ubuntu16, baseline
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-baseline .
|
||||
- name: Build on Ubuntu16, with all features
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-all .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
build-ubuntu18:
|
||||
name: build-ubuntu18
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Build for Ubuntu18
|
||||
- name: Build on Ubuntu18, baseline
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-baseline .
|
||||
- name: Build on Ubuntu18, with all features
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-all .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
build-ubuntu20:
|
||||
name: build-ubuntu20
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Build for Ubuntu20
|
||||
- name: Build on Ubuntu20, baseline
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-baseline .
|
||||
- name: Build on Ubuntu20, with all features
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-all .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
build-cross-arm:
|
||||
name: build-cross-arm
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Cross Build for ARMv7 on Ubuntu16
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cache-cross-armv7 .
|
||||
- name: Cross Build for ARMv7 on Ubuntu20
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cache-cross-armv7 .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
build-cross-aarch64:
|
||||
name: build-cross-aarch64
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Cross Build for AARCH64 on Ubuntu16
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cache-cross-aarch64 .
|
||||
- name: Cross Build for AARCH64 on Ubuntu20
|
||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cache-cross-aarch64 .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test:
|
||||
name: utest-regression-blackbox-test
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Tests
|
||||
- name: Build test image
|
||||
run: docker build --tag srs:test --build-arg MAKEARGS='-j2' -f trunk/Dockerfile.test .
|
||||
# For blackbox-test
|
||||
- name: Run SRS blackbox-test
|
||||
run: |
|
||||
#docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test ./objs/srs_blackbox_test -test.v \
|
||||
# -test.run 'TestFast_RtmpPublish_DvrFlv_Basic' -srs-log -srs-stdout srs-ffmpeg-stderr -srs-dvr-stderr \
|
||||
# -srs-ffprobe-stdout
|
||||
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
|
||||
./objs/srs_blackbox_test -test.v -test.run '^TestFast' -test.parallel 64
|
||||
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
|
||||
./objs/srs_blackbox_test -test.v -test.run '^TestSlow' -test.parallel 1
|
||||
# For utest
|
||||
- name: Run SRS utest
|
||||
run: docker run --rm srs:test ./objs/srs_utest
|
||||
# For regression-test
|
||||
- name: Run SRS regression-test
|
||||
run: |
|
||||
docker run --rm srs:test bash -c './objs/srs -c conf/regression-test.conf && sleep 10 && \
|
||||
cd 3rdparty/srs-bench && (./objs/srs_test -test.v || (cat ../../objs/srs.log && exit 1)) && \
|
||||
./objs/srs_gb28181_test -test.v'
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
coverage:
|
||||
name: coverage
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# Tests
|
||||
- name: Build coverage image
|
||||
run: docker build --tag srs:cov --build-arg MAKEARGS='-j2' -f trunk/Dockerfile.cov .
|
||||
# For coverage
|
||||
- name: Run SRS covergae
|
||||
if: ${{ startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/pull/') }}
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: |
|
||||
# The hash of commit.
|
||||
SRS_SHA=${{ github.sha }}
|
||||
# Note that the root of SRS, must contains .git, for report fixing.
|
||||
SRS_PROJECT=/srs
|
||||
# The github.ref is, for example, refs/heads/develop
|
||||
SRS_BRANCH=$(echo ${{ github.ref }}| awk -F 'refs/heads/' '{print $2}'| awk -F '/' '{print $1}')
|
||||
# The github.ref is, for example, refs/pull/2536/merge
|
||||
SRS_PR=$(echo ${{ github.ref }}| awk -F 'refs/pull/' '{print $2}'| awk -F '/' '{print $1}')
|
||||
#
|
||||
echo "For github.ref=${{ github.ref }}, github.sha=${{ github.sha }}"
|
||||
echo "SRS_BRANCH=$SRS_BRANCH, SRS_PR=$SRS_PR, SRS_SHA=$SRS_SHA, SRS_PROJECT=$SRS_PROJECT"
|
||||
docker run --rm --env CODECOV_TOKEN=$CODECOV_TOKEN --env SRS_BRANCH=$SRS_BRANCH \
|
||||
--env SRS_PR=$SRS_PR --env SRS_SHA=$SRS_SHA --env SRS_PROJECT=$SRS_PROJECT \
|
||||
srs:cov bash -c './objs/srs_utest && bash auto/codecov.sh'
|
||||
#
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
multiple-arch-armv7:
|
||||
name: multiple-arch-armv7
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||
# https://github.com/docker/setup-qemu-action
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
|
||||
- name: Build multiple archs image
|
||||
run: |
|
||||
docker buildx build --platform linux/arm/v7 \
|
||||
--output "type=image,push=false" \
|
||||
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
||||
--build-arg INSTALLDEPENDS="NO" \
|
||||
-f Dockerfile .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
multiple-arch-aarch64:
|
||||
name: multiple-arch-aarch64
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||
# https://github.com/docker/setup-qemu-action
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
|
||||
- name: Build multiple archs image
|
||||
run: |
|
||||
docker buildx build --platform linux/arm64/v8 \
|
||||
--output "type=image,push=false" \
|
||||
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
||||
--build-arg INSTALLDEPENDS="NO" \
|
||||
-f Dockerfile .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
multiple-arch-amd64:
|
||||
name: multiple-arch-amd64
|
||||
needs:
|
||||
- fast
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||
# https://github.com/docker/setup-qemu-action
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
|
||||
- name: Build multiple archs image
|
||||
run: |
|
||||
docker buildx build --platform linux/amd64 \
|
||||
--output "type=image,push=false" \
|
||||
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
||||
-f Dockerfile .
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
fast:
|
||||
name: fast
|
||||
needs:
|
||||
- cygwin64-cache
|
||||
steps:
|
||||
- run: echo 'Start fast jobs'
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-done:
|
||||
needs:
|
||||
- cygwin64
|
||||
- coverage
|
||||
- test
|
||||
- build-centos7
|
||||
- build-ubuntu16
|
||||
- build-ubuntu18
|
||||
- build-ubuntu20
|
||||
- build-cross-arm
|
||||
- build-cross-aarch64
|
||||
- multiple-arch-armv7
|
||||
- multiple-arch-aarch64
|
||||
- multiple-arch-amd64
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- run: echo 'All done'
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="env" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<envs>
|
||||
<env name="SRS_ENV_ONLY" value="on" />
|
||||
<env name="SRS_LISTEN" value="1935" />
|
||||
<env name="SRS_EXPORTER_ENABLED" value="on" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="gb28181" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c conf/gb28181.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ingest" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c conf/clion-ingest.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="private" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c console.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<envs>
|
||||
<env name="MallocNanoZone" value="0" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="regression-test" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c conf/regression-test-for-clion.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="srs-stack" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c containers/conf/srs.release-local.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$USER_HOME$/git/srs-stack/platform" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<envs>
|
||||
<env name="SRS_RTC_SERVER_ENABLED" value="on" />
|
||||
<env name="MallocNanoZone" value="0" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="srs" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c conf/clion.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="srt" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c conf/clion-srt.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="utest" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="utest" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="utest">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
Loading…
Reference in New Issue
Block a user