Skip to content

Commit 6c476a8

Browse files
committed
update
1 parent 35845a9 commit 6c476a8

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
git gcc g++ make cmake ninja-build curl \
7474
libgl1 libglib2.0-0 libsndfile1
7575
76+
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
77+
- name: Config git
78+
run: |
79+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
80+
7681
- name: Checkout
7782
uses: actions/checkout@v4
7883

@@ -141,6 +146,11 @@ jobs:
141146
id: update-readme
142147
run: |
143148
python .ci/benchmark.py --update-readme --path benchmark/ascend_npu_benchmark.json
149+
if git diff --quiet README.md; then
150+
echo "changed=false" >> $GITHUB_OUTPUT
151+
else
152+
echo "changed=true" >> $GITHUB_OUTPUT
153+
fi
144154
145155
# https://github.com/peter-evans/create-pull-request
146156
- name: Create a pull request for changes to README.md

.github/workflows/_ascend_npu_build.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,21 @@ jobs:
3939
outputs:
4040
dist_name: ${{ steps.list-dist.outputs.dist_name }}
4141
steps:
42+
- name: Config mirrors
43+
run: |
44+
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
45+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
46+
4247
# TODO(shink): Should we add these dependencies to the image?
4348
- name: Install system dependencies
4449
run: |
45-
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
46-
apt update
47-
apt install --no-install-recommends -y git gcc g++ make cmake ninja-build
50+
apt-get update
51+
apt-get install -y git gcc g++ make cmake ninja-build
52+
53+
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
54+
- name: Config git
55+
run: |
56+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
4857
4958
- name: Checkout
5059
uses: actions/checkout@v4
@@ -60,6 +69,15 @@ jobs:
6069
submodules: recursive
6170
path: torch_npu
6271

72+
- name: Tmp
73+
run: |
74+
set -x
75+
pwd
76+
ls -al .
77+
echo $GITHUB_WORKSPACE
78+
git status
79+
git diff --quiet README.md
80+
6381
- name: Install pip dependencies
6482
working-directory: torch_npu
6583
run: |

.github/workflows/_ascend_npu_ut.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,20 @@ jobs:
5555
run: |
5656
npu-smi info
5757
58-
- name: Install system dependencies
58+
- name: Config mirrors
5959
run: |
6060
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
61-
apt update
62-
apt install --no-install-recommends -y git gcc g++ make cmake ninja-build
61+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
62+
63+
- name: Install system dependencies
64+
run: |
65+
apt-get update
66+
apt-get install -y git gcc g++ make cmake ninja-build
67+
68+
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
69+
- name: Config git
70+
run: |
71+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
6372
6473
- name: Checkout
6574
uses: actions/checkout@v4

0 commit comments

Comments
 (0)