Test GF16/Hasher #37
This file contains 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: Test GF16/Hasher | |
on: | |
workflow_dispatch: | |
jobs: | |
test-win-x86: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [Debug, Release] | |
compiler: ['v142', 'v143', 'ClangCL'] | |
arch: ['Win32', 'x64'] | |
name: Test VS ${{ matrix.compiler }} ${{ matrix.arch }} (${{ matrix.config }}) | |
runs-on: windows-2022 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ilammy/setup-nasm@v1 | |
- uses: petarpetrovt/[email protected] | |
- run: | | |
mkdir test\gf16\build | |
cmake -B test\gf16\build -S test\gf16 -G "Visual Studio 17 2022" -T ${{ matrix.compiler }} -A ${{ matrix.arch }} | |
cmake --build test\gf16\build --config ${{ matrix.config }} | |
mkdir test\hasher\build | |
cmake -B test\hasher\build -S test\hasher -G "Visual Studio 17 2022" -T ${{ matrix.compiler }} -A ${{ matrix.arch }} | |
cmake --build test\hasher\build --config ${{ matrix.config }} | |
- run: Invoke-Expression "$env:SDE_PATH\sde.exe -icx -- test/gf16/build/${{ matrix.config }}/test.exe" | |
- run: Invoke-Expression "$env:SDE_PATH\sde.exe -icx -- test/gf16/build/${{ matrix.config }}/test-pmul.exe" | |
- run: Invoke-Expression "$env:SDE_PATH\sde.exe -icx -- test/gf16/build/${{ matrix.config }}/test-ctrl.exe -f" | |
if: ${{ matrix.config == 'Release' && (matrix.compiler == 'ClangCL' || matrix.compiler == 'v143') }} | |
- run: Invoke-Expression "$env:SDE_PATH\sde.exe -icx -- test/gf16/build/${{ matrix.config }}/test-inv.exe -f" | |
if: ${{ matrix.config == 'Release' && (matrix.compiler == 'ClangCL' || matrix.compiler == 'v143') }} | |
- run: Invoke-Expression "$env:SDE_PATH\sde.exe -icx -- test/hasher/build/${{ matrix.config }}/test.exe" | |
# TODO: XOP tests for hasher? | |
# test building only | |
test-win-arm: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: ['v142', 'v143', 'ClangCL'] | |
arch: ['ARM', 'ARM64'] | |
exclude: | |
- compiler: ClangCL | |
arch: ARM | |
name: Test VS ${{ matrix.compiler }} ${{ matrix.arch }} | |
runs-on: windows-2022 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
mkdir test\gf16\build | |
cmake -B test\gf16\build -S test\gf16 -G "Visual Studio 17 2022" -T ${{ matrix.compiler }} -A ${{ matrix.arch }} | |
cmake --build test\gf16\build --config Debug | |
mkdir test\hasher\build | |
cmake -B test\hasher\build -S test\hasher -G "Visual Studio 17 2022" -T ${{ matrix.compiler }} -A ${{ matrix.arch }} | |
cmake --build test\hasher\build --config Debug | |
test-msys: | |
runs-on: windows-latest | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false | |
matrix: | |
sys: | |
- { sys: mingw32, env: i686 } | |
- { sys: ucrt64, env: ucrt-x86_64 } | |
- { sys: clang64, env: clang-x86_64 } | |
compiler: | |
- {cc: gcc, cxx: g++} | |
- {cc: clang, cxx: clang++} | |
name: Test MSYS ${{matrix.sys.sys}} ${{matrix.compiler.cc}} | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
#- uses: petarpetrovt/[email protected] | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{matrix.sys.sys}} | |
#update: true | |
install: cmake mingw-w64-${{matrix.sys.env}}-${{matrix.compiler.cc}} make git | |
- uses: actions/checkout@v3 | |
- run: | | |
mkdir test/gf16/build | |
cmake -B test/gf16/build -S test/gf16 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${{matrix.compiler.cc}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -B test/hasher/build -S test/hasher -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${{matrix.compiler.cc}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} | |
cmake --build test/hasher/build | |
# TODO: test under SDE (needs static linking, or calling SDE from within MSYS) | |
- run: test/gf16/build/test | |
- run: test/gf16/build/test-pmul | |
- run: test/gf16/build/test-ctrl -f | |
- run: test/gf16/build/test-inv -f | |
- run: test/hasher/build/test | |
# TODO: test libuv | |
test-linux-gcc: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [Debug, Release] | |
# GCC 8 available in 20.04 | |
cc_ver: ['9','12'] | |
t: | |
# qemu x86 doesn't support AVX, so we use Intel SDE instead | |
# but i386 SDE seems to always segfault on GHA; unable to reproduce the issue locally though | |
# - `sde -version` does emit "FATAL: cannot determine kernel version" | |
- {arch: 'i386', target: 'i686-linux-gnu', libc: 'i386', emu: 'qemu-i386-static -L /usr/i686-linux-gnu -cpu max'} | |
- {arch: 'amd64', target: 'x86-64-linux-gnu', libc: 'amd64', emu: '$SDE_PATH/sde64 -icx --'} | |
- {arch: 'aarch64', target: 'aarch64-linux-gnu', libc: 'arm64', emu: 'qemu-aarch64-static -L /usr/aarch64-linux-gnu -cpu max,sve-max-vq=4'} | |
- {arch: 'arm', target: 'arm-linux-gnueabihf', libc: 'armhf', emu: 'qemu-arm-static -L /usr/arm-linux-gnueabihf -cpu max'} | |
- {arch: 'riscv64', target: 'riscv64-linux-gnu', libc: 'riscv64', emu: 'qemu-riscv64-static -L /usr/riscv64-linux-gnu -cpu rv64,v=true,vlen=512,elen=64,vext_spec=v1.0,zba=true,zbb=true,zbc=true'} | |
- {arch: 'ppc64', target: 'powerpc64-linux-gnu', libc: 'ppc64', emu: 'qemu-ppc64-static -L /usr/powerpc64-linux-gnu'} | |
name: Test Ubuntu GCC ${{ matrix.cc_ver }} ${{ matrix.t.arch }} (${{ matrix.config }}) | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo dpkg --add-architecture i386 | |
if: ${{ matrix.t.arch == 'i386' }} | |
- run: sudo apt update | |
- uses: petarpetrovt/[email protected] | |
with: | |
sdeVersion: 9.24.0 # 9.27/9.33 doesn't work in Linux VMs | |
if: ${{ matrix.t.arch == 'amd64' || matrix.t.arch == 'i386' }} | |
- run: | | |
sudo apt install -y g++-${{ matrix.cc_ver }}-${{ matrix.t.target }} cmake | |
echo "CC=${{ matrix.t.target }}-gcc-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
echo "CXX=${{ matrix.t.target }}-g++-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
if: ${{ matrix.t.arch != 'amd64' }} | |
- run: | | |
sudo apt install -y g++-${{ matrix.cc_ver }} cmake | |
echo "CC=gcc-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
if: ${{ matrix.t.arch == 'amd64' }} | |
- run: sudo apt install -y libc6:i386 libstdc++6:i386 | |
if: ${{ matrix.t.arch == 'i386' }} | |
- run: | | |
echo -e "deb http://azure.archive.ubuntu.com/ubuntu mantic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/mantic.list | |
sudo apt update | |
if: ${{ matrix.t.arch == 'riscv64' || matrix.t.arch == 'riscv32' || matrix.t.arch == 'i386' }} # RVV unavailable in Ubuntu 22.04's qemu | |
- run: sudo apt install -y --no-install-recommends qemu-user-static | |
if: ${{ matrix.t.arch != 'amd64' }} | |
- run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DSKIP_AUX=1 -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.t.arch }} \ | |
-DCMAKE_SYSTEM_NAME=Linux \ | |
-DCMAKE_FIND_ROOT_PATH=/usr/${{ matrix.t.target }} \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DSKIP_AUX=1 -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.t.arch }} \ | |
-DCMAKE_SYSTEM_NAME=Linux \ | |
-DCMAKE_FIND_ROOT_PATH=/usr/${{ matrix.t.target }} \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY | |
cmake --build test/hasher/build | |
- run: ${{ matrix.t.emu }} test/gf16/build/test | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-pmul | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-ctrl -f | |
if: ${{ matrix.config == 'Release' && matrix.cc_ver == '12' }} | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-inv -f | |
if: ${{ matrix.config == 'Release' && matrix.cc_ver == '12' }} | |
- run: ${{ matrix.t.emu }} test/hasher/build/test | |
# also test SSE2-only to see if CPUID checking works | |
- run: | | |
$SDE_PATH/sde64 -p4p -- test/gf16/build/test | |
$SDE_PATH/sde64 -p4p -- test/gf16/build/test-pmul | |
$SDE_PATH/sde64 -p4p -- test/hasher/build/test | |
if: ${{ matrix.config == 'Release' && matrix.cc_ver == '12' && matrix.t.arch == 'amd64' }} | |
test-linux-clang: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: ['Debug', 'Release'] | |
# Clang 6 available in 20.04 | |
cc_ver: ['11','15'] | |
t: | |
- {arch: 'i386', target: 'i686-linux-gnu', cl_target: 'i386-linux-gnu', libc: 'i386', emu: 'qemu-i386-static -L /usr/i686-linux-gnu -cpu max'} | |
- {arch: 'amd64', target: 'x86-64-linux-gnu', cl_target: 'x86_64-linux-gnu', libc: 'amd64', emu: '$SDE_PATH/sde64 -icx --'} | |
- {arch: 'aarch64', target: 'aarch64-linux-gnu', cl_target: 'aarch64-linux-gnu', libc: 'arm64', emu: 'qemu-aarch64-static -L /usr/aarch64-linux-gnu -cpu max,sve-max-vq=4'} | |
- {arch: 'arm', target: 'arm-linux-gnueabihf', cl_target: 'armv7a-linux-gnueabihf', libc: 'armhf', emu: 'qemu-arm-static -L /usr/arm-linux-gnueabihf -cpu max'} | |
- {arch: 'riscv64', target: 'riscv64-linux-gnu', cl_target: 'riscv64-linux-gnu', libc: 'riscv64', emu: 'qemu-riscv64-static -L /usr/riscv64-linux-gnu -cpu rv64,v=true,vlen=512,elen=64,vext_spec=v1.0,zba=true,zbb=true,zbc=true'} # zvbc added in qemu 8.2 (Ubuntu 24.04) | |
- {arch: 'ppc64', target: 'powerpc64-linux-gnu', cl_target: 'ppc64-linux-gnu', libc: 'ppc64', emu: 'qemu-ppc64-static -L /usr/powerpc64-linux-gnu'} | |
name: Test Ubuntu Clang ${{ matrix.cc_ver }} ${{ matrix.t.arch }} (${{ matrix.config }}) | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo dpkg --add-architecture i386 | |
if: ${{ matrix.t.arch == 'i386' }} | |
- run: sudo apt update && sudo apt install -y clang-${{ matrix.cc_ver }} cmake | |
- uses: petarpetrovt/[email protected] | |
with: | |
sdeVersion: 9.24.0 | |
if: ${{ matrix.t.arch == 'amd64' || matrix.t.arch == 'i386' }} | |
- run: sudo apt install -y binutils-${{ matrix.t.target }} libgcc-12-dev-${{ matrix.t.libc }}-cross libstdc++-12-dev-${{ matrix.t.libc }}-cross | |
if: ${{ matrix.t.arch != 'amd64' }} | |
- run: sudo apt install -y libc6:i386 libstdc++6:i386 | |
if: ${{ matrix.t.arch == 'i386' }} | |
- run: | | |
echo -e "deb http://azure.archive.ubuntu.com/ubuntu mantic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/mantic.list | |
sudo apt update | |
if: ${{ matrix.t.arch == 'riscv64' || matrix.t.arch == 'riscv32' || matrix.t.arch == 'i386' }} # RVV unavailable in Ubuntu 22.04's qemu | |
- run: sudo apt install -y --no-install-recommends qemu-user-static | |
if: ${{ matrix.t.arch != 'amd64' }} | |
#- run: echo "SANITIZE=-DENABLE_SANITIZE=1" >> $GITHUB_ENV | |
# if: ${{ matrix.config == 'Release' && matrix.t.arch == 'amd64' && matrix.cc_ver == '15' }} # SDE+ASAN problematic with Clang 11, random hangs with Clang 15 | |
- run: | | |
if [ '${{ matrix.t.arch }}' != 'amd64' ]; then | |
LINKER_FLAG=-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=/usr/bin/${{ matrix.t.target }}-ld | |
fi | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DSKIP_AUX=1 -DCMAKE_BUILD_TYPE=${{ matrix.config }} $SANITIZE \ | |
-DCMAKE_C_COMPILER=clang-${{ matrix.cc_ver }} \ | |
-DCMAKE_CXX_COMPILER=clang++-${{ matrix.cc_ver }} \ | |
-DCMAKE_C_COMPILER_TARGET=${{ matrix.t.cl_target }} \ | |
-DCMAKE_CXX_COMPILER_TARGET=${{ matrix.t.cl_target }} \ | |
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.t.arch }} \ | |
-DCMAKE_SYSTEM_NAME=Linux \ | |
-DCMAKE_FIND_ROOT_PATH="/usr/${{ matrix.t.target }};/usr/lib/llvm-${{ matrix.cc_ver }}/lib/clang/" \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ | |
-DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES="/usr/${{ matrix.t.target }}/include;`ls -d /usr/${{ matrix.t.target }}/include/c++/*|head -n1`/${{ matrix.t.target }}" \ | |
-DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES="/usr/${{ matrix.t.target }}/include;`ls -d /usr/${{ matrix.t.target }}/include/c++/*|head -n1`/${{ matrix.t.target }}" \ | |
$LINKER_FLAG | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DSKIP_AUX=1 -DCMAKE_BUILD_TYPE=${{ matrix.config }} $SANITIZE \ | |
-DCMAKE_C_COMPILER=clang-${{ matrix.cc_ver }} \ | |
-DCMAKE_CXX_COMPILER=clang++-${{ matrix.cc_ver }} \ | |
-DCMAKE_C_COMPILER_TARGET=${{ matrix.t.cl_target }} \ | |
-DCMAKE_CXX_COMPILER_TARGET=${{ matrix.t.cl_target }} \ | |
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.t.arch }} \ | |
-DCMAKE_SYSTEM_NAME=Linux \ | |
-DCMAKE_FIND_ROOT_PATH="/usr/${{ matrix.t.target }};/usr/lib/llvm-${{ matrix.cc_ver }}/lib/clang/" \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ | |
-DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES="/usr/${{ matrix.t.target }}/include;`ls -d /usr/${{ matrix.t.target }}/include/c++/*|head -n1`/${{ matrix.t.target }}" \ | |
-DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES="/usr/${{ matrix.t.target }}/include;`ls -d /usr/${{ matrix.t.target }}/include/c++/*|head -n1`/${{ matrix.t.target }}" \ | |
$LINKER_FLAG | |
cmake --build test/hasher/build | |
- run: ${{ matrix.t.emu }} test/gf16/build/test | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-pmul | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-ctrl -f | |
if: ${{ matrix.config == 'Release' && matrix.cc_ver == '15' }} | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-inv -f | |
if: ${{ matrix.config == 'Release' && matrix.cc_ver == '15' }} | |
- run: ${{ matrix.t.emu }} test/hasher/build/test | |
test-linux-clang-sanitize: | |
name: Test Ubuntu Clang 15 with sanitizer | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt update && sudo apt install -y clang-15 cmake | |
- run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DCMAKE_BUILD_TYPE=Release -DENABLE_SANITIZE=1 \ | |
-DCMAKE_C_COMPILER=clang-15 \ | |
-DCMAKE_CXX_COMPILER=clang++-15 | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DCMAKE_BUILD_TYPE=Release -DENABLE_SANITIZE=1 \ | |
-DCMAKE_C_COMPILER=clang-15 \ | |
-DCMAKE_CXX_COMPILER=clang++-15 | |
cmake --build test/hasher/build | |
- run: test/gf16/build/test | |
- run: test/gf16/build/test-pmul | |
- run: test/gf16/build/test-ctrl -f | |
- run: test/gf16/build/test-inv -f | |
- run: test/hasher/build/test | |
test-linux-musl: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [Debug, Release] | |
t: | |
- {arch: 'armeb', target: 'armeb-linux-musleabihf', emu: 'qemu-armeb-static -cpu max'} | |
- {arch: 'aarch64_be', target: 'aarch64_be-linux-musl', emu: 'qemu-aarch64_be-static -cpu max,sve-max-vq=4'} | |
# RV32 MUSL compiler currently unavailable | |
#- {arch: 'riscv32', target: 'riscv32-linux-musl', emu: 'qemu-riscv32-static -cpu rv32,v=true,vlen=512,elen=64,vext_spec=v1.0,zba=true,zbb=true,zbc=true'} | |
name: Test MUSL ${{ matrix.t.arch }} (${{ matrix.config }}) | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt update && sudo apt install -y qemu-user-static | |
if: ${{ matrix.t.arch != 'amd64' }} | |
- uses: Lesmiscore/musl-cross-compilers@jockie | |
id: musl | |
with: | |
target: ${{ matrix.t.target }} | |
- run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DSKIP_AUX=1 -DSTATIC_LINK=1 -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.t.arch }} \ | |
-DCMAKE_SYSTEM_NAME=Linux | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DSKIP_AUX=1 -DSTATIC_LINK=1 -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.t.arch }} \ | |
-DCMAKE_SYSTEM_NAME=Linux | |
cmake --build test/hasher/build | |
env: | |
CC: ${{ steps.musl.outputs.path }}/${{ matrix.t.target }}-cc | |
CXX: ${{ steps.musl.outputs.path }}/${{ matrix.t.target }}-c++ | |
AR: ${{ steps.musl.outputs.path }}/${{ matrix.t.target }}-ar | |
- run: ${{ matrix.t.emu }} test/gf16/build/test | |
- run: ${{ matrix.t.emu }} test/gf16/build/test-pmul | |
- run: ${{ matrix.t.emu }} test/hasher/build/test | |
# x32 is not supported on Ubuntu 22.10 or later kernels [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1994516], but the Azure instances use a 6.5+ kernel | |
# so we can only do this in a VM with a kernel built with x32 support | |
test-x32-musl: | |
name: Test MUSL x32 | |
runs-on: macos-13 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: leleliu008/github-actions-vagrant@v2 | |
with: | |
box: generic/debian12 | |
run: | | |
apt install curl build-essential cmake | |
curl http://musl.cc/x86_64-linux-muslx32-cross.tgz | tar zxf - | |
MUSL_BIN=`pwd`/x86_64-linux-muslx32-cross/bin/x86_64-linux-muslx32 | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DSTATIC_LINK=1 -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=$MUSL_BIN-cc \ | |
-DCMAKE_CXX_COMPILER=$MUSL_BIN-c++ \ | |
-DCMAKE_SYSTEM_PROCESSOR=amd64 \ | |
-DCMAKE_SYSTEM_NAME=Linux | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DSKIP_AUX=1 -DSTATIC_LINK=1 -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=$MUSL_BIN-cc \ | |
-DCMAKE_CXX_COMPILER=$MUSL_BIN-c++ \ | |
-DCMAKE_SYSTEM_PROCESSOR=amd64 \ | |
-DCMAKE_SYSTEM_NAME=Linux | |
cmake --build test/hasher/build | |
test/gf16/build/test | |
test/gf16/build/test-pmul | |
test/hasher/build/test | |
test-linux-pocl: | |
name: Test POCL (OpenCL) | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: echo -e "deb http://azure.archive.ubuntu.com/ubuntu lunar main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/lunar.list | |
- run: sudo apt update && sudo apt install -y pocl-opencl-icd | |
- run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DCMAKE_BUILD_TYPE=Release -DENABLE_OCL=1 | |
cmake --build test/gf16/build | |
- run: test/gf16/build/test-ctrl -pg | |
test-mac: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, macos-14] # 13=x64, 14=arm64 | |
config: ['Debug', 'Release'] | |
compiler: | |
- {cc: 'gcc-12', cxx: 'g++-12'} | |
- {cc: 'clang', cxx: 'clang++'} | |
exclude: | |
# arm_acle.h seems to be broken in Homebrew's GCC12? (type conflict between __builtin_aarch64_rndr and __rndr) | |
- os: macos-14 | |
compiler: {cc: 'gcc-12', cxx: 'g++-12'} | |
name: Test MacOS ${{ matrix.compiler.cc }} (${{ matrix.os }} ${{ matrix.config }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
# workaround https://forums.developer.apple.com/forums/thread/737707 | |
- run: echo "LDFLAGS=-Wl,-ld_classic" >> $GITHUB_ENV | |
if: ${{ matrix.os == 'macos-13' && matrix.compiler.cc == 'gcc-12' }} | |
- run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} | |
cmake --build test/hasher/build | |
- run: test/gf16/build/test | |
- run: test/gf16/build/test-pmul | |
- run: test/gf16/build/test-ctrl -f | |
if: ${{ matrix.config == 'Release' && matrix.compiler.cc == 'clang' }} | |
- run: test/gf16/build/test-inv -f | |
if: ${{ matrix.config == 'Release' && matrix.compiler.cc == 'clang' }} | |
- run: test/hasher/build/test | |
# TODO: test building on Mac ARM64? might not be necessary, given we build it in par2cmdline-turbo | |
test-fbsd-x86: | |
runs-on: ubuntu-latest | |
name: Test freebsd amd64 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: vmactions/freebsd-vm@v1 | |
with: | |
copyback: false | |
prepare: pkg install -y cmake lang/gcc gmake | |
run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DCMAKE_BUILD_TYPE=Release | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DCMAKE_BUILD_TYPE=Release | |
cmake --build test/hasher/build | |
test/gf16/build/test | |
test/gf16/build/test-pmul | |
test/gf16/build/test-ctrl -f | |
test/gf16/build/test-inv -f | |
test/hasher/build/test | |
test-nbsd-x86: | |
runs-on: ubuntu-latest | |
name: Test netbsd amd64 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: vmactions/netbsd-vm@v1 | |
with: | |
copyback: false | |
prepare: /usr/sbin/pkg_add cmake gcc13 gmake | |
run: | | |
mkdir test/gf16/build | |
cmake -Btest/gf16/build -Stest/gf16 -DCMAKE_BUILD_TYPE=Release | |
cmake --build test/gf16/build | |
mkdir test/hasher/build | |
cmake -Btest/hasher/build -Stest/hasher -DCMAKE_BUILD_TYPE=Release | |
cmake --build test/hasher/build | |
test/gf16/build/test | |
test/gf16/build/test-pmul | |
test/gf16/build/test-ctrl -f | |
test/gf16/build/test-inv -f | |
test/hasher/build/test |