Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[build] add Danger check for correct submodule pin
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaefer committed Jan 9, 2018
1 parent 966606a commit 2039303
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 91 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "8"

sudo: false

install:
- npm install --ignore-scripts

script:
- npm run danger-ci
112 changes: 56 additions & 56 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
os: Visual Studio 2015
platform: x64

environment:
matrix:
- configuration: Release

shallow_clone: true

branches:
only:
- master

cache:
- '%APPVEYOR_BUILD_FOLDER%\mason_packages'
- '%APPVEYOR_BUILD_FOLDER%\LLVM-5.0.1-win64.exe'
- '%APPVEYOR_BUILD_FOLDER%\cmake-3.10.1-win64-x64.zip'

install:
- ps: |
if (!(Test-Path LLVM-5.0.1-win64.exe)) {
appveyor DownloadFile https://releases.llvm.org/5.0.1/LLVM-5.0.1-win64.exe
}
scripts\check-sha256.ps1 LLVM-5.0.1-win64.exe 981543611D719624ACB29A2CFFD6A479CFF36E8AB5EE8A57D8ECA4F9C4C6956F
Start-Process -FilePath 'LLVM-5.0.1-win64.exe' -ArgumentList '/S','/D=C:\LLVM-5.0.1' -Wait
- ps: |
if (!(Test-Path cmake-3.10.1-win64-x64.zip)) {
appveyor DownloadFile https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip
}
scripts\check-sha256.ps1 cmake-3.10.1-win64-x64.zip 8251F70C85B58F3CA1F24E4A3B0637E2D609B5E4A341D00B70E02E89244D5029
Start-Process -FilePath '7z' -ArgumentList 'x','cmake-3.10.1-win64-x64.zip','-oC:\' -Wait
before_build:
- set PATH=C:\LLVM-5.0.1\msbuild-bin;%PATH%
- set PATH=C:\cmake-3.10.1-win64-x64\bin;%PATH%
- set QT_CMAKE=C:\Qt\5.7\msvc2015_64\lib\cmake
- mkdir %APPVEYOR_BUILD_FOLDER%\build
- cd %APPVEYOR_BUILD_FOLDER%\build

build_script:
- cmake -G "Visual Studio 14 2015 Win64" -T LLVM-vs2014 -DMBGL_PLATFORM=qt -DWITH_QT_DECODERS=ON -DWITH_QT_I18N=ON -DWITH_NODEJS=OFF -DCMAKE_PREFIX_PATH=%QT_CMAKE% %APPVEYOR_BUILD_FOLDER% & exit 0
- cmake --build . --config Release --target qmapboxgl -- /m

after_build:
- mkdir qmapboxgl
- mkdir qmapboxgl\lib
- mkdir qmapboxgl\include
- copy Release\qmapboxgl.* qmapboxgl\lib
- copy %APPVEYOR_BUILD_FOLDER%\platform\qt\include\* qmapboxgl\include
- 7z a qmapboxgl-%APPVEYOR_REPO_COMMIT%.zip qmapboxgl

artifacts:
- path: build\qmapboxgl-%APPVEYOR_REPO_COMMIT%.zip
name: QMapboxGL

test: off
# os: Visual Studio 2015
# platform: x64

# environment:
# matrix:
# - configuration: Release

# shallow_clone: true

# branches:
# only:
# - master

# cache:
# - '%APPVEYOR_BUILD_FOLDER%\mason_packages'
# - '%APPVEYOR_BUILD_FOLDER%\LLVM-5.0.1-win64.exe'
# - '%APPVEYOR_BUILD_FOLDER%\cmake-3.10.1-win64-x64.zip'

# install:
# - ps: |
# if (!(Test-Path LLVM-5.0.1-win64.exe)) {
# appveyor DownloadFile https://releases.llvm.org/5.0.1/LLVM-5.0.1-win64.exe
# }
# scripts\check-sha256.ps1 LLVM-5.0.1-win64.exe 981543611D719624ACB29A2CFFD6A479CFF36E8AB5EE8A57D8ECA4F9C4C6956F
# Start-Process -FilePath 'LLVM-5.0.1-win64.exe' -ArgumentList '/S','/D=C:\LLVM-5.0.1' -Wait
# - ps: |
# if (!(Test-Path cmake-3.10.1-win64-x64.zip)) {
# appveyor DownloadFile https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip
# }
# scripts\check-sha256.ps1 cmake-3.10.1-win64-x64.zip 8251F70C85B58F3CA1F24E4A3B0637E2D609B5E4A341D00B70E02E89244D5029
# Start-Process -FilePath '7z' -ArgumentList 'x','cmake-3.10.1-win64-x64.zip','-oC:\' -Wait

