Various improvements #485
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: macOS CPU | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| macOS-Test: | |
| runs-on: macos-15-intel | |
| strategy: | |
| matrix: | |
| build_type: [Debug, Release] | |
| steps: | |
| - name: "Install cmake 3.31.0" | |
| uses: lukka/get-cmake@v3.31.0 | |
| - name: "Install dependencies via brew" | |
| run: | | |
| brew install libomp | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6.1.0 | |
| with: | |
| python-version: "3.12" | |
| - name: "Install Python dependencies" | |
| run: | | |
| pip install --upgrade pip setuptools wheel | |
| pip install numpy scikit-learn humanize | |
| - name: "Clone the PLSSVM repository into PLSSVM/" | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| path: PLSSVM | |
| - name: "Configure PLSSVM using CMake" | |
| run: | | |
| cd PLSSVM | |
| cmake --preset openmp_test -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_ENABLE_MPI=OFF -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20 -DPLSSVM_ENABLE_LTO=OFF -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp" -DOpenMP_CXX_LIB_NAMES="omp" -DOpenMP_omp_LIBRARY="/usr/local/opt/libomp/lib/libomp.dylib" -DOpenMP_CXX_INCLUDE_DIRS="/usr/local/opt/libomp/include" | |
| - name: "Build PLSSVM" | |
| shell: bash | |
| run: | | |
| cd PLSSVM | |
| export CPLUS_INCLUDE_PATH="/usr/local/opt/libomp/include":$CPLUS_INCLUDE_PATH | |
| cmake --build --preset openmp_test --config ${{ matrix.build_type }} | |
| echo "${GITHUB_WORKSPACE}/PLSSVM/build" >> $GITHUB_PATH | |
| - name: "Run tests" | |
| run: | | |
| cd PLSSVM | |
| export LD_LIBRARY_PATH="/usr/local/opt/libomp/lib":$LD_LIBRARY_PATH | |
| ctest --preset openmp_test -C ${{ matrix.build_type }} -E ".*Executable.*" --parallel 2 --output-on-failure |