Refactor CodeQL workflow for improved clarity #10
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: opensuse build workflows | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| paths: | |
| - 'XEngine_Source/**' | |
| - 'XEngine_Release/**' | |
| - '.github/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.runner }} | |
| container: | |
| image: opensuse/leap:${{ matrix.version }} | |
| options: --platform=${{ matrix.platform }} | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| version: 16.0 | |
| artifact: x86-64 | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| version: 16.0 | |
| artifact: Arm64 | |
| steps: | |
| - name: Checkout main repository code | |
| uses: actions/checkout@v7 | |
| - name: Checkout dependency repository (xengine) | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: libxengine/libxengine | |
| path: libxengine | |
| - name: sub module checkout (opensource) | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: libxengine/XEngine_OPenSource | |
| path: XEngine_Source/XEngine_DependLibrary | |
| - name: install system package | |
| run: | | |
| zypper --non-interactive update -y | |
| zypper install -y gcc gcc-c++ make git jq unzip wget | |
| - name: Set TERM variable | |
| run: echo "TERM=xterm" >> $GITHUB_ENV | |
| - name: install xengine library | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| latest_tag=$(curl -s -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name) | |
| wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_OpenSuse_${{ matrix.version }}_${{ matrix.artifact }}.zip | |
| unzip ./XEngine_OpenSuse_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_OpenSuse_${{ matrix.version }}_${{ matrix.artifact }} | |
| cd XEngine_OpenSuse_${{ matrix.version }}_${{ matrix.artifact }} | |
| chmod 777 * | |
| ./XEngine_LINEnv.sh -i 3 | |
| - 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 |