Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Setup Python
run: |
python3 -m pip install cpplint
pip install -U pip wheel
pip install cpplint
- name: Setup@Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install -y doxygen wget graphviz unzip
- name: Lint
if: startsWith(matrix.os, 'ubuntu')
run: |
pip install -r doc_requirements.txt
./tests/scripts/task_lint.sh
- name: Test
run: |
./tests/scripts/task_build.sh
./bin/mock
2 changes: 1 addition & 1 deletion contrib/dlpack/dlpackcpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DLTContainer {
void Reshape(const std::vector<int64_t>& shape) {
shape_ = shape;
int64_t sz = std::accumulate(std::begin(shape), std::end(shape),
int64_t(1), std::multiplies<int64_t>());
static_cast<int64_t>(1), std::multiplies<int64_t>());
int ret = posix_memalign(&handle_.data, 256, sz);
if (ret != 0) throw std::bad_alloc();
handle_.shape = &shape_[0];
Expand Down
1 change: 1 addition & 0 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Sphinx==5.*
pydata-sphinx-theme==0.7.1
breathe>=4.31.0
pylint==2.17.*
1,538 changes: 1,041 additions & 497 deletions docs/Doxyfile

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tests/scripts/task_lint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
mkdir -p bin

set -e -o pipefail

if [ ! -f bin/lint.py ]; then
echo "Grab linter ..."
wget https://raw.githubusercontent.com/dmlc/dmlc-core/main/scripts/lint.py
Expand All @@ -10,6 +12,8 @@ fi
echo "Check codestyle of c++ code..."
python bin/lint.py dlpack cpp include contrib

set +e

echo "Check doxygen generation..."
make doc 2>log.txt
(cat log.txt| grep -v ENABLE_PREPROCESSING |grep -v "unsupported tag") > logclean.txt
Expand Down