clang 21 build compatibility #218
Workflow file for this run
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: XMake | |
| on: | |
| push: | |
| branches: ["*"] | |
| jobs: | |
| linux-gcc-x64: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| version: [12, 13, 14] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: seanmiddleditch/gha-setup-ninja@v4 | |
| - name: Install XMake | |
| run: | | |
| sudo add-apt-repository ppa:xmake-io/xmake | |
| sudo apt-get -y update | |
| sudo apt-get -y install xmake | |
| - name: Install Toolchains PPA | |
| run: | | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt-get -y update | |
| - name: Install GCC | |
| run: sudo apt-get -y install gcc-${{matrix.version}} g++-${{matrix.version}} | |
| - name: Configure | |
| working-directory: ${{github.workspace}} | |
| run: xmake f -c -y --toolchain=gcc-${{matrix.version}} --hyperion_enable_tracy=y | |
| - name: Build | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: xmake b | |
| - name: Test | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: xmake test -v | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Install Package | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| run: | | |
| xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git" | |
| xrepo update-repo -y | |
| xrepo install -y --toolchain=gcc-${{matrix.version}} "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| xrepo install -y --toolchain=gcc-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| linux-clang-x64: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| version: [16, 17, 18, 19, 20] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: seanmiddleditch/gha-setup-ninja@v4 | |
| - name: Install XMake | |
| run: | | |
| sudo add-apt-repository ppa:xmake-io/xmake | |
| sudo apt-get -y update | |
| sudo apt-get -y install xmake | |
| - name: Install LLVM and Clang | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| if [[ ${{matrix.version}} == 20 \ | |
| ]]; then | |
| sudo ./llvm.sh ${{matrix.version}} | |
| sudo apt-get install -y clang-tidy-${{matrix.version}} | |
| else | |
| sudo apt-get install -y llvm-${{matrix.version}} clang-${{matrix.version}} clang-tidy-${{matrix.version}} | |
| fi | |
| - name: Replace clang-tidy | |
| run: | | |
| if [[ "$(realpath --canonicalize-existing /usr/bin/clang-tidy-${{matrix.version}})" \ | |
| != "$(realpath --canonicalize-existing /usr/bin/clang-tidy)" \ | |
| ]]; then | |
| sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f | |
| fi | |
| - name: Configure | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| rm -rf build .xmake | |
| xmake f -c -y --toolchain=clang-${{matrix.version}} --hyperion_enable_tracy=y | |
| - name: Build | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| xmake b | |
| xmake check clang.tidy | |
| - name: Test | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: xmake test -v | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Install Package | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| run: | | |
| xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git" | |
| xrepo update-repo -y | |
| xrepo install -y --toolchain=clang-${{matrix.version}} "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| xrepo install -y --toolchain=clang-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| windows-msvc-x64: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: seanmiddleditch/gha-setup-ninja@v4 | |
| - name: Setup scoop | |
| uses: MinoruSekine/setup-scoop@v2 | |
| with: | |
| buckets: extras | |
| scoop_checkup: true | |
| scoop_update: true | |
| update_path: true | |
| - name: Setup MSVC | |
| uses: TheMrMilchmann/setup-msvc-dev@v3 | |
| with: | |
| arch: x64 | |
| - name: Install XMake | |
| run: | | |
| scoop install xmake | |
| - name: Configure | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| xmake f -c -y --toolchain=msvc --hyperion_enable_tracy=y | |
| - name: Build | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: xmake b | |
| - name: Test | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: xmake test -v | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Install Package | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| run: | | |
| xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git" | |
| xrepo update-repo -y | |
| xrepo install -y --toolchain=msvc "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| xrepo install -y --toolchain=msvc --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| macos-clang-x64: | |
| runs-on: macos-13 | |
| strategy: | |
| matrix: | |
| version: [16, 17, 18, 19, 20] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: seanmiddleditch/gha-setup-ninja@v4 | |
| - name: Install XMake | |
| run: | | |
| brew update | |
| brew install xmake | |
| - name: Install LLVM | |
| run: | | |
| brew install llvm@${{matrix.version}} | |
| echo "$(brew --prefix llvm@${{matrix.version}})/bin" | |
| ln -s "$(brew --prefix llvm@${{matrix.version}})/bin/clang++" "$(brew --prefix llvm@${{matrix.version}})/bin/clang++-${{matrix.version}}" | |
| ls "$(brew --prefix llvm@${{matrix.version}})/bin" | |
| echo "$(brew --prefix llvm@${{matrix.version}})/bin" >> $GITHUB_PATH | |
| - name: Configure | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| xmake show -l toolchains | |
| xmake f -c -y --toolchain=clang-${{matrix.version}} --hyperion_enable_tracy=y | |
| xmake project -k compile_commands | |
| sed -i '' 's/"-I"/"-isystem"/g' compile_commands.json | |
| cat compile_commands.json | |
| - name: Build | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| xmake b | |
| # disable clang-tidy on clang 19 and 20 because it is scanning errors | |
| # within standard library headers | |
| if [[ ${{matrix.version}} != 19 && ${{matrix.version}} != 20 \ | |
| ]]; then | |
| xmake check clang.tidy | |
| fi | |
| - name: Test | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| working-directory: ${{github.workspace}} | |
| run: xmake test -v | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Install Package | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| run: | | |
| xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git" | |
| xrepo update-repo -y | |
| xrepo install -y --toolchain=clang-${{matrix.version}} "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |
| xrepo install -y --toolchain=clang-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}" | |