Skip to content

Commit b37c013

Browse files
authored
ci: remove install build dependencies step on linux (microsoft#257050)
1 parent c3d67c3 commit b37c013

File tree

5 files changed

+10
-63
lines changed

5 files changed

+10
-63
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,6 @@ 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-
8467
- name: Install dependencies
8568
if: steps.cache-node-modules.outputs.cache-hit != 'true'
8669
run: |

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -113,23 +113,6 @@ 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-
133116
- name: Install dependencies
134117
if: steps.cache-node-modules.outputs.cache-hit != 'true'
135118
run: |

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,6 @@ 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-
120103
# Step will be used by both verify glibcxx version for remote server and building rpm package,
121104
# hence avoid adding it behind NODE_MODULES_RESTORED condition.
122105
- script: |

build/linux/debian/install-sysroot.js

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/linux/debian/install-sysroot.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import https from 'https';
1010
import path from 'path';
1111
import { createHash } from 'crypto';
1212
import { DebianArchString } from './types';
13-
import ansiColors from 'ansi-colors';
1413

1514
// Based on https://source.chromium.org/chromium/chromium/src/+/main:build/linux/sysroot_scripts/install-sysroot.py.
1615
const URL_PREFIX = 'https://msftelectronbuild.z5.web.core.windows.net';
@@ -98,22 +97,22 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000)
9897
});
9998
if (assetResponse.ok && (assetResponse.status >= 200 && assetResponse.status < 300)) {
10099
const assetContents = Buffer.from(await assetResponse.arrayBuffer());
101-
console.log(`Fetched response body buffer: ${ansiColors.magenta(`${(assetContents as Buffer).byteLength} bytes`)}`);
100+
console.log(`Fetched response body buffer: ${(assetContents as Buffer).byteLength} bytes`);
102101
if (options.checksumSha256) {
103102
const actualSHA256Checksum = createHash('sha256').update(assetContents).digest('hex');
104103
if (actualSHA256Checksum !== options.checksumSha256) {
105-
throw new Error(`Checksum mismatch for ${ansiColors.cyan(asset.url)} (expected ${options.checksumSha256}, actual ${actualSHA256Checksum}))`);
104+
throw new Error(`Checksum mismatch for ${asset.url} (expected ${options.checksumSha256}, actual ${actualSHA256Checksum}))`);
106105
}
107106
}
108-
console.log(`Verified SHA256 checksums match for ${ansiColors.cyan(asset.url)}`);
107+
console.log(`Verified SHA256 checksums match for ${asset.url}`);
109108
const tarCommand = `tar -xz -C ${options.dest}`;
110109
execSync(tarCommand, { input: assetContents });
111110
console.log(`Fetch complete!`);
112111
return;
113112
}
114-
throw new Error(`Request ${ansiColors.magenta(asset.url)} failed with status code: ${assetResponse.status}`);
113+
throw new Error(`Request ${asset.url} failed with status code: ${assetResponse.status}`);
115114
}
116-
throw new Error(`Request ${ansiColors.magenta('https://api.github.com')} failed with status code: ${response.status}`);
115+
throw new Error(`Request https://api.github.com failed with status code: ${response.status}`);
117116
} finally {
118117
clearTimeout(timeout);
119118
}

0 commit comments

Comments
 (0)