From b38ebd6b69e501bb22c2d0f6ae064eb06c05f4ab Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Sat, 14 Apr 2018 22:42:43 -0600 Subject: [PATCH 1/7] build(release): initial adoption of semantic-release and commitlint --- package.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 57d23a3..e703a60 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ } }, "scripts": { + "commitmsg": "commitlint -e $GIT_PARAMS", "test": "apm test", "lint": "eslint ." }, @@ -64,6 +65,12 @@ "clang-flags": "^0.2.2" }, "devDependencies": { + "@commitlint/cli": "^6.1.3", + "@commitlint/config-conventional": "^6.1.3", + "@commitlint/travis-cli": "^6.1.3", + "@semantic-release/apm-config": "^2.0.1", + "husky": "^0.14.3", + "semantic-release": "^15.1.7", "eslint": "^4.6.0", "eslint-config-airbnb-base": "^12.0.0", "eslint-plugin-import": "^2.7.0", @@ -92,5 +99,13 @@ "browser": true, "node": true } + }, + "release": { + "extends": "@semantic-release/apm-config" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] } -} +} \ No newline at end of file From 9253e415705a96954543e51577573ad7fc43cde1 Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Mon, 16 Apr 2018 13:19:14 -0600 Subject: [PATCH 2/7] ci: add semantic-release step --- .circleci/config.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65717c7..18e1505 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,6 +84,22 @@ jobs: name: Atom test command: ./build-package.sh + + release: + <<: *defaults + steps: + # Restore project state + - attach_workspace: + at: /tmp + - run: + name: semantic-release + command: npx semantic-release + # Cache node_modules + - save_cache: + paths: + - node_modules + key: v2-dependencies-{{ checksum "package.json" }} + workflows: version: 2 test_package: @@ -95,3 +111,9 @@ workflows: - beta: requires: - checkout_code + - release: + requires: + - stable + filters: + branches: + only: master From 2ee0e4443fb75c59ae33b43e9def3ed0493ddb68 Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Mon, 16 Apr 2018 14:37:59 -0600 Subject: [PATCH 3/7] ci: downgrade clang image to 3.8 This is the most recent of the clang images correctly building at the moment. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 18e1505..aea9d23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 defaults: &defaults working_directory: /tmp/project docker: - - image: walberla/buildenv-ubuntu-clang:4.0 + - image: walberla/buildenv-ubuntu-clang:3.8 environment: CIRCLE_BUILD_IMAGE: ubuntu ATOM_CHANNEL: stable From 04b5885f082d2de25c33342bcf56780053ea72ef Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Mon, 16 Apr 2018 15:43:50 -0600 Subject: [PATCH 4/7] ci: update base image and install the latest clang to it --- .circleci/config.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aea9d23..1086839 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,11 +3,7 @@ version: 2 defaults: &defaults working_directory: /tmp/project docker: - - image: walberla/buildenv-ubuntu-clang:3.8 - environment: - CIRCLE_BUILD_IMAGE: ubuntu - ATOM_CHANNEL: stable - DISPLAY: :99 + - image: arcanemagus/atom-docker-ci:stable jobs: checkout_code: @@ -41,11 +37,10 @@ jobs: at: /tmp - run: name: Update APT - command: apt-get update - # Install some pre-requisite packages and missing dependencies from the atom package + command: sudo apt-get update - run: - name: Atom Prerequisites - command: apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install sudo xvfb libxss1 libasound2 + name: Install Clang + command: sudo apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install clang # Fire up a VFB to run Atom in - run: name: Create VFB for Atom to run in @@ -62,19 +57,17 @@ jobs: beta: <<: *defaults - environment: - ATOM_CHANNEL: beta + image: arcanemagus/atom-docker-ci:beta steps: # Restore project state - attach_workspace: at: /tmp - run: name: Update APT - command: apt-get update - # Install some pre-requisite packages and missing dependencies from the atom package + command: sudo apt-get update - run: - name: Atom Prerequisites - command: apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install sudo xvfb libxss1 libasound2 + name: Install Clang + command: sudo apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install clang # Fire up a VFB to run Atom in - run: name: Create VFB for Atom to run in From 5b629342e5ea62b527aa0edbd69c87dacda78944 Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Tue, 17 Apr 2018 11:46:29 -0600 Subject: [PATCH 5/7] test: downgrade specs to match range given by clang <4 Clang 3.8 is what the ci is consistently running at the moment. Have made not of this descrepency is the spec source code. --- spec/linter-clang-spec.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/spec/linter-clang-spec.js b/spec/linter-clang-spec.js index e5095df..2fc45e0 100644 --- a/spec/linter-clang-spec.js +++ b/spec/linter-clang-spec.js @@ -43,7 +43,8 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.c`); - expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); + // The Range on clang >= 4.0 is [[1, 9], [1, 20]] + expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); }); it('finds a fatal error in "missing_import.cpp"', async () => { @@ -53,7 +54,8 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.cpp`); - expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); + // The Range on clang >= 4.0 is [[1, 9], [1, 20]] + expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); }); it('finds a fatal error in "missing_import.m"', async () => { @@ -63,7 +65,8 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.m`); - expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); + // The Range on clang >= 4.0 is [[1, 9], [1, 20]] + expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); }); it('finds a fatal error in "missing_import.mm"', async () => { @@ -73,7 +76,8 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.mm`); - expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); + // The Range on clang >= 4.0 is [[1, 9], [1, 20]] + expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); }); }); @@ -122,7 +126,8 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(validPath); - expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); + // The Range on clang >= 4.0 is [[1, 9], [1, 20]] + expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); }); it('handles multiple ranges', async () => { From 502f0ad9eac6923eb78d30493d89883c699d8d82 Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Tue, 17 Apr 2018 11:53:01 -0600 Subject: [PATCH 6/7] revert: "test: downgrade specs to match range given by clang <4" This reverts commit 5b629342e5ea62b527aa0edbd69c87dacda78944. --- spec/linter-clang-spec.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/spec/linter-clang-spec.js b/spec/linter-clang-spec.js index 2fc45e0..e5095df 100644 --- a/spec/linter-clang-spec.js +++ b/spec/linter-clang-spec.js @@ -43,8 +43,7 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.c`); - // The Range on clang >= 4.0 is [[1, 9], [1, 20]] - expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); + expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); }); it('finds a fatal error in "missing_import.cpp"', async () => { @@ -54,8 +53,7 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.cpp`); - // The Range on clang >= 4.0 is [[1, 9], [1, 20]] - expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); + expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); }); it('finds a fatal error in "missing_import.m"', async () => { @@ -65,8 +63,7 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.m`); - // The Range on clang >= 4.0 is [[1, 9], [1, 20]] - expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); + expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); }); it('finds a fatal error in "missing_import.mm"', async () => { @@ -76,8 +73,7 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(`${miPath}.mm`); - // The Range on clang >= 4.0 is [[1, 9], [1, 20]] - expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); + expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); }); }); @@ -126,8 +122,7 @@ describe('The Clang provider for AtomLinter', () => { expect(messages[0].severity).toBe('error'); expect(messages[0].excerpt).toBe("'nothing.h' file not found"); expect(messages[0].location.file).toBe(validPath); - // The Range on clang >= 4.0 is [[1, 9], [1, 20]] - expect(messages[0].location.position).toEqual([[1, 9], [1, 17]]); + expect(messages[0].location.position).toEqual([[1, 9], [1, 20]]); }); it('handles multiple ranges', async () => { From 54cdd3f4a4884875afef9338fcbce7679b3968b1 Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Tue, 17 Apr 2018 11:53:46 -0600 Subject: [PATCH 7/7] ci: install clang 4 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1086839..10b5d47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ jobs: command: sudo apt-get update - run: name: Install Clang - command: sudo apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install clang + command: sudo apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install clang-4.0 # Fire up a VFB to run Atom in - run: name: Create VFB for Atom to run in @@ -67,7 +67,7 @@ jobs: command: sudo apt-get update - run: name: Install Clang - command: sudo apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install clang + command: sudo apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install clang-4.0 # Fire up a VFB to run Atom in - run: name: Create VFB for Atom to run in