Various improvements #472
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 4.2.1" | |
| uses: lukka/get-cmake@v4.2.1 | |
| - name: "Install LLVM and Clang" | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "15.0" | |
| - name: "Install dependencies via brew" | |
| run: | | |
| brew install python3 libomp | |
| - name: "Install Python dependencies" | |
| run: | | |
| python3 -m venv py_venv | |
| source py_venv/bin/activate | |
| pip install --upgrade pip setuptools wheel | |
| pip install --no-binary=:all: numpy scikit-learn humanize | |
| - name: "Set PYTHONPATH" | |
| run: | | |
| export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])") | |
| echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV | |
| - name: "Clone the PLSSVM repository into PLSSVM/" | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| path: PLSSVM | |
| - name: "Configure PLSSVM using CMake" | |
| run: | | |
| source py_venv/bin/activate | |
| cd PLSSVM | |
| export LDFLAGS="-L/opt/homebrew/opt/libomp/lib" | |
| export CPPFLAGS="-I/opt/homebrew/opt/libomp/include" | |
| 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 | |
| - name: "Build PLSSVM" | |
| shell: bash | |
| run: | | |
| source py_venv/bin/activate | |
| cd PLSSVM | |
| export LDFLAGS="-L/opt/homebrew/opt/libomp/lib" | |
| export CPPFLAGS="-I/opt/homebrew/opt/libomp/include" | |
| cmake --build --preset openmp_test --config ${{ matrix.build_type }} | |
| echo "${GITHUB_WORKSPACE}/PLSSVM/build" >> $GITHUB_PATH | |
| - name: "Run tests" | |
| run: | | |
| source py_venv/bin/activate | |
| cd PLSSVM | |
| export LDFLAGS="-L/opt/homebrew/opt/libomp/lib" | |
| export CPPFLAGS="-I/opt/homebrew/opt/libomp/include" | |
| ctest --preset openmp_test -C ${{ matrix.build_type }} -E ".*executable.*" --parallel 2 --output-on-failure --output-log ctest_result.txt --quiet | |
| # upload the ctest result | |
| - name: "Upload ctest result" | |
| if: always() | |
| uses: actions/upload-artifact@v6.0.0 | |
| with: | |
| name: ctest-result | |
| path: PLSSVM/ctest_result.txt |