Fix: Missing initialization for on-stack string #160
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: Pre-Release | |
on: | |
push: | |
branches: ["main-dev"] | |
pull_request: | |
branches: ["main-dev"] | |
env: | |
BUILD_TYPE: Release | |
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
PYTHONUTF8: 1 | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
jobs: | |
test_ubuntu_gcc: | |
name: Ubuntu (GCC 12) | |
runs-on: ubuntu-22.04 | |
env: | |
CC: gcc-12 | |
CXX: g++-12 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main-dev | |
- run: git submodule update --init --recursive | |
# C/C++ | |
- name: Build C/C++ | |
run: | | |
sudo apt update | |
sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev gcc-12 g++-12 | |
cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRINGZILLA_BUILD_BENCHMARK=1 -DSTRINGZILLA_BUILD_TEST=1 | |
cmake --build build_artifacts --config RelWithDebInfo | |
- name: Test C++ | |
run: ./build_artifacts/stringzilla_test_cpp20 | |
- name: Test on Real World Data | |
run: | | |
./build_artifacts/stringzilla_bench_search ${DATASET_PATH} # for substring search | |
./build_artifacts/stringzilla_bench_token ${DATASET_PATH} # for hashing, equality comparisons, etc. | |
./build_artifacts/stringzilla_bench_similarity ${DATASET_PATH} # for edit distances and alignment scores | |
./build_artifacts/stringzilla_bench_sort ${DATASET_PATH} # for sorting arrays of strings | |
./build_artifacts/stringzilla_bench_container ${DATASET_PATH} # for STL containers with string keys | |
env: | |
DATASET_PATH: ./README.md | |
# Don't overload GitHub with our benchmarks. | |
# The results in such an unstable environment will be meaningless anyway. | |
if: 0 | |
# Python | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Build Python | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-repeat numpy | |
python -m pip install . | |
- name: Test Python | |
run: pytest scripts/test.py -s -x | |
# JavaScript | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Build and test JavaScript | |
run: npm ci && npm test |