Skip to content

Add support for modular build structure. #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,68 @@

name: "Apple MacOS"

on:
on:
push:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
build:
name: "MacOS 11 clang -std=c++${{matrix.cxxstd}}"
runs-on: macos-11
name: "MacOS clang -std=c++${{matrix.cxxstd}}"
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
cxxstd: [2a]
cxxstd: [20,23]

steps:
- uses: actions/checkout@v2

- name: Git Clone Boost.uBlas
run: |
cd ${GITHUB_WORKSPACE}
cd ..

git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
echo "BOOST_ROOT=${PWD}" >> ${GITHUB_ENV}
echo $BOOST_ROOT

git submodule update --init --depth=1 --jobs 8 tools/build
git submodule update --init --depth=1 --jobs 8 libs/config
git submodule update --init --depth=1 --jobs 8 tools/boostdep

mkdir -p libs/numeric/
cp -rp ${GITHUB_WORKSPACE}/. libs/numeric/ublas
python tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas

- name: Bootstrap and Compile Boost.uBlas
run: |
cd $BOOST_ROOT
./bootstrap.sh
./b2 -j8 headers
echo "using clang : : $(brew --prefix llvm)/bin/clang++ ;" >> ~/user-config.jam;
echo "using clang ;" >> ~/user-config.jam;



- name: Test Benchmarks
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j8 benchmarks cxxstd=${{matrix.cxxstd}}

- name: Test Tensor Examples
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j8 examples/tensor cxxstd=${{matrix.cxxstd}}

- name: Test Tensor
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j8 test/tensor cxxstd=${{matrix.cxxstd}}

22 changes: 11 additions & 11 deletions .github/workflows/clangtidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

name: "Static Analysis"

on:
on:
push:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
Expand All @@ -20,33 +20,33 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Install Clang 11
run: sudo apt-get update && sudo apt-get install -y clang-11 clang-tidy-11

- name: "Install Boost from Source"
run: |
cd ..
git clone --depth 1 https://github.com/boostorg/boost.git --recursive --shallow-submodules
cd boost
./bootstrap.sh
./bootstrap.sh
./b2 headers
sudo cp -r -L boost /usr/include
rm -rf boost

- name: "Run Clang-Tidy"
run: clang-tidy-11 examples/tensor/*.cpp test/tensor/*.cpp -- -Iinclude -std=c++20 > reports.txt

- name: "Print Clang-Tidy Report"
run: cat reports.txt

- uses: actions/setup-python@v2

- name: "Post review comments"
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
pip3 install 'unidiff~=0.6.0' --force-reinstall
pip3 install 'PyGithub~=1.51' --force-reinstall
pip3 install 'requests~=2.23' --force-reinstall
python ./.ci/post_review.py --repository ${{ github.repository }} --token ${{ github.token}} --pr ${{ github.event.pull_request.number }} --path reports.txt
python ./.ci/post_review.py --repository ${{ github.repository }} --token ${{ github.token}} --pr ${{ github.event.pull_request.number }} --path reports.txt

6 changes: 4 additions & 2 deletions benchmarks/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

project boost/ublas/benchmarks
: requirements <library>/boost/program_options//boost_program_options
project
: requirements
<library>/boost/ublas//boost_ublas
<library>/boost/program_options//boost_program_options
;

exe add : add.cpp ;
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/opencl/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ../../clblas ;
using opencl ;
using clblas ;

project boost/ublas/benchmarks/opencl
project
: requirements
<library>/boost/program_options//boost_program_options
<toolset>gcc:<cxxflags>-Wno-ignored-attributes
Expand Down
34 changes: 34 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

constant boost_dependencies :
/boost/compute//boost_compute
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/interval//boost_interval
/boost/iterator//boost_iterator
/boost/mpl//boost_mpl
/boost/range//boost_range
/boost/serialization//boost_serialization
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits
/boost/typeof//boost_typeof ;

project /boost/ublas
;

explicit
[ alias boost_ublas : : :
: <include>include <library>$(boost_dependencies) ]
[ alias all : boost_ublas benchmarks examples/tensor test ]
;

call-if : boost-library ublas
;

11 changes: 7 additions & 4 deletions examples/tensor/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

import ../../../../config/checks/config : requires ;

import-search /boost/config/checks ;
import config : requires ;

# Project settings
project boost-ublas-tensor-example
project
: requirements
<library>/boost/ublas//boost_ublas
<define>BOOST_UBLAS_NO_EXCEPTIONS
<toolset>vacpp:<define>"BOOST_UBLAS_NO_ELEMENT_PROXIES"
<toolset>gcc:<cxxflags>"-Wall -pedantic -Wextra -Wno-unknown-pragmas"
<toolset>clang:<cxxflags>"-Wall -pedantic -Wextra -Wno-unknown-pragmas"
<toolset>msvc:<cxxflags>"/W4" # == all
[ requires cxx17_if_constexpr ]
<cxxstd>20
;

exe access_tensor : access_tensor.cpp ;
exe access_tensor : access_tensor.cpp /boost/multiprecision//boost_multiprecision ;
exe simple_expressions : simple_expressions.cpp ;
exe multiply_tensors_product_function : multiply_tensors_product_function.cpp ;
exe multiply_tensors_einstein_notation : multiply_tensors_einstein_notation.cpp ;
Expand Down
Loading
Loading