diff --git a/README.md b/README.md index 9f052ccff..55d93aff7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Atom](https://cloud.githubusercontent.com/assets/72919/2874231/3af1db48-d3dd-11e3-98dc-6066f8bc766f.png) -[![macOS Build Status](https://travis-ci.org/atom/atom.svg?branch=master)](https://travis-ci.org/atom/atom) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom) +[![macOS Build Status](https://circleci.com/gh/atom/atom.svg?style=svg)](https://circleci.com/gh/atom/atom) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom) [![Dependency Status](https://david-dm.org/atom/atom.svg)](https://david-dm.org/atom/atom) [![Join the Atom Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/) diff --git a/circle.yml b/circle.yml index a55900cca..95ebb024c 100644 --- a/circle.yml +++ b/circle.yml @@ -1,4 +1,38 @@ +machine: + environment: + XCODE_SCHEME: test + XCODE_WORKSPACE: test + XCODE_PROJECT: test + + xcode: + version: 7.3 + general: - branches: - only: - - io-circle-ci + artifacts: + - out/Atom.zip + +dependencies: + pre: + - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash + - nvm install 4.4.7 + - nvm use 4.4.7 + - npm install -g npm + - script/fingerprint-clean + + override: + - script/bootstrap + + post: + - script/fingerprint-write + + cache_directories: + - apm/node_modules + - build/node_modules + - node_modules + +test: + override: + - script/grunt ci + + post: + - zip -r out/Atom.zip out/Atom.app diff --git a/script/fingerprint-clean b/script/fingerprint-clean new file mode 100755 index 000000000..659395190 --- /dev/null +++ b/script/fingerprint-clean @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var fingerprint = require('./utils/fingerprint') +var fs = require('fs') +var path = require('path') + +if (!fs.existsSync(path.resolve(__dirname, '..', 'node_modules', '.atom-ci-fingerprint'))) { + return +} + +if (fingerprint.fingerprintMatches()) { + console.log('node_modules matches current fingerprint ' + fingerprint.fingerprint() + ' - not removing') + return +} + +var fsPlus +try { + fsPlus = require('fs-plus') +} catch (error) { + console.log(error.message) + return +} + +try { + fsPlus.removeSync(path.resolve(__dirname, '..', 'node_modules')) + fsPlus.removeSync(path.resolve(__dirname, '..', 'apm', 'node_modules')) +} catch (error) { + console.error(error.message) + process.exit(1) +} diff --git a/script/fingerprint-write b/script/fingerprint-write new file mode 100755 index 000000000..e5fad4d72 --- /dev/null +++ b/script/fingerprint-write @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./utils/fingerprint').writeFingerprint()