Skip to content

perf: reduce memory usage #177

perf: reduce memory usage

perf: reduce memory usage #177

Workflow file for this run

name: test
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
env:
# preferably should write to a log file instead
UBSAN_OPTIONS: halt_on_error=1
ASAN_OPTIONS: halt_on_error=1
TSAN_OPTIONS: halt_on_error=1
jobs:
unix:
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: ubuntu gcc asan
os: ubuntu-latest
flags: -D CMAKE_CXX_COMPILER=g++ -D FZX_ENABLE_ASAN=ON -D FZX_ENABLE_UBSAN=ON
- name: ubuntu clang asan
os: ubuntu-latest
flags: -D CMAKE_CXX_COMPILER=clang++ -D FZX_ENABLE_ASAN=ON -D FZX_ENABLE_UBSAN=ON
- name: ubuntu clang tsan
os: ubuntu-latest
flags: -D CMAKE_CXX_COMPILER=clang++ -D FZX_ENABLE_TSAN=ON
- name: macos clang ubsan
os: macos-latest
flags: -D FZX_ENABLE_UBSAN=ON
- name: aarch64
os: ubuntu-latest
flags: -D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -D FZX_ENABLE_NATIVE=OFF -D FZX_ENABLE_NEON=ON
qemu: 'qemu-aarch64 -L /usr/aarch64-linux-gnu'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: ./.github/workflows/install_deps.sh
- name: Install cross-compiler and qemu
if: ${{ matrix.name == 'aarch64' }}
run: sudo apt-get install -y g++-aarch64-linux-gnu qemu-user qemu-system-arm qemu-efi
- name: Configure CMake
run: >
cmake
-G Ninja
-B ${{ github.workspace }}/build
-D CMAKE_BUILD_TYPE=Debug
-D FZX_BUILD_EXECUTABLE=OFF
-D FZX_BUILD_LUA_MODULE=OFF
-D FZX_BUILD_TESTS=ON
${{ matrix.flags }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ github.workspace }}/build --config Debug
- name: Run tests
working-directory: ${{ github.workspace }}/build
run: ${{ matrix.qemu }} bin/test
win:
name: windows msvc
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure CMake
run: >
cmake
-B ${{ github.workspace }}/build
-D CMAKE_BUILD_TYPE=Debug
-D CMAKE_CXX_COMPILER=cl
-D FZX_BUILD_EXECUTABLE=OFF
-D FZX_BUILD_LUA_MODULE=OFF
-D FZX_BUILD_TESTS=ON
${{ matrix.flags }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ github.workspace }}/build --config Debug
- name: Run tests
working-directory: ${{ github.workspace }}/build
run: bin/Debug/test.exe