# before_build:
# - set PATH=C:\LLVM-5.0.1\msbuild-bin;%PATH%
# - set PATH=C:\cmake-3.10.1-win64-x64\bin;%PATH%
# - set QT_CMAKE=C:\Qt\5.7\msvc2015_64\lib\cmake
# - mkdir %APPVEYOR_BUILD_FOLDER%\build
# - cd %APPVEYOR_BUILD_FOLDER%\build

# build_script:
# - cmake -G "Visual Studio 14 2015 Win64" -T LLVM-vs2014 -DMBGL_PLATFORM=qt -DWITH_QT_DECODERS=ON -DWITH_QT_I18N=ON -DWITH_NODEJS=OFF -DCMAKE_PREFIX_PATH=%QT_CMAKE% %APPVEYOR_BUILD_FOLDER% & exit 0
# - cmake --build . --config Release --target qmapboxgl -- /m

# after_build:
# - mkdir qmapboxgl
# - mkdir qmapboxgl\lib
# - mkdir qmapboxgl\include
# - copy Release\qmapboxgl.* qmapboxgl\lib
# - copy %APPVEYOR_BUILD_FOLDER%\platform\qt\include\* qmapboxgl\include
# - 7z a qmapboxgl-%APPVEYOR_REPO_COMMIT%.zip qmapboxgl

# artifacts:
# - path: build\qmapboxgl-%APPVEYOR_REPO_COMMIT%.zip
# name: QMapboxGL

# test: off
70 changes: 35 additions & 35 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@ workflows:
filters:
branches:
ignore: master
- android-debug-arm-v7
- android-release-all
- node4-clang39-release:
filters:
tags:
only: /node-.*/
- node6-clang39-release:
filters:
tags:
only: /node-.*/
- node6-gcc6-debug:
filters:
tags:
only: /node-.*/
- linux-clang-3.8-libcxx-debug
- linux-clang4-sanitize-address
- linux-clang4-sanitize-undefined
- linux-clang4-sanitize-thread
- linux-gcc4.9-debug
- linux-gcc5-debug-coverage
- linux-gcc5-release-qt4
- linux-gcc5-release-qt5
- ios-debug
#- ios-sanitize-address
- ios-sanitize-thread
- macos-debug
- macos-debug-qt5
- macos-release-node4:
filters:
tags:
only: /node-.*/
- macos-release-node6:
filters:
tags:
only: /node-.*/
# - android-debug-arm-v7
# - android-release-all
# - node4-clang39-release:
# filters:
# tags:
# only: /node-.*/
# - node6-clang39-release:
# filters:
# tags:
# only: /node-.*/
# - node6-gcc6-debug:
# filters:
# tags:
# only: /node-.*/
# - linux-clang-3.8-libcxx-debug
# - linux-clang4-sanitize-address
# - linux-clang4-sanitize-undefined
# - linux-clang4-sanitize-thread
# - linux-gcc4.9-debug
# - linux-gcc5-debug-coverage
# - linux-gcc5-release-qt4
# - linux-gcc5-release-qt5
# - ios-debug
# #- ios-sanitize-address
# - ios-sanitize-thread
# - macos-debug
# - macos-debug-qt5
# - macos-release-node4:
# filters:
# tags:
# only: /node-.*/
# - macos-release-node6:
# filters:
# tags:
# only: /node-.*/

step-library:
- &generate-cache-key
Expand Down
15 changes: 15 additions & 0 deletions dangerfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Import the feedback functions
import { message, warn, fail, markdown } from "danger"

const child_process = require('child_process');

// Make sure that the mapbox-gl-js submodule pin is up to date
const submodulePinsToMaster = child_process.execSync('git -C mapbox-gl-js branch -a --contains `git -C mapbox-gl-js rev-parse HEAD`').toString().split('\n').indexOf(' remotes/origin/master') >= 0;
if (!submodulePinsToMaster) {
fail(`mapbox-gl-js submodule pin is not yet merged to master`);
}

const coreFileDiff = child_process.execSync('scripts/generate-core-files.sh').toString();
if (coreFileDiff != '') {
fail(`Please run <code>scripts/generate-core-files.sh</code>:<pre lang="diff">${coreFileDiff}</pre>`)
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"pixelmatch": "^4.0.2",
"pngjs": "^3.0.0",
"request": "^2.72.0",
"danger": "^3.0.3",
"tape": "^4.5.1"
},
"engines": {
Expand All @@ -37,6 +38,7 @@
"scripts": {
"preinstall": "npm install node-pre-gyp",
"install": "node-pre-gyp install --fallback-to-build=false || make node",
"danger-ci": "danger ci",
"test": "tape platform/node/test/js/**/*.test.js",
"test-memory": "node --expose-gc platform/node/test/memory.test.js",
"test-suite": "run-s test-render test-query test-expressions",
Expand Down

0 comments on commit 2039303

Please sign in to comment.