Fix ARM PMULL clearing declared CRC ISA #23
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: Run tests | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
test-node-ver: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# npx doesn't work on these older versions | |
#- version: '0.10.48' | |
# gyp_ver: '3.8.0' | |
# flags: '' | |
# python2: true | |
#- version: '4.9.1' | |
# gyp_ver: '4.0.0' | |
# flags: '' | |
# python2: true | |
- version: '8.17.0' | |
gyp_ver: '6.1.0' | |
flags: '--trace-warnings' | |
python2: true | |
- version: '12.22.12' | |
gyp_ver: '8.4.1' | |
flags: '--trace-warnings' | |
python2: false | |
- version: '20.11.0' | |
gyp_ver: '8.4.1' | |
flags: '--trace-warnings' #--pending-deprecation --throw-deprecation | |
python2: false | |
name: Test on node ${{ matrix.version }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: MatteoH2O1999/setup-python@v3 | |
with: | |
python-version: '2.7' | |
if: ${{ matrix.python2 }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.version }} | |
- uses: actions/checkout@v3 | |
- run: npx node-gyp@${{ matrix.gyp_ver }} rebuild --target=v${{ matrix.version }} | |
- uses: ./.github/actions/run_tests | |
with: | |
node: node ${{ matrix.flags }} | |
test-msvc-x86: | |
strategy: | |
fail-fast: false | |
matrix: | |
win_ver: [2019, 2022] # correlates with MSVC version | |
arch: [x86, x64] | |
name: Test on Windows ${{ matrix.win_ver }}, MSVC ${{ matrix.arch }} | |
runs-on: windows-${{ matrix.win_ver }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
architecture: ${{ matrix.arch }} | |
node-version: '20.11.0' | |
# TODO: consider SDE | |
- run: npx node-gyp rebuild --arch=${{ matrix.arch }} --target=v20.11.0 | |
if: ${{ matrix.arch != 'x86' }} | |
- run: npx node-gyp rebuild --arch=ia32 --target=v20.11.0 | |
if: ${{ matrix.arch == 'x86' }} | |
- uses: ./.github/actions/run_tests | |
#MSVC ARM? | |
test-gcc: | |
strategy: | |
fail-fast: false | |
matrix: | |
node_ver: ['12.22.12'] | |
cc_ver: ['9','12'] | |
t: | |
# qemu x86 doesn't support AVX, so we use Intel SDE instead | |
# NodeJS doesn't provide x86 Linux binaries | |
#- {arch: 'i386', nodearch: 'x86', gyparch: 'ia32', target: 'i686-linux-gnu', libc: 'i386', emu: '$SDE_PATH/sde -icx --'} | |
- {arch: 'amd64', nodearch: 'x64', gyparch: 'x64', target: 'x86-64-linux-gnu', libc: 'amd64', emu: '$SDE_PATH/sde64 -icx --'} | |
- {arch: 'aarch64', nodearch: 'arm64', gyparch: 'arm64', target: 'aarch64-linux-gnu', libc: 'arm64', emu: 'qemu-aarch64-static -L /usr/aarch64-linux-gnu -cpu max,sve-max-vq=4'} | |
- {arch: 'arm', nodearch: 'armv7l', gyparch: 'arm', target: 'arm-linux-gnueabihf', libc: 'armhf', emu: 'qemu-arm-static -L /usr/arm-linux-gnueabihf -cpu max'} | |
# RVV unavailable in Ubuntu 22.04's qemu | |
# TODO: consider using newer qemu | |
#- {arch: 'riscv64', nodearch: 'riscv64', gyparch: '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'} | |
name: Test on GCC ${{ matrix.cc_ver }} ${{ matrix.t.arch }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt update | |
- uses: petarpetrovt/[email protected] | |
if: ${{ matrix.t.arch == 'amd64' || matrix.t.arch == 'i386' }} | |
- run: sudo apt install -y qemu-user-static | |
if: ${{ matrix.t.arch != 'amd64' && matrix.t.arch != 'i386' }} | |
- run: | | |
sudo apt install -y g++-${{ matrix.cc_ver }}-${{ matrix.t.target }} | |
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 }} | |
echo "CC=gcc-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
if: ${{ matrix.t.arch == 'amd64' }} | |
- run: | | |
wget https://nodejs.org/download/release/v${{ matrix.node_ver }}/node-v${{ matrix.node_ver }}-linux-${{ matrix.t.nodearch }}.tar.xz | |
tar -Jxf node-v${{ matrix.node_ver }}-linux-${{ matrix.t.nodearch }}.tar.xz | |
mv node-v${{ matrix.node_ver }}-linux-${{ matrix.t.nodearch }} n | |
- run: npx [email protected] rebuild --arch=${{ matrix.t.gyparch }} --target=v${{ matrix.node_ver }} --openssl_fips='' --enable_native_tuning=0 | |
- uses: ./.github/actions/run_tests | |
with: | |
node: ${{ matrix.t.emu }} n/bin/node | |
# test other ISA levels for x86 | |
# TODO: test native tunings | |
- run: | | |
$SDE_PATH/sde -p4p -- n/bin/node test/testenc | |
$SDE_PATH/sde -mrm -- n/bin/node test/testenc | |
$SDE_PATH/sde -snb -- n/bin/node test/testenc | |
$SDE_PATH/sde -hsw -- n/bin/node test/testenc | |
$SDE_PATH/sde -p4p -- n/bin/node test/testdec | |
$SDE_PATH/sde -mrm -- n/bin/node test/testdec | |
$SDE_PATH/sde -snb -- n/bin/node test/testdec | |
$SDE_PATH/sde -hsw -- n/bin/node test/testdec | |
$SDE_PATH/sde -p4p -- n/bin/node test/testcrc | |
$SDE_PATH/sde -wsm -- n/bin/node test/testcrc | |
if: ${{ matrix.t.arch == 'amd64' || matrix.t.arch == 'i386' }} | |
test-clang: | |
strategy: | |
fail-fast: false | |
matrix: | |
node_ver: ['12.22.12'] | |
cc_ver: ['11','15'] | |
t: | |
#- {arch: 'i386', nodearch: 'x86', gyparch: 'ia32', target: 'i686-linux-gnu', cl_target: 'i386-linux-gnu', libc: 'i386', emu: '$SDE_PATH/sde -icx --'} | |
- {arch: 'amd64', nodearch: 'x64', gyparch: 'x64', target: 'x86-64-linux-gnu', cl_target: 'x86_64-linux-gnu', libc: 'amd64', emu: '$SDE_PATH/sde64 -icx --'} | |
- {arch: 'aarch64', nodearch: 'arm64', gyparch: 'arm64', 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', nodearch: 'armv7l', gyparch: 'arm', target: 'arm-linux-gnueabihf', cl_target: 'armv7a-linux-gnueabihf', libc: 'armhf', emu: 'qemu-arm-static -L /usr/arm-linux-gnueabihf -cpu max'} | |
# RVV unavailable in Ubuntu 22.04's qemu | |
# TODO: consider using newer qemu | |
#- {arch: 'riscv64', nodearch: 'riscv64', gyparch: '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'} | |
name: Test Ubuntu Clang ${{ matrix.cc_ver }} ${{ matrix.t.arch }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt update && sudo apt install -y clang-${{ matrix.cc_ver }} | |
- uses: petarpetrovt/[email protected] | |
if: ${{ matrix.t.arch == 'amd64' || matrix.t.arch == 'i386' }} | |
- run: sudo apt install -y qemu-user-static | |
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: | | |
echo "CC=clang-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.cc_ver }}" >> $GITHUB_ENV | |
CFLAGS="--target=${{ matrix.t.cl_target }} -I/usr/${{ matrix.t.target }}/include -I`ls -d /usr/${{ matrix.t.target }}/include/c++/*|head -n1`/${{ matrix.t.target }}" | |
echo "CFLAGS=$CFLAGS" >> $GITHUB_ENV | |
echo "CXXFLAGS=$CFLAGS" >> $GITHUB_ENV | |
if [ '${{ matrix.t.arch }}' != 'amd64' ]; then | |
echo "LDFLAGS=-fuse-ld=/usr/bin/${{ matrix.t.target }}-ld -L/usr/lib/llvm-${{ matrix.cc_ver }}/lib/clang/ --target=${{ matrix.t.cl_target }}" >> $GITHUB_ENV | |
sed -i 's/"target_defaults": [{]/"target_defaults": { "libraries!":["-lnode"],/' binding.gyp | |
fi | |
- run: | | |
wget https://nodejs.org/download/release/v${{ matrix.node_ver }}/node-v${{ matrix.node_ver }}-linux-${{ matrix.t.nodearch }}.tar.xz | |
tar -Jxf node-v${{ matrix.node_ver }}-linux-${{ matrix.t.nodearch }}.tar.xz | |
mv node-v${{ matrix.node_ver }}-linux-${{ matrix.t.nodearch }} n | |
- run: npx [email protected] rebuild --arch=${{ matrix.t.gyparch }} --target=v${{ matrix.node_ver }} --openssl_fips='' --enable_native_tuning=0 | |
- uses: ./.github/actions/run_tests | |
with: | |
node: ${{ matrix.t.emu }} n/bin/node | |
# test other ISA levels for x86 | |
- run: | | |
$SDE_PATH/sde -p4p -- n/bin/node test/testenc | |
$SDE_PATH/sde -mrm -- n/bin/node test/testenc | |
$SDE_PATH/sde -snb -- n/bin/node test/testenc | |
$SDE_PATH/sde -hsw -- n/bin/node test/testenc | |
$SDE_PATH/sde -p4p -- n/bin/node test/testdec | |
$SDE_PATH/sde -mrm -- n/bin/node test/testdec | |
$SDE_PATH/sde -snb -- n/bin/node test/testdec | |
$SDE_PATH/sde -hsw -- n/bin/node test/testdec | |
$SDE_PATH/sde -p4p -- n/bin/node test/testcrc | |
$SDE_PATH/sde -wsm -- n/bin/node test/testcrc | |
if: ${{ matrix.t.arch == 'amd64' || matrix.t.arch == 'i386' }} | |
# TODO: MSYS tests? | |
# TODO: test w/ Apple Clang | |
# TODO: test varying 'native' configs, disabled 256b config | |
# TODO: big endian config |