Skip to content

Commit

Permalink
feat: Set up based on sse2neon
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Oct 18, 2023
1 parent 5ad3d2b commit 1090c78
Show file tree
Hide file tree
Showing 20 changed files with 23,204 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
BasedOnStyle: Chromium
Language: Cpp
MaxEmptyLinesToKeep: 3
IndentCaseLabels: false
AllowShortIfStatementsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: false
PointerAlignment: Right
SpaceAfterCStyleCast: true
TabWidth: 4
UseTab: Never
IndentWidth: 4
BreakBeforeBraces: Linux
AccessModifierOffset: -4
ForEachMacros:
- SET_FOREACH
- RB_FOREACH
AlignEscapedNewlines: Left
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.md text=auto
LICENSE text=auto

sse2rvv.h -text linguist-language=c
120 changes: 120 additions & 0 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Github Actions

on: [push, pull_request]

jobs:
host_x86:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [x86_64]
cxx_compiler: [g++-10, clang++-11]
steps:
- name: checkout code
uses: actions/checkout@v3.2.0
- name: build artifact
env:
CXX: ${{ matrix.cxx_compiler }}
run: |
sh scripts/cross-tool.sh
make check
sh scripts/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/20220906/llvm-mingw-20220906-ucrt-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@v3.2.0
- 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-20.04
strategy:
matrix:
arch_with_features: [{arch: armv7, feature: none}, {arch: aarch64, feature: none}, {arch: aarch64, feature: crypto+crc}]
cxx_compiler: [g++-10, clang++-11]
steps:
- name: checkout code
uses: actions/checkout@v3.2.0
- name: build artifact
# The Github Action for non-x86 CPU
# https://github.com/uraimo/run-on-arch-action
uses: uraimo/run-on-arch-action@v2.5.0
with:
arch: ${{ matrix.arch_with_features.arch }}
distro: ubuntu20.04
env: |
CXX: ${{ matrix.cxx_compiler }}
install: |
apt-get update -q -y
apt-get install -q -y "${{ matrix.cxx_compiler }}" make
apt-get install -q -y gcc
run: |
make FEATURE=${{ matrix.arch_with_features.feature }} check
host_win_msvc:
runs-on: windows-2022
steps:
- name: checkout code
uses: actions/checkout@v3.0.2

- name: add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1

- name: build artifact
run: msbuild sse2rvv.vcxproj -t:rebuild -property:Configuration=Release -property:Platform=ARM64

- name: upload artifact
uses: actions/upload-artifact@master
with:
name: msvc-arm64-artifact
path: ARM64

test_win_msvc:
runs-on: ubuntu-latest
container: linaro/wine-arm64
needs: host_win_msvc
steps:
- name: download artifact
uses: actions/download-artifact@master
with:
name: msvc-arm64-artifact

- name: Run tests
run: wine-arm64 cmd.exe /c 'Release\sse2rvv.exe'


coding_style:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v3.2.0
- name: style check
run: |
sudo apt-get install -q -y clang-format-12
sh scripts/check-format.sh
shell: bash
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.exe
*.o
*.gch
tests/*.d
tests/main
gcc-arm-*
.vs/
Debug/
Release/
*.vcxproj.user
Loading

0 comments on commit 1090c78

Please sign in to comment.