ci:only support arm64 macos build #170
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: macos build workflows | |
| on: | |
| push: | |
| branches: | |
| - 'develop' | |
| paths: | |
| - 'XEngine_Source/**' | |
| - 'XEngine_Release/**' | |
| - '.github/**' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-last | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout main repository code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'develop' | |
| # 检出依赖的xengine仓库到指定的xengine目录 | |
| - 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: install library | |
| run: | | |
| brew install lua opencv qrencode | |
| - name: Set TERM variable | |
| run: echo "TERM=xterm" >> $GITHUB_ENV | |
| - name: Set up Dependency Arm64 Environment | |
| run: | | |
| 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 | |
| chmod 777 * | |
| ./XEngine_LINEnv.sh -i 3 | |
| - name: make debug | |
| run: | | |
| cd XEngine_Source | |
| make PLATFORM=mac | |
| make PLATFORM=mac FLAGS=InstallAll | |
| make PLATFORM=mac FLAGS=CleanAll | |
| - name: make release | |
| run: | | |
| cd XEngine_Source | |
| make PLATFORM=mac RELEASE=1 | |
| make PLATFORM=mac FLAGS=InstallAll | |
| make PLATFORM=mac FLAGS=CleanAll | |
| - name: test | |
| run: | | |
| cd XEngine_Release | |
| chmod 777 copydb.sh | |
| ./copydb.sh | |
| ./XEngine_APIServiceApp -t | |
| - name: Upload folder as artifact with mac arm | |
| if: matrix.os == 'macos-14' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: XEngine_APIServiceApp-Mac_Arm64 | |
| path: XEngine_Release/ | |
| retention-days: 1 |