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

Commit

Permalink
chore(CMakeLists): make sure we change the version number in a single…
Browse files Browse the repository at this point in the history
… place
  • Loading branch information
leodemoura committed Jan 20, 2017
1 parent 3f65690 commit dae1c9d
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test_script:
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/build && ctest -j4"

artifacts:
- path: build\lean-0.3.0-windows.zip
- path: build\lean-3.0.0-windows.zip
name: binary

deploy:
Expand Down
29 changes: 29 additions & 0 deletions .appveyor.yml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
environment:
matrix:
- MSYSTEM: MINGW64

install:
# upgrading gcc to 6.x fails
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Suuy mingw-w64-x86_64-ninja mingw-w64-x86_64-cmake git mingw-w64-x86_64-mpfr"

build_script:
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && mkdir build && cd build && cmake ../src -DINCLUDE_MSYS2_DLLS=ON -DCMAKE_BUILD_TYPE=Release -G Ninja"
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/build && ninja && cpack"

test_script:
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/build && ctest -j4"

artifacts:
- path: build\lean-@LEAN_VERSION_MAJOR@.@LEAN_VERSION_MINOR@.@LEAN_VERSION_PATCH@-windows.zip
name: binary

deploy:
description: 'Lean release'
provider: GitHub
auth_token:
secure: d+yPrDEAbiNrcf3a0PDNYEn/ieOOP6M7cP9zje+QkJEjHFdjBjWMe8b3qrC1hrus
artifact: binary
draft: false
prerelease: false
on:
appveyor_repo_tag: true
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ matrix:
env:
CMAKE_CXX_COMPILER=g++-4.9
CMAKE_BUILD_TYPE=Release
TARGET=build/lean-0.3.0-linux.tar.gz
TARGET=build/lean-3.0.0-linux.tar.gz
UPLOAD=ON
STATIC=ON

Expand Down Expand Up @@ -77,7 +77,7 @@ matrix:
env:
CMAKE_CXX_COMPILER=clang++
CMAKE_BUILD_TYPE=Release
TARGET=build/lean-0.3.0-darwin.zip
TARGET=build/lean-3.0.0-darwin.zip
UPLOAD=ON
PACKAGE=TRUE

Expand Down
142 changes: 142 additions & 0 deletions .travis.yml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
language: cpp
sudo: true
cache: apt
dist: trusty
addons:
apt:
sources: &apt_sources
- ubuntu-toolchain-r-test
- sourceline: 'ppa:kalakris/cmake' # cmake 2.8 for precise
- sourceline: 'ppa:adrozdoff/cmake' # cmake 3 for trusty
- sourceline: 'ppa:h-rayflood/llvm'
packages: &default_packages
- cmake
- libgmp-dev
- libmpfr-dev
- libgoogle-perftools-dev
- g++-4.9
- clang-3.4

matrix:
include:
- os: linux
dist: precise
env:
CMAKE_CXX_COMPILER=g++-4.9
CMAKE_BUILD_TYPE=Release
TARGET=build/lean-@LEAN_VERSION_MAJOR@.@LEAN_VERSION_MINOR@.@LEAN_VERSION_PATCH@-linux.tar.gz
UPLOAD=ON
STATIC=ON

- os: linux
env:
CMAKE_CXX_COMPILER=clang++-3.4
CMAKE_BUILD_TYPE=Release
TCMALLOC=ON

- os: linux
addons: &gcc6_addons
apt:
sources: *apt_sources
packages:
- *default_packages
- g++-6
- gcc-6
env:
CMAKE_CXX_COMPILER=g++-6
CMAKE_BUILD_TYPE=Release
TCMALLOC=ON

- os: linux
addons: *gcc6_addons
env:
CMAKE_CXX_COMPILER=g++-6
CMAKE_BUILD_TYPE=Release
TESTCOV=ON

- os: linux
addons: *gcc6_addons
env:
CMAKE_CXX_COMPILER=g++-6
CMAKE_BUILD_TYPE=Release
MULTI_THREAD=OFF

