mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Actions: Fix GitHub actions warnings.
This commit is contained in:
parent
f6e0b1c894
commit
23b7939574
6 changed files with 106 additions and 114 deletions
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|
80
.github/workflows/release.yml
vendored
80
.github/workflows/release.yml
vendored
|
@ -9,12 +9,11 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
envs:
|
envs:
|
||||||
name: envs
|
name: envs
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
steps:
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Git checkout
|
# Git checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
|
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8
|
||||||
# Generate variables like:
|
# Generate variables like:
|
||||||
# SRS_TAG=v5.0-r8
|
# SRS_TAG=v5.0-r8
|
||||||
|
@ -31,14 +30,16 @@ jobs:
|
||||||
echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV
|
echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV
|
||||||
SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
|
SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
|
||||||
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
|
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
|
||||||
outputs:
|
# See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
||||||
SRS_TAG: ${{ env.SRS_TAG }}
|
- name: Set output
|
||||||
SRS_VERSION: ${{ env.SRS_VERSION }}
|
run: |
|
||||||
SRS_MAJOR: ${{ env.SRS_MAJOR }}
|
echo "SRS_TAG=${{ env.SRS_TAG }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "SRS_VERSION=${{ env.SRS_VERSION }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "SRS_MAJOR=${{ env.SRS_MAJOR }}" >> $GITHUB_OUTPUT
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: test
|
name: test
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- envs
|
- envs
|
||||||
steps:
|
steps:
|
||||||
|
@ -51,7 +52,7 @@ jobs:
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Git checkout
|
# Git checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Tests
|
# Tests
|
||||||
- name: Build test image
|
- name: Build test image
|
||||||
|
@ -65,12 +66,10 @@ jobs:
|
||||||
docker run --rm srs:test bash -c 'make && \
|
docker run --rm srs:test bash -c 'make && \
|
||||||
./objs/srs -c conf/regression-test.conf && \
|
./objs/srs -c conf/regression-test.conf && \
|
||||||
cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
|
cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_TEST_DONE: ok
|
|
||||||
|
|
||||||
draft:
|
draft:
|
||||||
name: draft
|
name: draft
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- envs
|
- envs
|
||||||
steps:
|
steps:
|
||||||
|
@ -84,12 +83,14 @@ jobs:
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
outputs:
|
# See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
||||||
SRS_RELEASE_ID: ${{ steps.create_draft.outputs.id }}
|
- name: Set output
|
||||||
|
run: |
|
||||||
|
echo "SRS_RELEASE_ID=${{ steps.create_draft.outputs.id }}" >> $GITHUB_OUTPUT
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
cygwin64:
|
cygwin64:
|
||||||
name: cygwin64
|
name: cygwin64
|
||||||
runs-on: windows-latest
|
|
||||||
needs:
|
needs:
|
||||||
- envs
|
- envs
|
||||||
- draft
|
- draft
|
||||||
|
@ -104,7 +105,7 @@ jobs:
|
||||||
install-dir: C:\cygwin64
|
install-dir: C:\cygwin64
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
- name: Covert output to env
|
- name: Covert output to env
|
||||||
env:
|
env:
|
||||||
|
@ -152,13 +153,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
release_id: ${{ env.SRS_RELEASE_ID }}
|
release_id: ${{ env.SRS_RELEASE_ID }}
|
||||||
assets_path: ${{ env.SRS_CYGWIN_TAR }}
|
assets_path: ${{ env.SRS_CYGWIN_TAR }}
|
||||||
outputs:
|
# See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
||||||
SRS_CYGWIN_TAR: ${{ env.SRS_CYGWIN_TAR }}
|
- name: Set output
|
||||||
SRS_CYGWIN_MD5: ${{ env.SRS_CYGWIN_MD5 }}
|
run: |
|
||||||
|
echo "SRS_CYGWIN_TAR=${{ env.SRS_CYGWIN_TAR }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "SRS_CYGWIN_MD5=${{ env.SRS_CYGWIN_MD5 }}" >> $GITHUB_OUTPUT
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
name: linux
|
name: linux
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- envs
|
- envs
|
||||||
- draft
|
- draft
|
||||||
|
@ -173,7 +176,7 @@ jobs:
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Git checkout
|
# Git checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be
|
# 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.
|
# srs-server-xxx.tar.gz, because the package is named srs-server.
|
||||||
|
@ -219,15 +222,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
release_id: ${{ env.SRS_RELEASE_ID }}
|
release_id: ${{ env.SRS_RELEASE_ID }}
|
||||||
assets_path: ${{ env.SRS_SOURCE_TAR }}
|
assets_path: ${{ env.SRS_SOURCE_TAR }}
|
||||||
outputs:
|
# See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
||||||
SRS_PACKAGE_ZIP: ${{ env.SRS_PACKAGE_ZIP }}
|
- name: Set output
|
||||||
SRS_PACKAGE_MD5: ${{ env.SRS_PACKAGE_MD5 }}
|
run: |
|
||||||
SRS_SOURCE_TAR: ${{ env.SRS_SOURCE_TAR }}
|
echo "SRS_PACKAGE_ZIP=${{ env.SRS_PACKAGE_ZIP }}" >> $GITHUB_OUTPUT
|
||||||
SRS_SOURCE_MD5: ${{ env.SRS_SOURCE_MD5 }}
|
echo "SRS_PACKAGE_MD5=${{ env.SRS_PACKAGE_MD5 }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "SRS_SOURCE_TAR=${{ env.SRS_SOURCE_TAR }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "SRS_SOURCE_MD5=${{ env.SRS_SOURCE_MD5 }}" >> $GITHUB_OUTPUT
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
docker-srs:
|
docker-srs:
|
||||||
name: docker-srs
|
name: docker-srs
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- envs
|
- envs
|
||||||
steps:
|
steps:
|
||||||
|
@ -240,14 +245,14 @@ jobs:
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Git checkout
|
# Git checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||||
# https://github.com/docker/setup-qemu-action
|
# https://github.com/docker/setup-qemu-action
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/setup-buildx-action
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Create main images for Docker
|
# Create main images for Docker
|
||||||
- name: Login to docker hub
|
- name: Login to docker hub
|
||||||
|
@ -273,12 +278,10 @@ jobs:
|
||||||
ossrs/srs:${{ env.SRS_VERSION }}
|
ossrs/srs:${{ env.SRS_VERSION }}
|
||||||
ossrs/srs:${{ env.SRS_MAJOR }}
|
ossrs/srs:${{ env.SRS_MAJOR }}
|
||||||
ossrs/srs:v${{ env.SRS_MAJOR }}
|
ossrs/srs:v${{ env.SRS_MAJOR }}
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_DOCKER_DONE: ok
|
|
||||||
|
|
||||||
aliyun-srs:
|
aliyun-srs:
|
||||||
name: aliyun-srs
|
name: aliyun-srs
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- envs
|
- envs
|
||||||
- docker-srs
|
- docker-srs
|
||||||
|
@ -306,12 +309,10 @@ jobs:
|
||||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_VERSION }}
|
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:${{ env.SRS_MAJOR }}
|
||||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
|
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_ALIYUN_DONE: ok
|
|
||||||
|
|
||||||
update:
|
update:
|
||||||
name: update
|
name: update
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- aliyun-srs
|
- aliyun-srs
|
||||||
- envs
|
- envs
|
||||||
|
@ -325,7 +326,7 @@ jobs:
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Git checkout
|
# Git checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Generate variables like:
|
# Generate variables like:
|
||||||
# SRS_LH_OSSRS_NET=1.2.3.4
|
# SRS_LH_OSSRS_NET=1.2.3.4
|
||||||
|
@ -373,12 +374,10 @@ jobs:
|
||||||
docker rmi -f $image
|
docker rmi -f $image
|
||||||
echo "Remove image $image, r0=$?"
|
echo "Remove image $image, r0=$?"
|
||||||
done
|
done
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_UPDATE_DONE: ok
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: release
|
name: release
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- update
|
- update
|
||||||
- envs
|
- envs
|
||||||
|
@ -402,7 +401,7 @@ jobs:
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Git checkout
|
# Git checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Create release.
|
# Create release.
|
||||||
# TODO: FIXME: Refine the release when 5.0 released
|
# TODO: FIXME: Refine the release when 5.0 released
|
||||||
# TODO: FIXME: Change prerelease to false when 5.0 released
|
# TODO: FIXME: Change prerelease to false when 5.0 released
|
||||||
|
@ -448,6 +447,7 @@ jobs:
|
||||||
* [中文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)
|
* [中文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
|
draft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
done:
|
done:
|
||||||
name: done
|
name: done
|
||||||
|
|
105
.github/workflows/test.yml
vendored
105
.github/workflows/test.yml
vendored
|
@ -17,12 +17,11 @@ on: [push, pull_request]
|
||||||
# build-cross-aarch64(3m)
|
# build-cross-aarch64(3m)
|
||||||
# multiple-arch-amd64(2m)
|
# multiple-arch-amd64(2m)
|
||||||
# utest(3m)
|
# utest(3m)
|
||||||
# coverage(3m) - Must depends on utest.
|
# coverage(3m)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cygwin64-cache:
|
cygwin64-cache:
|
||||||
name: cygwin64-cache
|
name: cygwin64-cache
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download Cache for Cygwin
|
- name: Download Cache for Cygwin
|
||||||
run: |
|
run: |
|
||||||
|
@ -30,17 +29,15 @@ jobs:
|
||||||
tar jcf /srs/objs.tar.bz2 objs &&
|
tar jcf /srs/objs.tar.bz2 objs &&
|
||||||
pwd && du -sh *
|
pwd && du -sh *
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: srs-cache
|
name: srs-cache
|
||||||
path: objs.tar.bz2
|
path: objs.tar.bz2
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_CYGWIN_CACHE_DONE: ok
|
|
||||||
|
|
||||||
cygwin64:
|
cygwin64:
|
||||||
name: cygwin64
|
name: cygwin64
|
||||||
runs-on: windows-latest
|
|
||||||
needs:
|
needs:
|
||||||
- cygwin64-cache
|
- cygwin64-cache
|
||||||
steps:
|
steps:
|
||||||
|
@ -54,10 +51,10 @@ jobs:
|
||||||
install-dir: C:\cygwin64
|
install-dir: C:\cygwin64
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
# Note that we must download artifact after checkout code, because it will change the files in workspace.
|
# Note that we must download artifact after checkout code, because it will change the files in workspace.
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: srs-cache
|
name: srs-cache
|
||||||
- uses: geekyeggo/delete-artifact@v2
|
- uses: geekyeggo/delete-artifact@v2
|
||||||
|
@ -75,17 +72,15 @@ jobs:
|
||||||
tar xf objs.tar.bz2 -C /usr/local/srs-cache/srs/trunk/ && du -sh /usr/local/srs-cache/srs/trunk/* &&
|
tar xf objs.tar.bz2 -C /usr/local/srs-cache/srs/trunk/ && du -sh /usr/local/srs-cache/srs/trunk/* &&
|
||||||
cd ${WORKDIR}/trunk && ./configure --gb28181=on --utest=on && ls -lh && du -sh * && du -sh objs/* &&
|
cd ${WORKDIR}/trunk && ./configure --gb28181=on --utest=on && ls -lh && du -sh * && du -sh objs/* &&
|
||||||
cd ${WORKDIR}/trunk && make utest && ./objs/srs_utest
|
cd ${WORKDIR}/trunk && make utest && ./objs/srs_utest
|
||||||
outputs:
|
runs-on: windows-latest
|
||||||
SRS_CYGWIN_DONE: ok
|
|
||||||
|
|
||||||
build-centos7:
|
build-centos7:
|
||||||
name: build-centos7
|
name: build-centos7
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Build for CentOS 7
|
# Build for CentOS 7
|
||||||
- name: Build on CentOS7, baseline
|
- name: Build on CentOS7, baseline
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-baseline .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-baseline .
|
||||||
|
@ -97,93 +92,83 @@ jobs:
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-no-asm .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-no-asm .
|
||||||
- name: Build on CentOS7, C++98, no FFmpeg
|
- name: Build on CentOS7, C++98, no FFmpeg
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-ansi-no-ffmpeg .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target centos7-ansi-no-ffmpeg .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_BUILD_CENTOS7_DONE: ok
|
|
||||||
|
|
||||||
build-ubuntu16:
|
build-ubuntu16:
|
||||||
name: build-ubuntu16
|
name: build-ubuntu16
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Build for Ubuntu16
|
# Build for Ubuntu16
|
||||||
- name: Build on Ubuntu16, baseline
|
- name: Build on Ubuntu16, baseline
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-baseline .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-baseline .
|
||||||
- name: Build on Ubuntu16, with all features
|
- name: Build on Ubuntu16, with all features
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-all .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-all .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_BUILD_UBUNTU16_DONE: ok
|
|
||||||
|
|
||||||
build-ubuntu18:
|
build-ubuntu18:
|
||||||
name: build-ubuntu18
|
name: build-ubuntu18
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Build for Ubuntu18
|
# Build for Ubuntu18
|
||||||
- name: Build on Ubuntu18, baseline
|
- name: Build on Ubuntu18, baseline
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-baseline .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-baseline .
|
||||||
- name: Build on Ubuntu18, with all features
|
- name: Build on Ubuntu18, with all features
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-all .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu18-all .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_BUILD_UBUNTU18_DONE: ok
|
|
||||||
|
|
||||||
build-ubuntu20:
|
build-ubuntu20:
|
||||||
name: build-ubuntu20
|
name: build-ubuntu20
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Build for Ubuntu20
|
# Build for Ubuntu20
|
||||||
- name: Build on Ubuntu20, baseline
|
- name: Build on Ubuntu20, baseline
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-baseline .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-baseline .
|
||||||
- name: Build on Ubuntu20, with all features
|
- name: Build on Ubuntu20, with all features
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-all .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-all .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_BUILD_UBUNTU20_DONE: ok
|
|
||||||
|
|
||||||
build-cross-arm:
|
build-cross-arm:
|
||||||
name: build-cross-arm
|
name: build-cross-arm
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Cross Build for ARMv7 on Ubuntu16
|
- name: Cross Build for ARMv7 on Ubuntu16
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cross-armv7 .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cross-armv7 .
|
||||||
- name: Cross Build for ARMv7 on Ubuntu20
|
- name: Cross Build for ARMv7 on Ubuntu20
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cross-armv7 .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cross-armv7 .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_BUILD_CROSS_ARM_DONE: ok
|
|
||||||
|
|
||||||
build-cross-aarch64:
|
build-cross-aarch64:
|
||||||
name: build-cross-aarch64
|
name: build-cross-aarch64
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Cross Build for AARCH64 on Ubuntu16
|
- name: Cross Build for AARCH64 on Ubuntu16
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cross-aarch64 .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu16-cross-aarch64 .
|
||||||
- name: Cross Build for AARCH64 on Ubuntu20
|
- name: Cross Build for AARCH64 on Ubuntu20
|
||||||
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cross-aarch64 .
|
run: DOCKER_BUILDKIT=1 docker build -f trunk/Dockerfile.builds --target ubuntu20-cross-aarch64 .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_BUILD_CROSS_AARCH64_DONE: ok
|
|
||||||
|
|
||||||
utest:
|
utest:
|
||||||
name: utest
|
name: utest
|
||||||
runs-on: ubuntu-20.04
|
needs:
|
||||||
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Tests
|
# Tests
|
||||||
- name: Build test image
|
- name: Build test image
|
||||||
run: docker build --tag srs:test -f trunk/Dockerfile.test .
|
run: docker build --tag srs:test -f trunk/Dockerfile.test .
|
||||||
|
@ -196,17 +181,15 @@ jobs:
|
||||||
docker run --rm srs:test bash -c 'make && \
|
docker run --rm srs:test bash -c 'make && \
|
||||||
./objs/srs -c conf/regression-test.conf && \
|
./objs/srs -c conf/regression-test.conf && \
|
||||||
cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
|
cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_UTEST_DONE: ok
|
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
name: coverage
|
name: coverage
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- utest
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# Tests
|
# Tests
|
||||||
- name: Build coverage image
|
- name: Build coverage image
|
||||||
run: docker build --tag srs:cov -f trunk/Dockerfile.cov .
|
run: docker build --tag srs:cov -f trunk/Dockerfile.cov .
|
||||||
|
@ -231,92 +214,86 @@ jobs:
|
||||||
--env SRS_BRANCH=$SRS_BRANCH --env SRS_PR=$SRS_PR --env SRS_SHA=$SRS_SHA --env SRS_PROJECT=$SRS_PROJECT \
|
--env SRS_BRANCH=$SRS_BRANCH --env SRS_PR=$SRS_PR --env SRS_SHA=$SRS_SHA --env SRS_PROJECT=$SRS_PROJECT \
|
||||||
srs:cov bash -c 'make utest && ./objs/srs_utest && bash auto/codecov.sh'
|
srs:cov bash -c 'make utest && ./objs/srs_utest && bash auto/codecov.sh'
|
||||||
#
|
#
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_COVERAGE_DONE: ok
|
|
||||||
|
|
||||||
multiple-arch-armv7:
|
multiple-arch-armv7:
|
||||||
name: multiple-arch-armv7
|
name: multiple-arch-armv7
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||||
# https://github.com/docker/setup-qemu-action
|
# https://github.com/docker/setup-qemu-action
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/setup-buildx-action
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Build multiple archs image
|
- name: Build multiple archs image
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform linux/arm/v7 \
|
docker buildx build --platform linux/arm/v7 \
|
||||||
--output "type=image,push=false" \
|
--output "type=image,push=false" \
|
||||||
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
||||||
|
--build-arg INSTALLDEPENDS="NO" \
|
||||||
-f trunk/Dockerfile .
|
-f trunk/Dockerfile .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_MULTIPLE_ARCH_ARMV7_DONE: ok
|
|
||||||
|
|
||||||
multiple-arch-aarch64:
|
multiple-arch-aarch64:
|
||||||
name: multiple-arch-aarch64
|
name: multiple-arch-aarch64
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||||
# https://github.com/docker/setup-qemu-action
|
# https://github.com/docker/setup-qemu-action
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/setup-buildx-action
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Build multiple archs image
|
- name: Build multiple archs image
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform linux/arm64/v8 \
|
docker buildx build --platform linux/arm64/v8 \
|
||||||
--output "type=image,push=false" \
|
--output "type=image,push=false" \
|
||||||
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
||||||
|
--build-arg INSTALLDEPENDS="NO" \
|
||||||
-f trunk/Dockerfile .
|
-f trunk/Dockerfile .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_MULTIPLE_ARCH_AARCH64_DONE: ok
|
|
||||||
|
|
||||||
multiple-arch-amd64:
|
multiple-arch-amd64:
|
||||||
name: multiple-arch-amd64
|
name: multiple-arch-amd64
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
needs:
|
||||||
- fast
|
- fast
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
||||||
# https://github.com/docker/setup-qemu-action
|
# https://github.com/docker/setup-qemu-action
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/setup-buildx-action
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Build multiple archs image
|
- name: Build multiple archs image
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform linux/amd64 \
|
docker buildx build --platform linux/amd64 \
|
||||||
--output "type=image,push=false" \
|
--output "type=image,push=false" \
|
||||||
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
--build-arg IMAGE=ossrs/srs:ubuntu20-cache \
|
||||||
-f trunk/Dockerfile .
|
-f trunk/Dockerfile .
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_MULTIPLE_ARCH_AMD64_DONE: ok
|
|
||||||
|
|
||||||
fast:
|
fast:
|
||||||
name: fast
|
name: fast
|
||||||
needs:
|
needs:
|
||||||
- cygwin64-cache
|
- cygwin64-cache
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo 'Start fast jobs'
|
- run: echo 'Start fast jobs'
|
||||||
outputs:
|
runs-on: ubuntu-20.04
|
||||||
SRS_FAST_DONE: ok
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
name: done
|
name: done
|
||||||
needs:
|
needs:
|
||||||
- cygwin64
|
- cygwin64
|
||||||
- coverage
|
- coverage
|
||||||
|
- utest
|
||||||
- build-centos7
|
- build-centos7
|
||||||
- build-ubuntu16
|
- build-ubuntu16
|
||||||
- build-ubuntu18
|
- build-ubuntu18
|
||||||
|
|
|
@ -2,10 +2,13 @@ ARG ARCH
|
||||||
ARG IMAGE=ossrs/srs:ubuntu20
|
ARG IMAGE=ossrs/srs:ubuntu20
|
||||||
FROM ${ARCH}${IMAGE} AS build
|
FROM ${ARCH}${IMAGE} AS build
|
||||||
|
|
||||||
|
ARG CONFARGS
|
||||||
|
ARG MAKEARGS
|
||||||
|
ARG INSTALLDEPENDS
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ARG SRS_AUTO_PACKAGER
|
ARG SRS_AUTO_PACKAGER
|
||||||
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}"
|
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}, CONFARGS: ${CONFARGS}, MAKEARGS: ${MAKEARGS}, INSTALLDEPENDS: ${INSTALLDEPENDS}"
|
||||||
|
|
||||||
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
|
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
@ -15,7 +18,9 @@ ENV DEBIAN_FRONTEND noninteractive
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
# Install depends tools.
|
# Install depends tools.
|
||||||
RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5
|
RUN if [[ $INSTALLDEPENDS != 'NO' ]]; then \
|
||||||
|
apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy source code to docker.
|
# Copy source code to docker.
|
||||||
COPY . /srs
|
COPY . /srs
|
||||||
|
@ -24,7 +29,7 @@ WORKDIR /srs/trunk
|
||||||
# Build and install SRS.
|
# Build and install SRS.
|
||||||
# Note that SRT is enabled by default, so we configure without --srt=on.
|
# Note that SRT is enabled by default, so we configure without --srt=on.
|
||||||
# Note that we have copied all files by make install.
|
# Note that we have copied all files by make install.
|
||||||
RUN ./configure --gb28181=on --sanitizer-static=on && make && make install
|
RUN ./configure --gb28181=on --sanitizer-static=on ${CONFARGS} && make ${MAKEARGS} && make install
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# dist
|
# dist
|
||||||
|
|
|
@ -40,6 +40,8 @@ SRS_FFMPEG_FIT=RESERVED
|
||||||
SRS_PREFIX=/usr/local/srs
|
SRS_PREFIX=/usr/local/srs
|
||||||
SRS_DEFAULT_CONFIG=conf/srs.conf
|
SRS_DEFAULT_CONFIG=conf/srs.conf
|
||||||
SRS_JOBS=1
|
SRS_JOBS=1
|
||||||
|
# If enabled, force to use SRS_JOBS for make on linux, however you're able to overwrite by -jN on macOS.
|
||||||
|
SRS_FORCE_MAKE_JOBS=YES
|
||||||
SRS_STATIC=NO
|
SRS_STATIC=NO
|
||||||
# If enabled, link shared libraries for libst.so which uses MPL license.
|
# If enabled, link shared libraries for libst.so which uses MPL license.
|
||||||
# See https://ossrs.net/lts/zh-cn/license#state-threads
|
# See https://ossrs.net/lts/zh-cn/license#state-threads
|
||||||
|
@ -243,6 +245,7 @@ function parse_user_option() {
|
||||||
--help) help=yes ;;
|
--help) help=yes ;;
|
||||||
|
|
||||||
--jobs) SRS_JOBS=${value} ;;
|
--jobs) SRS_JOBS=${value} ;;
|
||||||
|
--force-make-jobs) SRS_FORCE_MAKE_JOBS=${value} ;;
|
||||||
--prefix) SRS_PREFIX=${value} ;;
|
--prefix) SRS_PREFIX=${value} ;;
|
||||||
--config) SRS_DEFAULT_CONFIG=${value} ;;
|
--config) SRS_DEFAULT_CONFIG=${value} ;;
|
||||||
|
|
||||||
|
|
17
trunk/configure
vendored
17
trunk/configure
vendored
|
@ -494,15 +494,22 @@ SRS_PREFIX=${SRS_PREFIX}
|
||||||
SRS_DEFAULT_CONFIG=${SRS_DEFAULT_CONFIG}
|
SRS_DEFAULT_CONFIG=${SRS_DEFAULT_CONFIG}
|
||||||
__REAL_INSTALL=\$(DESTDIR)\$(SRS_PREFIX)
|
__REAL_INSTALL=\$(DESTDIR)\$(SRS_PREFIX)
|
||||||
|
|
||||||
|
SRS_FORCE_MAKE_JOBS=${SRS_FORCE_MAKE_JOBS}
|
||||||
|
END
|
||||||
|
|
||||||
|
if [[ $SRS_FORCE_MAKE_JOBS == YES ]]; then
|
||||||
|
cat << END >> ${SRS_MAKEFILE}
|
||||||
JOBS=\$(shell echo \$(MAKEFLAGS)| grep -qE '\-j[0-9]+' || echo " ${SRS_JOBS}")
|
JOBS=\$(shell echo \$(MAKEFLAGS)| grep -qE '\-j[0-9]+' || echo " ${SRS_JOBS}")
|
||||||
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
|
# the real entry for all platform:
|
||||||
|
cat << END >> ${SRS_MAKEFILE}
|
||||||
|
|
||||||
default: server
|
default: server
|
||||||
|
|
||||||
all: _default
|
all: _default
|
||||||
|
|
||||||
END
|
|
||||||
|
|
||||||
# the real entry for all platform:
|
|
||||||
cat << END >> ${SRS_MAKEFILE}
|
|
||||||
_default: server srs_ingest_hls utest $__mdefaults
|
_default: server srs_ingest_hls utest $__mdefaults
|
||||||
|
|
||||||
help:
|
help:
|
||||||
|
@ -579,7 +586,7 @@ END
|
||||||
|
|
||||||
cat << END >> ${SRS_MAKEFILE}
|
cat << END >> ${SRS_MAKEFILE}
|
||||||
server: _prepare_dir
|
server: _prepare_dir
|
||||||
@echo "Build the SRS server"
|
@echo "Build the SRS server, JOBS=\${JOBS}, FORCE_MAKE_JOBS=${SRS_FORCE_MAKE_JOBS}"
|
||||||
\$(MAKE)\$(JOBS) -f ${SRS_OBJS}/Makefile srs
|
\$(MAKE)\$(JOBS) -f ${SRS_OBJS}/Makefile srs
|
||||||
@bash objs/_srs_build_summary.sh
|
@bash objs/_srs_build_summary.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue