Repository navigation
DO NOT MERGE: skip other jobs #5160
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: CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| pull_request: | |
| branches: | |
| - 'master' | |
| permissions: {} | |
| concurrency: | |
| group: build-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| gcc: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - version: 14 | |
| distro: ubuntu-26.04-riscv | |
| - version: 14 | |
| distro: ubuntu-26.04-riscv | |
| arch_flags: -O3 | |
| - version: 14 | |
| distro: ubuntu-26.04-riscv | |
| plain: true | |
| runs-on: ${{ matrix.distro }} | |
| env: | |
| CFLAGS: ${{ matrix.arch_flags }} ${{ case( | |
| matrix.plain == true, '-Wall -Wextra -Werror', | |
| '-march=native -Wall -Wextra -Werror') }} | |
| CXXFLAGS: ${{ matrix.arch_flags }} ${{ case( | |
| matrix.plain == true, '-Wall -Wextra -Werror', | |
| '-march=native -Wall -Wextra -Werror') }} | |
| CCBIN: ${{ | |
| case( | |
| matrix.gcc == '', format('gcc-{0}', matrix.version), | |
| format('{0}-gcc-{1}', matrix.gcc, matrix.version) | |
| ) }} | |
| CXXBIN: ${{ | |
| case( | |
| matrix.gcc == '', format('g++-{0}', matrix.version), | |
| format('{0}-g++-{1}', matrix.gcc, matrix.version) | |
| ) }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - id: cpu | |
| name: CPU Information | |
| run: | | |
| cat /proc/cpuinfo | |
| - name: enable armhf | |
| if: ${{ contains(matrix.gcc,'arm-linux-gnueabihf') }} | |
| run: sudo dpkg --add-architecture armhf && sudo apt-get update && sudo apt-get install -y libstdc++6:armhf | |
| - if: ${{ contains(matrix.distro, 'ubuntu-24.04') && ( matrix.version == '15' )}} | |
| run: sudo add-apt-repository ppa:daawesomep/toolchain-backports-noble | |
| - name: Install APT Dependencies | |
| run: | | |
| sudo add-apt-repository ppa:ccache-backports/ccache-backports-ppa | |
| sudo apt-get -y install --no-install-recommends pipx ninja-build \ | |
| ccache gcc-${{ case(matrix.gcc == '', matrix.version, format('{0}-{1}', matrix.version, matrix.gcc)) }} \ | |
| g++-${{ case(matrix.gcc == '', matrix.version, format('{0}-{1}', matrix.version, matrix.gcc)) }} | |
| sudo apt-get -y purge g++ gcc | |
| pipx install meson==1.3.2 | |
| - if: ${{ matrix.version == '15' }} | |
| run: sudo apt-get satisfy -y 'binutils (>= 2.45)' | |
| - name: reformat arch flags | |
| id: cache-key-hasher | |
| run: echo hash="$(echo ${{ matrix.version }}-${{ matrix.distro }}-"${CFLAGS}" | sha1sum -)" >> "$GITHUB_OUTPUT" | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 | |
| with: | |
| key: ${{ github.job }}-${{ steps.cache-key-hasher.outputs.hash }} | |
| verbose: 2 | |
| - name: add ccache to the build path | |
| run: | | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| sudo ln -s "/usr/bin/${CCBIN}" /usr/bin/gcc | |
| sudo ln -s "/usr/bin/${CXXBIN}" /usr/bin/g++ | |
| - name: Configure | |
| run: meson setup build || (cat build/meson-logs/meson-log.txt ; false) | |
| - name: Build | |
| run: meson compile -C build --verbose | |
| - name: Test | |
| run: | | |
| # shellcheck disable=SC2046 | |
| meson test -C build --print-errorlogs | |
| clang: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - version: "18" | |
| distro: ubuntu-26.04-riscv | |
| arch_flags: -Wno-unsafe-buffer-usage -Wno-switch-default | |
| - version: "18" | |
| distro: ubuntu-26.04-riscv | |
| plain: true | |
| arch_flags: -Wno-unsafe-buffer-usage -Wno-switch-default | |
| - version: "18" | |
| distro: ubuntu-26.04-riscv | |
| arch_flags: -ffast-math -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-nan-infinity-disabled | |
| - version: "18" | |
| distro: ubuntu-26.04-riscv | |
| arch_flags: -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-c++-keyword -O2 | |
| runs-on: ${{ matrix.distro }} | |
| env: | |
| CFLAGS: ${{ matrix.arch_flags }} ${{ case( | |
| matrix.plain == true, '-Wall -Weverything -Werror', | |
| '-march=native -Wall -Weverything -Werror') }} -fno-lax-vector-conversions | |
| CXXFLAGS: ${{ matrix.arch_flags }} ${{ case( | |
| matrix.plain == true, '-Wall -Weverything -Werror', | |
| '-march=native -Wall -Weverything -Werror') }} -fno-lax-vector-conversions | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - id: cpu | |
| name: CPU Information | |
| run: | | |
| cat /proc/cpuinfo | |
| - name: enable armhf | |
| if: ${{ matrix.pkg == 'g++-arm-linux-gnueabihf' }} | |
| run: sudo dpkg --add-architecture armhf && sudo apt-get update && sudo apt-get install -y libstdc++6:armhf | |
| - name: Install newer clang | |
| if: ${{ fromJSON(matrix.version) >= '21' }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh ${{ matrix.version }} | |
| - name: Install APT Dependencies | |
| run: | | |
| sudo add-apt-repository ppa:ccache-backports/ccache-backports-ppa | |
| sudo apt-get -y --no-install-recommends install ninja-build pipx \ | |
| clang-${{ matrix.version }} ccache ${{ matrix.pkg }} | |
| pipx install meson==1.3.2 | |
| sudo rm /usr/bin/gcc /usr/bin/g++ /usr/bin/cc /usr/bin/c++ | |
| sudo ln -s "$(command -v clang-${{ matrix.version }})" /usr/bin/cc | |
| sudo ln -s "$(command -v clang-${{ matrix.version }})" /usr/bin/c++ | |
| - name: reformat arch flags | |
| id: cache-key-hasher | |
| run: echo hash="$(echo ${{ matrix.version }}-${{ matrix.distro }}-"${CFLAGS}" | sha1sum -)" >> "$GITHUB_OUTPUT" | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 | |
| with: | |
| key: ${{ github.job }}-${{ steps.cache-key-hasher.outputs.hash }} | |
| verbose: 2 | |
| - name: add ccache to the build path | |
| run: | | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| - name: Configure | |
| run: meson setup build || (cat build/meson-logs/meson-log.txt ; false) | |
| - name: Build | |
| run: meson compile -C build --verbose | |
| - name: Test | |
| run: | | |
| # shellcheck disable=SC2046 | |
| meson test -C build --print-errorlogs |