update:depend library #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: rocky build workflows | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| paths: | |
| - 'XEngine_Source/**' | |
| - 'XEngine_Release/**' | |
| - '.github/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.runner }} | |
| container: | |
| image: rockylinux/rockylinux:9.5 | |
| options: --platform ${{ matrix.platform }} | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| artifact_suffix: x86-64 | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm # 注意:GitHub Actions 可能没有直接的 ubuntu-24.04-arm 运行器,你可能需要使用支持 ARM 的自托管运行器或选择其他支持 ARM 的 GitHub 托管运行器,例如 ubuntu-latest 并指定 ARM 架构。这里暂时保留,但请注意检查可用性。如果使用 GitHub 托管的 ARM 运行器,可能不需要指定 container.options --platform。 | |
| platform: linux/arm64 | |
| artifact_suffix: Arm64 | |
| steps: | |
| # 检出您的主仓库代码 | |
| - name: Checkout main repository code | |
| uses: actions/checkout@v4 | |
| # 检出依赖的xengine仓库到指定的xengine目录 | |
| - name: Checkout dependency repository (xengine) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: libxengine/libxengine | |
| path: libxengine | |
| - name: sub module checkout (opensource) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: libxengine/XEngine_OPenSource | |
| path: XEngine_Source/XEngine_Depend | |
| - name: install system package | |
| run: | | |
| dnf update -y | |
| dnf install gcc g++ make git jq unzip -y | |
| # 设置依赖库的环境变量 | |
| - name: Set up Dependency rocky linux Environment | |
| run: | | |
| cd libxengine | |
| chmod 777 * | |
| ./XEngine_LINEnv.sh -i 0 | |
| - name: install xengine library | |
| run: | | |
| latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name) | |
| wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_${{ matrix.artifact_suffix }}.zip | |
| unzip ./XEngine_RockyLinux_9_${{ matrix.artifact_suffix }}.zip -d ./XEngine_RockyLinux_9_${{ matrix.artifact_suffix }} | |
| cd XEngine_RockyLinux_9_${{ matrix.artifact_suffix }} | |
| cp -rf ./XEngine_Include /usr/local/include | |
| find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \; | |
| ldconfig | |
| #编译 | |
| - name: make | |
| run: | | |
| cd XEngine_Source | |
| make | |
| make FLAGS=InstallAll | |
| make FLAGS=CleanAll | |
| make RELEASE=1 | |
| make FLAGS=InstallAll | |
| make FLAGS=CleanAll | |
| cd .. | |
| - name: test | |
| run: | | |
| cd XEngine_Release | |
| ./XEngine_CenterApp -t | |
| ./XEngine_Http2App -t | |
| ./XEngine_HttpApp -t | |
| ./XEngine_SimpleApp -t | |
| ./XEngine_WebSocketApp -t |