Skip to content

Commit 10575e1

Browse files
authored
(partial revert) ci: remove install build dependencies step on linux (microsoft#257064)
1 parent 8c19263 commit 10575e1

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.github/workflows/pr-linux-test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ jobs:
6464
if: steps.cache-node-modules.outputs.cache-hit == 'true'
6565
run: tar -xzf .build/node_modules_cache/cache.tgz
6666

67+
- name: Install build dependencies
68+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
69+
working-directory: build
70+
run: |
71+
set -e
72+
73+
for i in {1..5}; do # try 5 times
74+
npm ci && break
75+
if [ $i -eq 5 ]; then
76+
echo "Npm install failed too many times" >&2
77+
exit 1
78+
fi
79+
echo "Npm install failed $i, trying again..."
80+
done
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
6784
- name: Install dependencies
6885
if: steps.cache-node-modules.outputs.cache-hit != 'true'
6986
run: |

.github/workflows/pr-node-modules.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,23 @@ jobs:
113113
path: .build/node_modules_cache
114114
key: "node_modules-linux-${{ hashFiles('.build/packagelockhash') }}"
115115

116+
- name: Install build dependencies
117+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
118+
working-directory: build
119+
run: |
120+
set -e
121+
122+
for i in {1..5}; do # try 5 times
123+
npm ci && break
124+
if [ $i -eq 5 ]; then
125+
echo "Npm install failed too many times" >&2
126+
exit 1
127+
fi
128+
echo "Npm install failed $i, trying again..."
129+
done
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
116133
- name: Install dependencies
117134
if: steps.cache-node-modules.outputs.cache-hit != 'true'
118135
run: |

build/azure-pipelines/linux/product-build-linux.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,23 @@ steps:
100100
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
101101
displayName: Setup NPM Authentication
102102

103+
- script: |
104+
set -e
105+
106+
for i in {1..5}; do # try 5 times
107+
npm ci && break
108+
if [ $i -eq 5 ]; then
109+
echo "Npm install failed too many times" >&2
110+
exit 1
111+
fi
112+
echo "Npm install failed $i, trying again..."
113+
done
114+
workingDirectory: build
115+
env:
116+
GITHUB_TOKEN: "$(github-distro-mixin-password)"
117+
displayName: Install build dependencies
118+
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
119+
103120
# Step will be used by both verify glibcxx version for remote server and building rpm package,
104121
# hence avoid adding it behind NODE_MODULES_RESTORED condition.
105122
- script: |

0 commit comments

Comments
 (0)