Skip to content

Commit

Permalink
Add run with sanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
saharNooby committed Apr 19, 2023
1 parent 5fdd14e commit 3dd1248
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
47 changes: 46 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,49 @@ env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
ubuntu-latest-cmake-sanitizer:
runs-on: ubuntu-latest

continue-on-error: true

strategy:
matrix:
sanitizer: [ADDRESS, THREAD, UNDEFINED]
build_type: [Debug, Release]
accelerate: [ON, OFF]

steps:
- name: Clone
id: checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Dependencies
id: depends
run: |
sudo apt-get update
sudo apt-get install build-essential
- name: Build
id: cmake_build
run: |
mkdir build
cd build
cmake .. -DRWKV_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DRWKV_ACCELERATE=${{ matrix.accelerate }}
cmake --build . --config ${{ matrix.build_type }}
- name: Test
id: cmake_test
run: |
cd build
ctest --verbose
ubuntu-latest-cmake:
runs-on: ubuntu-latest

continue-on-error: true

steps:
- name: Clone
id: checkout
Expand Down Expand Up @@ -77,6 +117,8 @@ jobs:
macOS-latest-cmake:
runs-on: macOS-latest

continue-on-error: true

steps:
- name: Clone
id: checkout
Expand All @@ -92,10 +134,11 @@ jobs:
- name: Build
id: cmake_build
# FMA disabled because it gives "Illegal instruction" in GitHub Actions runner
run: |
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DRWKV_AVX2=OFF ..
cmake -DBUILD_SHARED_LIBS=ON -DRWKV_AVX2=OFF -DRWKV_FMA=OFF ..
cmake --build . --config Release
- name: Test
Expand Down Expand Up @@ -133,6 +176,8 @@ jobs:
windows-latest-cmake:
runs-on: windows-latest

continue-on-error: true

strategy:
matrix:
include:
Expand Down
2 changes: 1 addition & 1 deletion ggml
Submodule ggml updated from 2307ae to ce2edb

0 comments on commit 3dd1248

Please sign in to comment.