Fix relative paths for Tsetlini discovery with cmake #326
Workflow file for this run
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: Clang sanitizer | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'GH[1-9]+[0-9]*-*' | |
jobs: | |
build-and-run-sanitized-code: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-20.04 | |
env: | |
CXX: clang++-11 | |
CXX_FLAGS: -Wall -Werror -march=native -mno-avx512f -fsanitize=address -fsanitize=undefined | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update apt | |
run: sudo apt-get update -y | |
- name: Install CMake | |
run: sudo apt-get install -y cmake | |
- name: Install compiler | |
run: sudo apt-get install -y ${CXX} | |
- name: Configure | |
working-directory: .build | |
run: | | |
cmake -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. | |
- name: Build | |
working-directory: .build | |
run: | | |
cmake --build . -- -j2 | |
- name: Run tests | |
working-directory: .build/lib | |
run: ctest -j 2 --output-on-failure #--rerun-failed | |
- name: Run 'Noisy XOR' classic classifier example | |
working-directory: .build/lib/examples/noisy-xor | |
run: | | |
wget https://raw.githubusercontent.com/cair/TsetlinMachineCython/79f0be5c9b259d2364b4ec86d46bb6f9fd4ce787/NoisyXORTrainingData.txt | |
wget https://raw.githubusercontent.com/cair/TsetlinMachineCython/79f0be5c9b259d2364b4ec86d46bb6f9fd4ce787/NoisyXORTestData.txt | |
./noisy-xor | |
- name: Run 'MNIST digits 2' bitwise weighted classifier example for 1 epoch | |
working-directory: .build/lib/examples/mnist-digits-2-new | |
run: | | |
wget https://github.com/cair/fast-tsetlin-machine-with-mnist-demo/raw/6d317dddcdb610c23deb89018d570bfc1b225657/BinarizedMNISTData.zip | |
unzip BinarizedMNISTData.zip | |
echo "Truncating train and test data files to 1000 lines each." | |
sed -i '1001,$ d' MNISTTraining.txt | |
sed -i '1001,$ d' MNISTTest.txt | |
./mnist-digits-2-new-bitwise-weighted -n 1 | |
- name: Run 'California housing' classic & bitwise regressor example for 1 epoch | |
working-directory: .build/lib/examples/california-housing | |
run: | | |
pip3 install --user numpy scikit-learn | |
python3 ../../../../lib/examples/california-housing/src/produce_dataset_alt.py | |
sed -i '5001,$ d' CaliforniaHousingData_X.txt | |
sed -i '5001,$ d' CaliforniaHousingData_Y.txt | |
./california-housing-bitwise -n 1 | |
sed -i '1001,$ d' CaliforniaHousingData_X.txt | |
sed -i '1001,$ d' CaliforniaHousingData_Y.txt | |
./california-housing -n 1 |