Skip to content

Commit 1761095

Browse files
authored
Restore CI (#155)
* Update actions * User * Use setup python * Error check and install sphinx * Fix install * Use old pylint * Fix style * Ignore error for now * Use older python * Update doxyfile * Run mock * Also install wheel * Revert python version update
1 parent cd0d5e4 commit 1761095

File tree

7 files changed

+1057
-502
lines changed

7 files changed

+1057
-502
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
with:
1616
submodules: recursive
1717

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
with:
1919
submodules: recursive
2020

.github/workflows/main.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.10'
2124

2225
- name: Setup Python
2326
run: |
24-
python3 -m pip install cpplint
27+
pip install -U pip wheel
28+
pip install cpplint
2529
- name: Setup@Ubuntu
2630
if: startsWith(matrix.os, 'ubuntu')
2731
run: |
2832
sudo apt-get install -y doxygen wget graphviz unzip
2933
- name: Lint
3034
if: startsWith(matrix.os, 'ubuntu')
3135
run: |
36+
pip install -r doc_requirements.txt
3237
./tests/scripts/task_lint.sh
3338
- name: Test
3439
run: |
3540
./tests/scripts/task_build.sh
41+
./bin/mock

contrib/dlpack/dlpackcpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class DLTContainer {
4646
void Reshape(const std::vector<int64_t>& shape) {
4747
shape_ = shape;
4848
int64_t sz = std::accumulate(std::begin(shape), std::end(shape),
49-
int64_t(1), std::multiplies<int64_t>());
49+
static_cast<int64_t>(1), std::multiplies<int64_t>());
5050
int ret = posix_memalign(&handle_.data, 256, sz);
5151
if (ret != 0) throw std::bad_alloc();
5252
handle_.shape = &shape_[0];

doc_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Sphinx==5.*
22
pydata-sphinx-theme==0.7.1
33
breathe>=4.31.0
4+
pylint==2.17.*

docs/Doxyfile

Lines changed: 1041 additions & 497 deletions
Large diffs are not rendered by default.

tests/scripts/task_lint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
mkdir -p bin
33

4+
set -e -o pipefail
5+
46
if [ ! -f bin/lint.py ]; then
57
echo "Grab linter ..."
68
wget https://raw.githubusercontent.com/dmlc/dmlc-core/main/scripts/lint.py
@@ -10,6 +12,8 @@ fi
1012
echo "Check codestyle of c++ code..."
1113
python bin/lint.py dlpack cpp include contrib
1214

15+
set +e
16+
1317
echo "Check doxygen generation..."
1418
make doc 2>log.txt
1519
(cat log.txt| grep -v ENABLE_PREPROCESSING |grep -v "unsupported tag") > logclean.txt

0 commit comments

Comments
 (0)