mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support utest and regression-test when release. v4.0.156
This commit is contained in:
parent
640436d8a6
commit
2fdb06299c
4 changed files with 43 additions and 14 deletions
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
|
@ -12,9 +12,27 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
################################################################
|
||||
# Git checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
################################################################
|
||||
# Tests
|
||||
- name: Build test image
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/v3') }}
|
||||
run: docker build --tag srs:test -f trunk/Dockerfile.test trunk
|
||||
# For utest
|
||||
- name: Run SRS utest
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/v3') }}
|
||||
run: docker run --rm srs:test bash -c 'make && ./objs/srs_utest'
|
||||
# For regression-test
|
||||
- name: Run SRS regression-test
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/v3') }}
|
||||
run: docker run --rm srs:test bash -c 'make && ./objs/srs -c conf/regression-test.conf && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
|
||||
|
||||
################################################################
|
||||
# Build
|
||||
# The github.ref is, for example, refs/tags/v3.0.145 or refs/tags/v3.0-r8
|
||||
# Generate variables like:
|
||||
# SRS_TAG=v3.0.145
|
||||
|
@ -22,31 +40,30 @@ jobs:
|
|||
# SRS_MAJOR=3
|
||||
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
||||
- name: Generate varaiables
|
||||
shell: bash
|
||||
run: |
|
||||
SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}')
|
||||
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
|
||||
SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
|
||||
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
|
||||
|
||||
- name: Build SRS
|
||||
shell: bash
|
||||
# Build SRS image
|
||||
- name: Build SRS docker image
|
||||
run: |
|
||||
echo "Release ossrs/srs:$SRS_TAG"
|
||||
docker build --tag ossrs/srs:$SRS_TAG trunk
|
||||
|
||||
################################################################
|
||||
# Docker
|
||||
- name: Login docker hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: "${{ secrets.DOCKER_USERNAME }}"
|
||||
password: "${{ secrets.DOCKER_PASSWORD }}"
|
||||
- name: Push to docker hub
|
||||
shell: bash
|
||||
run: |
|
||||
docker push ossrs/srs:$SRS_TAG
|
||||
docker tag ossrs/srs:$SRS_TAG ossrs/srs:$SRS_MAJOR
|
||||
docker push ossrs/srs:$SRS_MAJOR
|
||||
|
||||
# Aliyun ACR
|
||||
- name: Login Aliyun docker hub
|
||||
uses: aliyun/acr-login@v1
|
||||
with:
|
||||
|
@ -54,30 +71,28 @@ jobs:
|
|||
username: "${{ secrets.ACR_USERNAME }}"
|
||||
password: "${{ secrets.ACR_PASSWORD }}"
|
||||
- name: Push to Aliyun docker hub
|
||||
shell: bash
|
||||
run: |
|
||||
docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG
|
||||
docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR
|
||||
|
||||
################################################################
|
||||
# K8S
|
||||
- name: Setup KUBCONFIG for Aliyun ACK
|
||||
shell: bash
|
||||
run: |-
|
||||
KUBECONFIG=$RUNNER_TEMP/kubeconfig_$(date +%s)
|
||||
echo "${{ secrets.KUBCONFIG }}" > $KUBECONFIG
|
||||
echo "KUBECONFIG=$KUBECONFIG" >> $GITHUB_ENV
|
||||
|
||||
# K8S for SRS 3.0
|
||||
- name: Release SRS 3.0 to Aliyun ACK
|
||||
shell: bash
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v3') }}
|
||||
run: |-
|
||||
kubectl set image deploy/srs3-deploy srs=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG
|
||||
kubectl describe deploy/srs3-deploy
|
||||
|
||||
# K8S for SRS 4.0
|
||||
- name: Release SRS 4.0 to Aliyun ACK
|
||||
shell: bash
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v4') }}
|
||||
run: |-
|
||||
kubectl set image deploy/srs4-deploy srs4=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG
|
||||
kubectl describe deploy/srs4-deploy
|
||||
kubectl describe deploy/srs4-deploy
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||

|
||||
[](https://github.com/ossrs/srs/actions?query=workflow%3ACodeQL+branch%3A4.0release)
|
||||
[](https://github.com/ossrs/srs/actions/workflows/release.yml?query=workflow%3ARelease)
|
||||
[](https://circleci.com/gh/ossrs/srs/tree/4.0release)
|
||||
[](https://codecov.io/gh/ossrs/srs/branch/4.0release)
|
||||
[](../../wikis/Contact#wechat)
|
||||
|
|
13
trunk/Dockerfile.test
Normal file
13
trunk/Dockerfile.test
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM ossrs/srs:dev
|
||||
|
||||
# Install depends tools.
|
||||
RUN yum install -y gcc make gcc-c++ patch unzip perl git
|
||||
|
||||
# Build and install SRS.
|
||||
COPY . /trunk
|
||||
WORKDIR /trunk
|
||||
RUN ./configure --srt=on --utest=on --jobs=2 && make -j2
|
||||
RUN cd 3rdparty/srs-bench && make
|
||||
|
||||
# Run utest
|
||||
RUN ./objs/srs_utest
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 155
|
||||
#define VERSION_REVISION 156
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue