Skip to content

Commit

Permalink
Merge pull request #28 from libxengine/develop
Browse files Browse the repository at this point in the history
V2.10.0.1001 Merge
  • Loading branch information
xengine-qyt authored Jan 24, 2025
2 parents 35eb670 + cbb20f7 commit 5571c0c
Show file tree
Hide file tree
Showing 59 changed files with 794 additions and 304 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CodeQL Advanced

on:
push:
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

jobs:
analyze:
runs-on: ubuntu-24.04
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 'develop'

- name: Checkout dependency repository (xengine)
uses: actions/checkout@v4
with:
repository: libxengine/libxengine
path: libxengine

- name: sub module checkout (opensource)
run: |
git submodule init
git submodule update
- name: Set up Dependency Environment
run: |
cd libxengine
chmod +x ./XEngine_LINEnv.sh
sudo ./XEngine_LINEnv.sh -i 3
- name: install library
run: sudo apt install libsrt-gnutls-dev libsrtp2-dev -y

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: make
run: |
cd XEngine_Source
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
35 changes: 35 additions & 0 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: cpp check workflows

on:
push:
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout main repository code
uses: actions/checkout@v4
with:
ref: 'develop'

- name: Create static_analysis directory
run: mkdir -p static_analysis

- name: Run Cppcheck
run: |
sudo apt-get install -y cppcheck
cppcheck --enable=all --language=c++ --std=c++20 ./XEngine_Source/ --output-file=static_analysis/log.xml --xml
continue-on-error: true

- name: Upload Cppcheck Results
uses: actions/upload-artifact@v4
with:
name: cppcheck_results
path: static_analysis/log.xml
15 changes: 15 additions & 0 deletions .github/workflows/issue-translator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Issue Translator
on:
issue_comment:
types: [created]
issues:
types: [opened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: usthe/[email protected]
with:
IS_MODIFY_TITLE: false
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically.
67 changes: 0 additions & 67 deletions .github/workflows/linuxbuild.yml

This file was deleted.

56 changes: 46 additions & 10 deletions .github/workflows/macbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ name: macos build workflows

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

permissions:
contents: read

Expand All @@ -15,6 +18,7 @@ jobs:
matrix:
include:
- os: macos-13
- os: macos-14
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -23,7 +27,6 @@ jobs:
with:
ref: 'develop'

# 检出依赖的xengine仓库到指定的xengine目录
- name: Checkout dependency repository (xengine)
uses: actions/checkout@v4
with:
Expand All @@ -41,14 +44,29 @@ jobs:
- name: install library
run: brew install srt srtp

# 设置依赖库的环境变量
- name: Set up Dependency Environment Variables
- name: Set up Dependency x86_64 Environment
if: matrix.os == 'macos-13'
run: |
cd libxengine
chmod 777 *
./XEngine_LINEnv.sh -i 3
cd ..
#编译
- name: Set up Dependency Arm64 Environment
if: matrix.os == 'macos-14'
run: |
cd libxengine
chmod 777 *
./XEngine_LINEnv.sh -i 0
latest_tag=$(git ls-remote --tags --sort="v:refname" https://github.com/libxengine/libxengine.git | awk '{print $2}' | sed 's/refs\/tags\///' | tail -n 1)
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Mac_Arm64.zip
unzip ./XEngine_Mac_Arm64.zip -d ./XEngine_Mac_Arm64
cd XEngine_Mac_Arm64
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib
sudo cp -rf ./XEngine_Include /usr/local/include
sudo find ./XEngine_Mac -name "*.dylib" -exec cp {} /usr/local/lib \;
- name: make debug
run: |
cd XEngine_Source
Expand All @@ -61,6 +79,24 @@ jobs:
make PLATFORM=mac RELEASE=1
make PLATFORM=mac FLAGS=InstallAll
make PLATFORM=mac FLAGS=CleanAll
- name: test
- name: test (srt bug on macos-arm64,not run)
if: matrix.os == 'macos-13'
run: |
cd XEngine_Release
./XEngine_StreamMediaApp -t
- name: Upload folder as artifact with mac x64
if: matrix.os == 'macos-13'
uses: actions/upload-artifact@v4
with:
name: XEngine_StreamMediaApp-x86_64-Mac
path: XEngine_Release/
retention-days: 3
- name: Upload folder as artifact with mac arm
if: matrix.os == 'macos-14'
uses: actions/upload-artifact@v4
with:
name: XEngine_StreamMediaApp-Arm64-Mac
path: XEngine_Release/
retention-days: 3
Loading

0 comments on commit 5571c0c

Please sign in to comment.