Skip to content
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
34 changes: 17 additions & 17 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
fail-fast: false
matrix:
cxxstd: [2a]
cxxstd: [20,2b]

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}}

38 changes: 21 additions & 17 deletions .github/workflows/clangtidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,52 @@

name: "Static Analysis"

on:
on:
push:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
check:
name: Linux Clang-Tidy
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

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

- uses: actions/checkout@v4

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

- name: Setup
run: sudo apt-get update && sudo apt-get -y install sudo python3 git g++ curl xz-utils

- 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
run: clang-tidy 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


- uses: actions/setup-python@v5
with: { 'python-version': '3' }

- 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

76 changes: 47 additions & 29 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,96 @@

name: "Linux"

on:
on:
push:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
paths-ignore:
paths-ignore:
- '**.md'
- 'doc/**'

jobs:
build:
name: Ubuntu 20.04 "cxx=${{matrix.config.cxx}}, std=c++${{matrix.config.cxxstd}}, variant=c++${{matrix.config.variant}}"
runs-on: ubuntu-20.04
name: Ubuntu "cxx=${{matrix.config.cxx}}, std=c++${{matrix.config.cxxstd}}, variant=c++${{matrix.config.variant}}"
runs-on: ubuntu-latest
container:
image: ${{matrix.config.container}}
volumes:
- /node20217:/node20217:rw,rshared
- ${{ startsWith(matrix.config.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
strategy:
fail-fast: true
fail-fast: false
# If any compiler fails to compile, continue CI for next compiler in matrix instead of failing early
matrix:
config:
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: debug, opt: off}
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off}
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5}
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5}
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: debug, opt: off}
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp}
config:
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: debug, opt: off, container: 'ubuntu:20.04' }
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off, container: 'ubuntu:20.04' }
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5, container: 'ubuntu:20.04' }
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5, container: 'ubuntu:20.04' }
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: debug, opt: off, container: 'ubuntu:20.04' }
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp, container: 'ubuntu:20.04' }

steps:
- uses: actions/checkout@v2

- name: Setup container environment
if: matrix.config.container
run: |
apt-get update
apt-get -y install sudo python3 git g++ curl xz-utils

- name: Install nodejs20glibc2.17
if: ${{ startsWith( matrix.config.container, 'ubuntu:1' ) }}
run: |
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
ldd /__e/node20/bin/node

- name: Install g++-10
if: matrix.config.cxx == 'g++-10'
run: sudo apt update && sudo apt-get install -y g++-10 libomp-dev
run: sudo apt update && sudo apt-get install -y g++-10 libomp-dev

- name: Install Clang 10
if: matrix.config.cxx == 'clang++-10'
run: sudo apt-get update && sudo apt-get install -y clang-10

- name: Install Clang 11
if: matrix.config.cxx == 'clang++-11'
run: sudo apt-get update && sudo apt-get install -y clang-11


- uses: actions/checkout@v4

- 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
python3 tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas

- name: Bootstrap Boost and Compile Boost
run: |
cd $BOOST_ROOT
./bootstrap.sh
./b2 -j8 headers
echo "using ${{ matrix.config.name }} : : ${{ matrix.config.cxx }} ;" >> ~/user-config.jam;

# - name: Test Benchmarks
# run: |
# cd $BOOST_ROOT
# cd libs/numeric/ublas
# $BOOST_ROOT/b2 -j 4 benchmarks toolset=clang cxxstd=${{matrix.config.cxxstd}} cxxflags="-O3"

- name: Test Tensor Examples
run: |
cd $BOOST_ROOT/libs/numeric/ublas
Expand All @@ -86,7 +104,7 @@ jobs:
else
$BOOST_ROOT/b2 -j8 examples/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}} cxxflags="${{matrix.config.cxxflags}}" linkflags="${{matrix.config.ldflags}}"
fi

- name: Test Tensor Unit-Tests
run: |
cd $BOOST_ROOT/libs/numeric/ublas
Expand All @@ -95,5 +113,5 @@ jobs:
$BOOST_ROOT/b2 -j8 test/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}}
else
$BOOST_ROOT/b2 -j8 test/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}} cxxflags="${{matrix.config.cxxflags}}" linkflags="${{matrix.config.ldflags}}"
fi
fi

Loading
Loading