Added Vector support for primitive methods. #185
This file contains hidden or 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: Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test_soms: | |
| name: Run (Compiler=${{matrix.compiler}} GC=${{matrix.gc}} ${{matrix.cmake_flags}} | |
| runs-on: ubuntu-24.04 | |
| # continue-on-error: true | |
| strategy: | |
| fail-fast: false # we want all jobs to run, because they may fail independently | |
| matrix: | |
| compiler: [clang, gcc] | |
| gc: [GENERATIONAL, MARK_SWEEP, COPYING] | |
| cmake_flags: | |
| - "-DUSE_TAGGING=true" | |
| - "-DUSE_TAGGING=false -DCACHE_INTEGER=true" | |
| - "-DUSE_TAGGING=false -DCACHE_INTEGER=false -DUSE_VECTOR_PRIMITIVES=false" | |
| steps: | |
| - name: Checkout SOM Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install Apt Packages | |
| run: | | |
| sudo apt-get install libcppunit-dev | |
| # - name: Install PyTest | |
| # run: | | |
| # python3 -m pip install --upgrade pip | |
| # python3 -m pip install pytest | |
| - name: Install Clang 19 | |
| run: | | |
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| sudo add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main" | |
| sudo apt-get update | |
| sudo apt-get install -y clang-19 clang-tidy-19 | |
| if: matrix.compiler == 'clang' | |
| - name: Install Clang Format | |
| run: sudo apt-get install -y clang-format-19 | |
| if: matrix.compiler == 'clang' && matrix.gc == 'GENERATIONAL' | |
| - name: Build SOM VM | |
| run: | | |
| if [ "${{ matrix.compiler }}" = "clang" ] | |
| then | |
| export CC=clang-19 | |
| export CXX=clang++-19 | |
| else | |
| export CC=gcc | |
| export CXX=g++ | |
| fi | |
| echo $CC $CXX | |
| echo cmake . -DGC_TYPE=${{ matrix.gc}} ${{ matrix.cmake_flags }} | |
| mkdir cmake-build | |
| cd cmake-build | |
| cmake .. -DGC_TYPE=${{ matrix.gc}} ${{ matrix.cmake_flags }} -DCMAKE_BUILD_TYPE=Debug | |
| make -j5 | |
| - name: Run Unit Tests | |
| run: | | |
| cd cmake-build | |
| ./unittests -cp ../Smalltalk:../TestSuite/BasicInterpreterTests ../Examples/Hello.som | |
| ./SOM++ -prim-hash-check -cp ../Smalltalk ../Examples/Benchmarks/BenchmarkHarness.som VectorBenchmark 1 1 | |
| # - name: Run Integration Tests | |
| # run: | | |
| # EXECUTABLE=./cmake-build/SOM++ CLASSPATH=./Smalltalk pytest | |
| - name: Run Tests on SOM VM | |
| run: | | |
| cd cmake-build | |
| ./SOM++ -cp ../Smalltalk ../TestSuite/TestHarness.som | |
| - name: Clang Tidy | |
| if: matrix.compiler == 'clang' | |
| run: | | |
| clang-tidy-19 --config-file=.clang-tidy src/*.cpp src/**/*.cpp -- -fdiagnostics-absolute-paths -DGC_TYPE=${{ matrix.gc}} ${{ matrix.cmake_flags }} -DUNITTESTS | |
| - name: Clang Format | |
| if: matrix.compiler == 'clang' && matrix.gc == 'GENERATIONAL' | |
| run: | | |
| clang-format-19 --dry-run --style=file --Werror src/*.cpp src/**/*.cpp src/**/*.h | |
| # Disabled because it's too slow with the sanitizers | |
| # - name: Test SomSom | |
| # run: | | |
| # export ASAN_OPTIONS=detect_leaks=0 | |
| # cmake-build/SOM++ -cp Smalltalk:TestSuite:core-lib/SomSom/src/compiler:core-lib/SomSom/src/interpreter:core-lib/SomSom/src/primitives:core-lib/SomSom/src/vm:core-lib/SomSom/src/vmobjects core-lib/SomSom/tests/SomSomTests.som |