Merge pull request #679 from mg-mburetorp/fix-mm_round #432
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: GitHub Actions | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| host-x86: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| arch: [x86_64] | |
| cxx_compiler: [g++, clang++-18] | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: install build dependencies | |
| run: | | |
| sudo apt-get update -q -y | |
| sudo apt-get install -q -y clang-18 | |
| - name: build artifact | |
| env: | |
| CXX: ${{ matrix.cxx_compiler }} | |
| run: | | |
| sh .ci/cross-tool.sh | |
| make check | |
| sh .ci/cross-check.sh | |
| host-win: | |
| runs-on: windows-2022 | |
| strategy: | |
| matrix: | |
| arch: | |
| - x86_64 | |
| - armv7 | |
| - aarch64 | |
| env: | |
| LLVM_MINGW_URL: https://github.com/mstorsjo/llvm-mingw/releases/download/20251118/llvm-mingw-20251118-msvcrt-x86_64.zip | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: unpack llvm-mingw | |
| run: | | |
| curl -L -O $LLVM_MINGW_URL | |
| unzip -q llvm-mingw-*.zip | |
| rm llvm-mingw-*.zip | |
| mv llvm-mingw-* "$HOME/llvm-mingw" | |
| echo "$HOME/llvm-mingw/bin" >> $GITHUB_PATH | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: build artifact | |
| env: | |
| CXX: ${{ matrix.arch }}-w64-mingw32-clang++ | |
| run: mingw32-make processor=${{ matrix.arch }} | |
| - name: run tests | |
| if: matrix.arch == 'x86_64' | |
| run: mingw32-make check | |
| host-arm: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| arch_with_features: [ | |
| {arch: armv7, feature: none, arch_cflags: none}, | |
| {arch: aarch64, feature: none, arch_cflags: none}, | |
| {arch: aarch64, feature: crypto+crc, arch_cflags: none}, | |
| {arch: armv7, feature: none, arch_cflags: '-mcpu=cortex-a32 -mfpu=neon-fp-armv8'} | |
| ] | |
| cxx_compiler: [g++, clang++-18] | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: build artifact | |
| # The Github Action for non-x86 CPU | |
| # https://github.com/uraimo/run-on-arch-action | |
| uses: uraimo/run-on-arch-action@v3 | |
| with: | |
| arch: ${{ matrix.arch_with_features.arch }} | |
| distro: ubuntu24.04 | |
| # Speed up builds by storing container images in a GitHub package registry. | |
| githubToken: ${{ github.token }} | |
| env: | | |
| CXX: ${{ matrix.cxx_compiler }} | |
| ARCH_CFLAGS: ${{ matrix.arch_with_features.arch_cflags }} | |
| install: | | |
| rm -rf /var/lib/apt/lists/* | |
| apt-get -o Acquire::Retries=5 update | |
| apt-get -o Acquire::Retries=5 -o Dpkg::Use-Pty=0 install -y --no-install-recommends clang-18 gcc g++ make | |
| apt-get clean && rm -rf /var/lib/apt/lists/* | |
| run: | | |
| make FEATURE=${{ matrix.arch_with_features.feature }} check | |
| host-win-msvc: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: build artifact | |
| run: msbuild sse2neon.vcxproj -t:rebuild -property:Configuration=Release -property:Platform=ARM64 | |
| - name: upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: msvc-arm64-artifact | |
| path: ARM64 | |
| test-win-msvc: | |
| runs-on: ubuntu-24.04 | |
| container: linaro/wine-arm64 | |
| needs: host-win-msvc | |
| steps: | |
| - name: download artifact | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: msvc-arm64-artifact | |
| - name: Run tests | |
| run: wine-arm64 cmd.exe /c 'Release\sse2neon.exe' | |
| coding-style: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: style check | |
| run: | | |
| sudo apt-get install -q -y clang-format-18 | |
| sh .ci/check-format.sh | |
| shell: bash |