fix alignment hint #678
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
| on: | |
| workflow_dispatch: # allow running the workflow manually | |
| push: | |
| branches: | |
| - 'dev*' | |
| tags: | |
| - 'v*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true # Cancel any in-progress runs of this workflow when a new run is triggered on the same ref (branch or tag) | |
| name: Test | |
| jobs: | |
| build: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| MIMALLOC_SHOW_ERRORS: 1 | |
| continue-on-error: | |
| ${{ startsWith(matrix.tests,'alpine') || false }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tests: [basic,extra] | |
| os: [windows-latest, macos-latest, ubuntu-latest, macos-14, macos-15-intel, ubuntu-22.04-arm, windows-11-arm] | |
| c_or_cxx: [c, cxx] | |
| exclude: | |
| - os: macos-14 | |
| tests: extra | |
| - c_or_cxx: cxx | |
| tests: extra | |
| include: | |
| - os: ubuntu-latest | |
| tests: tsan | |
| - os: ubuntu-latest | |
| tests: freebsd-x64 | |
| - os: ubuntu-latest | |
| tests: alpine-x64 | |
| - os: ubuntu-latest | |
| tests: alpine-riscv64 # qemu | |
| - os: ubuntu-latest | |
| tests: alpine-arm32 # qemu | |
| - os: windows-latest | |
| tests: mingw-ucrt64 | |
| - os: windows-latest # clang-cl and clang | |
| tests: clang | |
| - os: windows-11-arm # clang-cl and clang | |
| tests: clang | |
| # - os: ubuntu-latest | |
| # tests: android-x64 | |
| # - os: ubuntu-latest # slow, so disable by default | |
| # tests: freebsd-arm64 # qemu | |
| steps: | |
| # Checkout: https://github.com/actions/checkout | |
| - name: Checkout repository | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| # Choose MI_USE_CXX setting | |
| - name: Set default cmake options | |
| id: cmake_args | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.c_or_cxx }}" = "cxx" ]; then | |
| echo "CMAKE_CXX_OPT_DEFAULT=-DMI_USE_CXX=ON" >> $GITHUB_OUTPUT | |
| else # Default to C mode | |
| echo "CMAKE_CXX_OPT_DEFAULT=-DMI_USE_CXX=OFF" >> $GITHUB_OUTPUT | |
| fi | |
| # Basic | |
| - name: Release | |
| if: matrix.tests == 'basic' | |
| run: | | |
| cmake . -B out/release-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_DEFAULT }} | |
| cmake --build out/release-${{ matrix.c_or_cxx }} --parallel 4 --config Release | |
| ctest --test-dir out/release-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release | |
| - name: Release, Asm | |
| if: matrix.tests == 'basic' && runner.os == 'Linux' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ matrix.os }}-${{ matrix.c_or_cxx }}-asm | |
| path: out/release-${{ matrix.c_or_cxx }}/CMakeFiles/mimalloc-static.dir/src/*.s | |
| - name: Debug | |
| if: matrix.tests == 'basic' | |
| run: | | |
| env | |
| cmake . -B out/debug-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_DEFAULT }} | |
| cmake --build out/debug-${{ matrix.c_or_cxx }} --parallel 4 --config Debug | |
| ctest --test-dir out/debug-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug | |
| - name: Secure | |
| if: matrix.tests == 'basic' | |
| run: | | |
| cmake . -B out/secure-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_DEFAULT }} | |
| cmake --build out/secure-${{ matrix.c_or_cxx }} --parallel 4 --config Release | |
| ctest --test-dir out/secure-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release | |
| # Extra Windows: x86, clang-cl, and clang | |
| - name: Debug, Win32 | |
| if: matrix.tests == 'basic' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/debug-x86-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -A Win32 ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/debug-x86-${{ matrix.c_or_cxx }} --parallel 4 --config Debug | |
| ctest --test-dir out/debug-x86-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug | |
| - name: Release, Win32 | |
| if: matrix.tests == 'basic' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/release-x86-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -A Win32 ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/release-x86-${{ matrix.c_or_cxx }} --parallel 4 --config Release | |
| ctest --test-dir out/release-x86-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release | |
| - name: Debug, Win32, clang-cl | |
| if: matrix.tests == 'clang' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/debug-x86-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -A Win32 -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/debug-x86-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Debug | |
| ctest --test-dir out/debug-x86-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug | |
| - name: Release, Win32, clang-cl | |
| if: matrix.tests == 'clang' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/release-x86-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -A Win32 -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/release-x86-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Release | |
| ctest --test-dir out/release-x86-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release | |
| - name: Debug, Windows, clang-cl | |
| if: matrix.tests == 'clang' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/debug-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/debug-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Debug | |
| ctest --test-dir out/debug-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug | |
| - name: Release, Windows, clang-cl | |
| if: matrix.tests == 'clang' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/release-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/release-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Release | |
| ctest --test-dir out/release-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release | |
| - name: Debug, Windows, clang | |
| if: matrix.tests == 'clang' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/debug-clang-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/debug-clang-${{ matrix.c_or_cxx }} --parallel 4 --config Debug | |
| ctest --test-dir out/debug-clang-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug | |
| - name: Release, Windows, clang | |
| if: matrix.tests == 'clang' && runner.os == 'Windows' | |
| run: | | |
| cmake . -B out/release-clang-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} | |
| cmake --build out/release-clang-${{ matrix.c_or_cxx }} --parallel 4 --config Release | |
| ctest --test-dir out/release-clang-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release | |
| # Extra, macOS fixed TLS | |
| - name: Debug, macOS, TLS fixed | |
| if: matrix.tests == 'extra' && runner.os == 'macOS' | |
| run: | | |
| cmake . -B out/debug-tls-fixed -DCMAKE_BUILD_TYPE=Debug -DMI_TLS_MODEL_FIXED=ON | |
| cmake --build out/debug-tls-fixed --parallel 4 --config Debug | |
| ctest --test-dir out/debug-tls-fixed --verbose --timeout 240 -C Debug | |
| - name: Release, macOS, TLS fixed | |
| if: matrix.tests == 'extra' && runner.os == 'macOS' | |
| run: | | |
| cmake . -B out/release-tls-fixed -DCMAKE_BUILD_TYPE=Release -DMI_TLS_MODEL_FIXED=ON | |
| cmake --build out/release-tls-fixed --parallel 4 --config Release | |
| ctest --test-dir out/release-tls-fixed --verbose --timeout 240 -C Release | |
| # Extra, Linux pthread TLS | |
| - name: Debug, Linux, TLS pthreads | |
| if: matrix.tests == 'extra' && runner.os == 'linux' | |
| run: | | |
| cmake . -B out/debug-tls-pthreads -DCMAKE_BUILD_TYPE=Debug -DMI_TLS_MODEL_PTHREADS=ON | |
| cmake --build out/debug-tls-pthreads --parallel 4 --config Debug | |
| ctest --test-dir out/debug-tls-pthreads --verbose --timeout 240 -C Debug | |
| - name: Release, Linux, TLS pthreads | |
| if: matrix.tests == 'extra' && runner.os == 'linux' | |
| run: | | |
| cmake . -B out/release-tls-pthreads -DCMAKE_BUILD_TYPE=Release -DMI_TLS_MODEL_PTHREADS=ON -DMI_SEE_ASM=ON | |
| cmake --build out/release-tls-pthreads --parallel 4 --config Release | |
| ctest --test-dir out/release-tls-pthreads --verbose --timeout 240 -C Release | |
| # Extra | |
| - name: Release, SIMD | |
| if: matrix.tests == 'extra' | |
| run: | | |
| cmake . -B out/release-simd -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_OPT_SIMD=ON | |
| cmake --build out/release-simd --parallel 8 --config Release | |
| ctest --test-dir out/release-simd --verbose --timeout 240 -C Release | |
| - name: Debug, C++, clang++ | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' | |
| run: | | |
| CC=clang CXX=clang++ cmake . -B out/debug-clang-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_USE_CXX=ON | |
| cmake --build out/debug-clang-cxx --parallel 8 --config Debug | |
| ctest --test-dir out/debug-clang-cxx --verbose --timeout 240 -C Debug | |
| - name: Release, C++, clang++ | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' | |
| run: | | |
| CC=clang CXX=clang++ cmake . -B out/release-clang-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON -DMI_SEE_ASM=ON | |
| cmake --build out/release-clang-cxx --parallel 8 --config Release | |
| ctest --test-dir out/release-clang-cxx --verbose --timeout 240 -C Release | |
| - name: Release, C++, clang++, Asm | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ matrix.os }}-clang-cxx-asm | |
| path: out/release-clang-cxx/CMakeFiles/mimalloc-static.dir/src/*.s | |
| - name: Debug, ASAN | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' | |
| run: | | |
| CC=clang CXX=clang++ cmake . -B out/debug-asan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_TRACK=ASAN | |
| cmake --build out/debug-asan --parallel 8 --config Debug | |
| ctest --test-dir out/debug-asan --verbose --timeout 240 -C Debug | |
| - name: Debug, UBSAN | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' | |
| run: | | |
| CC=clang CXX=clang++ cmake . -B out/debug-ubsan-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_DEBUG_UBSAN=ON | |
| cmake --build out/debug-ubsan-cxx --parallel 8 --config Debug | |
| ctest --test-dir out/debug-ubsan-cxx --verbose --timeout 240 -C Debug | |
| - name: Debug, TSAN | |
| if: matrix.tests == 'tsan' && runner.os == 'Linux' | |
| run: | | |
| CC=clang CXX=clang++ cmake . -B out/debug-tsan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_DEBUG_TSAN=ON | |
| cmake --build out/debug-tsan --parallel 8 --config Debug | |
| ctest --test-dir out/debug-tsan --verbose --timeout 240 -C Debug | |
| - name: Debug, Guarded | |
| if: matrix.tests == 'extra' && runner.os != 'macOS' | |
| run: | | |
| cmake . -B out/debug-guarded -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_GUARDED=FULL | |
| cmake --build out/debug-guarded --parallel 8 --config Debug | |
| ctest --test-dir out/debug-guarded --verbose --timeout 240 -C Debug | |
| env: | |
| MIMALLOC_GUARDED_SAMPLE_RATE: 1024 | |
| - name: Release, Guarded | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' && startsWith(github.ref_name,'dev3') | |
| run: | | |
| cmake . -B out/release-guarded -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_GUARDED=FULL | |
| cmake --build out/release-guarded --parallel 8 --config Release | |
| ctest --test-dir out/release-guarded --verbose --timeout 240 -C Release | |
| env: | |
| MIMALLOC_GUARDED_SAMPLE_RATE: 128 | |
| - name: Debug, Use pagemap | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' && startsWith(github.ref_name,'dev3') | |
| run: | | |
| cmake . -B out/debug-guarded -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_FREE_USE_PAGEMAP=ON | |
| cmake --build out/debug-guarded --parallel 8 --config Debug | |
| ctest --test-dir out/debug-guarded --verbose --timeout 240 -C Debug | |
| - name: Release, Use pagemap | |
| if: matrix.tests == 'extra' && runner.os == 'Linux' && startsWith(github.ref_name,'dev3') | |
| run: | | |
| cmake . -B out/release-guarded -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_FREE_USE_PAGEMAP=ON | |
| cmake --build out/release-guarded --parallel 8 --config Release | |
| ctest --test-dir out/release-guarded --verbose --timeout 240 -C Release | |
| - name: Debug, Secure Full | |
| if: matrix.tests == 'extra' && runner.os != 'macOS' | |
| run: | | |
| cmake . -B out/debug-secure-full -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_SECURE=FULL | |
| cmake --build out/debug-secure-full --parallel 8 --config Debug | |
| ctest --test-dir out/debug-secure-full --verbose --timeout 240 -C Debug | |
| - name: Release, Secure Full | |
| if: matrix.tests == 'extra' && runner.os != 'macOS' | |
| run: | | |
| cmake . -B out/release-secure-full -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SECURE=FULL | |
| cmake --build out/release-secure-full --parallel 8 --config Release | |
| ctest --test-dir out/release-secure-full --verbose --timeout 240 -C Release | |
| # MSYS2 mingw64 | |
| - name: mingw-ucrt64 x64, Setup | |
| if: matrix.tests == 'mingw-ucrt64' | |
| uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0 | |
| with: | |
| msystem: UCRT64 | |
| install: | | |
| mingw-w64-ucrt-x86_64-gcc | |
| mingw-w64-ucrt-x86_64-git | |
| mingw-w64-ucrt-x86_64-make | |
| mingw-w64-ucrt-x86_64-cmake | |
| - name: mingw-ucrt64 x64, Debug | |
| if: matrix.tests == 'mingw-ucrt64' | |
| shell: msys2 {0} | |
| run: | | |
| env | |
| cmake . -B out/debug-mingw-ucrt64-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL | |
| cmake --build out/debug-mingw-ucrt64-x64 --parallel 4 --config Debug | |
| ctest --test-dir out/debug-mingw-ucrt64-x64 --verbose --timeout 240 -C Debug | |
| - name: mingw-ucrt64 x64, Release | |
| if: matrix.tests == 'mingw-ucrt64' | |
| shell: msys2 {0} | |
| run: | | |
| cmake . -B out/release-mingw-ucrt64-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON | |
| cmake --build out/release-mingw-ucrt64-x64 --parallel 4 --config Release | |
| ctest --test-dir out/release-mingw-ucrt64-x64 --verbose --timeout 240 -C Release | |
| # VM: FreeBSD (arm64 and x64) | |
| - name: FreeBSD arm64, Setup | |
| if: matrix.tests == 'freebsd-arm64' | |
| uses: vmactions/freebsd-vm@83b151f58c6047089f4c80eb5ba2039d158ce093 # v1.5.3 | |
| with: | |
| arch: arm64 | |
| custom-shell-name: freebsd-arm64 | |
| cache-after-prepare: true | |
| prepare: | | |
| uname -a | |
| pkg install -y cmake | |
| - name: FreeBSD arm64, Debug | |
| if: matrix.tests == 'freebsd-arm64' | |
| shell: freebsd-arm64 {0} | |
| run: | | |
| export MI_TEST_LIGHT=1 | |
| cmake . -B out/debug-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL | |
| cmake --build out/debug-arm64 --parallel 4 --config Debug | |
| ctest --test-dir out/debug-arm64 --verbose --timeout 240 -C Debug | |
| - name: FreeBSD arm64, Release | |
| if: matrix.tests == 'freebsd-arm64' | |
| shell: freebsd-arm64 {0} | |
| run: | | |
| export MI_TEST_LIGHT=1 | |
| cmake . -B out/release-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON | |
| cmake --build out/release-arm64 --parallel 4 --config Release | |
| ctest --test-dir out/release-arm64 --verbose --timeout 240 -C Release | |
| - name: FreeBSD arm64, Secure | |
| if: matrix.tests == 'freebsd-arm64' | |
| shell: freebsd-arm64 {0} | |
| run: | | |
| export MI_TEST_LIGHT=1 | |
| cmake . -B out/secure-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON | |
| cmake --build out/secure-arm64 --parallel 4 --config Release | |
| ctest --test-dir out/secure-arm64 --verbose --timeout 240 -C Release | |
| - name: FreeBSD x64, Setup | |
| if: matrix.tests == 'freebsd-x64' | |
| uses: vmactions/freebsd-vm@83b151f58c6047089f4c80eb5ba2039d158ce093 # v1.5.3 | |
| with: | |
| arch: x86_64 | |
| usesh: true | |
| custom-shell-name: freebsd-x64 | |
| cache-after-prepare: true | |
| prepare: | | |
| pkg install -y cmake | |
| - name: FreeBSD x64, Debug | |
| if: matrix.tests == 'freebsd-x64' | |
| shell: freebsd-x64 {0} | |
| run: | | |
| cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL | |
| cmake --build out/debug-x64 --parallel 4 --config Debug | |
| ctest --test-dir out/debug-x64 --verbose --timeout 240 -C Debug | |
| - name: FreeBSD x64, Release | |
| if: matrix.tests == 'freebsd-x64' | |
| shell: freebsd-x64 {0} | |
| run: | | |
| cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON | |
| cmake --build out/release-x64 --parallel 4 --config Release | |
| ctest --test-dir out/release-x64 --verbose --timeout 240 -C Release | |
| - name: FreeBSD x64, Secure | |
| if: matrix.tests == 'freebsd-x64' | |
| shell: freebsd-x64 {0} | |
| run: | | |
| cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON | |
| cmake --build out/secure-x64 --parallel 4 --config Release | |
| ctest --test-dir out/secure-x64 --verbose --timeout 240 -C Release | |
| # VM: Alpine Linux with MUSL libc (riscv64, x64, and arm32) | |
| - name: Alpine riscv64, Setup | |
| if: matrix.tests == 'alpine-riscv64' | |
| uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 # v1.4.1 | |
| with: | |
| arch: riscv64 | |
| shell-name: alpine-riscv64.sh | |
| apk-tools-url: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v3.0.7/x86_64/apk.static#!sha256!c07bf5356eacc9dd7a8c56bc537f46702f007170287403299d52a04264e74b3c | |
| packages: | | |
| build-base | |
| cmake | |
| ninja | |
| clang | |
| - name: Alpine riscv64, Release clang | |
| if: matrix.tests == 'alpine-riscv64' | |
| shell: alpine-riscv64.sh {0} | |
| run: | | |
| CC=clang CXX=clang++ cmake . -B out/release-riscv64-clang -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=rv64gcb_zacas_zalasr -DMI_SEE_ASM=ON | |
| cmake --build out/release-riscv64-clang --parallel 4 --config Release | |
| ctest --test-dir out/release-riscv64-clang --verbose --timeout 240 -C Release | |
| - name: Alpine risc64, Asm clang | |
| if: matrix.tests == 'alpine-riscv64' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: alpine-riscv64-clang-asm | |
| path: out/release-riscv64-clang/CMakeFiles/mimalloc-static.dir/src/*.s | |
| - name: Alpine riscv64, Release | |
| if: matrix.tests == 'alpine-riscv64' | |
| shell: alpine-riscv64.sh {0} | |
| run: | | |
| cmake . -B out/release-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON | |
| cmake --build out/release-riscv64 --parallel 4 --config Release | |
| ctest --test-dir out/release-riscv64 --verbose --timeout 240 -C Release | |
| - name: Alpine risc64, Asm | |
| if: matrix.tests == 'alpine-riscv64' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: alpine-riscv64-asm | |
| path: out/release-riscv64/CMakeFiles/mimalloc-static.dir/src/*.s | |
| - name: Alpine riscv64, Debug | |
| if: matrix.tests == 'alpine-riscv64' | |
| shell: alpine-riscv64.sh {0} | |
| env: | |
| MI_TEST_LIGHT: 1 | |
| run: | | |
| uname -m | |
| cmake . -B out/debug-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL | |
| cmake --build out/debug-riscv64 --parallel 4 --config Debug | |
| ctest --test-dir out/debug-riscv64 --verbose --timeout 240 -C Debug | |
| - name: Alpine riscv64, Secure | |
| if: matrix.tests == 'alpine-riscv64' | |
| shell: alpine-riscv64.sh {0} | |
| run: | | |
| cmake . -B out/secure-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON | |
| cmake --build out/secure-riscv64 --parallel 4 --config Release | |
| ctest --test-dir out/secure-riscv64 --verbose --timeout 240 -C Release | |
| - name: Alpine x64, Setup | |
| if: matrix.tests == 'alpine-x64' | |
| uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 # v1.4.1 | |
| with: | |
| arch: x86_64 | |
| shell-name: alpine-x64.sh | |
| packages: | | |
| build-base | |
| cmake | |
| - name: Alpine x64, Debug | |
| if: matrix.tests == 'alpine-x64' | |
| shell: alpine-x64.sh {0} | |
| run: | | |
| cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL | |
| cmake --build out/debug-x64 --parallel 4 --config Debug | |
| ctest --test-dir out/debug-x64 --verbose --timeout 240 -C Debug | |
| - name: Alpine x64, Release | |
| if: matrix.tests == 'alpine-x64' | |
| shell: alpine-x64.sh {0} | |
| run: | | |
| cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON | |
| cmake --build out/release-x64 --parallel 4 --config Release | |
| ctest --test-dir out/release-x64 --verbose --timeout 240 -C Release | |
| - name: Alpine x64, Secure | |
| if: matrix.tests == 'alpine-x64' | |
| shell: alpine-x64.sh {0} | |
| run: | | |
| cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON | |
| cmake --build out/secure-x64 --parallel 4 --config Release | |
| ctest --test-dir out/secure-x64 --verbose --timeout 240 -C Release | |
| - name: Alpine arm32, Setup | |
| if: matrix.tests == 'alpine-arm32' | |
| uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 # v1.4.1 | |
| with: | |
| arch: armv7 # or armhf for arm-v6 with hard float | |
| shell-name: alpine-arm32.sh | |
| packages: | | |
| build-base | |
| cmake | |
| - name: Alpine arm32, Debug | |
| if: matrix.tests == 'alpine-arm32' | |
| shell: alpine-arm32.sh {0} | |
| env: | |
| MI_TEST_LIGHT: 1 | |
| run: | | |
| uname -m | |
| cmake . -B out/debug-arm32 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL | |
| cmake --build out/debug-arm32 --parallel 4 --config Debug | |
| ctest --test-dir out/debug-arm32 --verbose --timeout 240 -C Debug | |
| - name: Alpine arm32, Release | |
| if: matrix.tests == 'alpine-arm32' | |
| shell: alpine-arm32.sh {0} | |
| run: | | |
| cmake . -B out/release-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON | |
| cmake --build out/release-arm32 --parallel 4 --config Release | |
| ctest --test-dir out/release-arm32 --verbose --timeout 240 -C Release | |
| - name: Alpine arm32, Secure | |
| if: matrix.tests == 'alpine-arm32' | |
| shell: alpine-arm32.sh {0} | |
| run: | | |
| cmake . -B out/secure-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON | |
| cmake --build out/secure-arm32 --parallel 4 --config Release | |
| ctest --test-dir out/secure-arm32 --verbose --timeout 240 -C Release | |
| # - name: Android, Setup | |
| # if: matrix.tests == 'android-x64' | |
| # uses: android-actions/setup-android@v4 | |
| # #id: setup-ndk | |
| # # with: | |
| # # ndk-version: r27d | |
| # # link-to-sdk: true | |
| # # local-cache: true | |
| # - name: Android, Debug Build | |
| # if: matrix.tests == 'android-x64' | |
| # # env: | |
| # # ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| # run: | | |
| # env | |
| # cmake . -G Ninja -B out/android-x64 -DCMAKE_BUILD_TYPE=Debug \ | |
| # -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \ | |
| # -DANDROID_ABI=x86_64 -DANDROID_PLATFORM=android-27 | |
| # cmake --build out/android-x64 --parallel 4 --config Debug | |
| # - name: Android, Debug Run | |
| # if: matrix.tests == 'android-x64' | |
| # uses: reactivecircus/android-emulator-runner@v2 | |
| # with: | |
| # api-level: 27 | |
| # target: default | |
| # arch: x86_64 | |
| # script: | | |
| # adb push out/android-x64/mimalloc-test-api /data/local/tmp/ | |
| # adb shell "/data/local/tmp/mimalloc-test-api" |