diff --git a/.travis.yml b/.travis.yml index e0232b652..223ecb16c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,12 @@ install: - nvm install $NODE_VERSION - nvm use --delete-prefix $NODE_VERSION - npm install --global npm@6.2.0 - - script/build --create-debian-package --create-rpm-package --compress-artifacts + - script/bootstrap -script: - - script/lint - - script/test +script: > + script/lint && + script/build --no-bootstrap --create-debian-package --create-rpm-package --compress-artifacts && + script/test cache: directories: diff --git a/script/build b/script/build index eb595c13c..c70c27754 100755 --- a/script/build +++ b/script/build @@ -2,9 +2,13 @@ 'use strict' -// Run bootstrap first to ensure all the dependencies used later in this script -// are installed. -require('./bootstrap') +if (process.argv.includes('--no-bootstrap')) { + console.log('Skipping bootstrap') +} else { + // Bootstrap first to ensure all the dependencies used later in this script + // are installed. + require('./bootstrap') +} // Needed so we can require src/module-cache.coffee during generateModuleCache require('coffee-script/register') diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index 66fe73856..0839f89a5 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -12,15 +12,18 @@ jobs: container: atom-linux-ci steps: - - script: script/build --create-debian-package --create-rpm-package --compress-artifacts + - script: script/bootstrap + displayName: Bootstrap build environment + + - script: script/lint + displayName: Run linter + + - script: script/build --no-bootstrap --create-debian-package --create-rpm-package --compress-artifacts env: GITHUB_TOKEN: $(GITHUB_TOKEN) ATOM_RELEASE_VERSION: $(ReleaseVersion) displayName: Build Atom - - script: script/lint - displayName: Run linter - - script: script/test env: CI: true diff --git a/script/vsts/platforms/macos.yml b/script/vsts/platforms/macos.yml index f613bf15a..8dd72f6f2 100644 --- a/script/vsts/platforms/macos.yml +++ b/script/vsts/platforms/macos.yml @@ -19,11 +19,17 @@ jobs: - script: npm install --global npm@6.2.0 displayName: Update npm + - script: script/bootstrap + displayName: Bootstrap build environment + + - script: script/lint + displayName: Run linter + - script: | if [ $IS_RELEASE_BRANCH == "true" ] || [ $IS_SIGNED_ZIP_BRANCH == "true" ]; then - script/build --code-sign --compress-artifacts + script/build --no-bootstrap --code-sign --compress-artifacts else - script/build --compress-artifacts + script/build --no-bootstrap --compress-artifacts fi displayName: Build Atom env: @@ -36,9 +42,6 @@ jobs: ATOM_MAC_CODE_SIGNING_KEYCHAIN: $(ATOM_MAC_CODE_SIGNING_KEYCHAIN) ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD: $(ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD) - - script: script/lint - displayName: Run linter - - script: | osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver caffeinate -s script/test # Run with caffeinate to prevent screen saver diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index af8c8dc64..e84592788 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -36,6 +36,17 @@ jobs: npm install displayName: Install Windows build dependencies + - script: | + node script\vsts\windows-run.js script\bootstrap.cmd + env: + BUILD_ARCH: $(buildArch) + displayName: Bootstrap build environment + + - script: node script\vsts\windows-run.js script\lint.cmd + env: + BUILD_ARCH: $(buildArch) + displayName: Run linter + - script: | IF NOT EXIST C:\tmp MKDIR C:\tmp SET SQUIRREL_TEMP=C:\tmp @@ -61,11 +72,6 @@ jobs: IS_SIGNED_ZIP_BRANCH: $(IsSignedZipBranch) displayName: Build Atom - - script: node script\vsts\windows-run.js script\lint.cmd - env: - BUILD_ARCH: $(buildArch) - displayName: Run linter - - script: node script\vsts\windows-run.js script\test.cmd env: CI: true