- os: linux
env:
CMAKE_CXX_COMPILER=clang++-3.4
CMAKE_BUILD_TYPE=Debug
TCMALLOC=ON

- os: linux
dist: precise
env:
CMAKE_CXX_COMPILER=g++-4.9
CMAKE_BUILD_TYPE=Debug

- os: osx
env:
CMAKE_CXX_COMPILER=clang++
CMAKE_BUILD_TYPE=Release
TARGET=build/lean-@LEAN_VERSION_MAJOR@.@LEAN_VERSION_MINOR@.@LEAN_VERSION_PATCH@-darwin.zip
UPLOAD=ON
PACKAGE=TRUE

- os: osx
env:
CMAKE_CXX_COMPILER=g++
CMAKE_BUILD_TYPE=Debug

before_install:
- if [[ $TRAVIS_OS_NAME == osx ]]; then
brew update &&
brew install gcc &&
brew install gmp &&
brew install mpfr;
fi

script:
- mkdir -p build
- cd build
- if [[ $TESTCOV != ON ]]; then TESTCOV=OFF; fi
- if [[ $TCMALLOC != ON ]]; then TCMALLOC=OFF; fi
- if [[ $STATIC != ON ]]; then STATIC=OFF; fi
- if [[ $MULTI_THREAD != OFF ]]; then MULTI_THREAD=ON; fi
- cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
-DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER
-DTESTCOV=$TESTCOV
-DTCMALLOC=$TCMALLOC
-DMULTI_THREAD=$MULTI_THREAD
-DSTATIC=$STATIC
../src
- make -j2
- cpack
# TODO(gabriel): add smaller test subset for debug and emscripten builds
- if [[ $CMAKE_BUILD_TYPE == Release ]]; then
yes "A" | ctest -j2 -V;
else
yes "A" | ctest -j2 -I 100,600,10 -V;
fi
- if [[ $PACKAGE == TRUE ]]; then make package; fi
- cd ..

after_script:
- if [[ $TESTCOV == ON ]]; then bash <(curl -s https://codecov.io/bash) -x gcov-6; fi

notifications:
email:
recipients:
- lean-build@googlegroups.com
on_success: change
on_failure: always

deploy:
provider: releases
api_key:
secure: NeTKs0tb0hM9yC1lJyc7Y8ev1rfEe9tpY8bS20hUivNKcX8S0HjJh/xtx/3LgrhcqVP0xKuDPE0YNQk3E9SO1ni2ESjIFIVXI/hpDLNjxjfaeW7rcpYcc7dy7ynEP23HnAOMr4PMHs0T/ATsJHKyDXTUi4yrQToBBTQUFvCKgo8=
file: $TARGET
skip_cleanup: true
overwrite: true
on:
condition: $UPLOAD = ON
repo: leanprover/lean
tags: true
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.7)
project(LEAN CXX C)
set(LEAN_VERSION_MAJOR 0)
set(LEAN_VERSION_MINOR 3)
set(LEAN_VERSION_MAJOR 3)
set(LEAN_VERSION_MINOR 0)
set(LEAN_VERSION_PATCH 0)

set(LEAN_EXTRA_LINKER_FLAGS "")
Expand Down Expand Up @@ -297,6 +297,8 @@ configure_file("${LEAN_SOURCE_DIR}/githash.h.in" "${LEAN_BINARY_DIR}/githash.h")

# Version
configure_file("${LEAN_SOURCE_DIR}/version.h.in" "${LEAN_BINARY_DIR}/version.h")
configure_file("${LEAN_SOURCE_DIR}/../.travis.yml.in" "${LEAN_SOURCE_DIR}/../.travis.yml")
configure_file("${LEAN_SOURCE_DIR}/../.appveyor.yml.in" "${LEAN_SOURCE_DIR}/../.appveyor.yml")

# leanemacs file
configure_file("${LEAN_SOURCE_DIR}/../bin/leanemacs.in" "${LEAN_SOURCE_DIR}/../bin/leanemacs")
Expand Down

0 comments on commit dae1c9d

Please sign in to comment.