Skip to content

Commit

Permalink
Deploy releases
Browse files Browse the repository at this point in the history
Close #13
  • Loading branch information
hjaremko committed Jan 16, 2020
1 parent 822ec2d commit c64c5ce
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 22 deletions.
73 changes: 54 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,58 @@
language: cpp
dist: bionic
compiler:
- gcc
- clang
os:
- linux

addons:
apt:
packages:
- gcc-8
- g++-8
stages:
- build

before_install:
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then export CC=gcc-8; export CXX=g++-8; fi
jobs:
include:
- stage: build
os: linux
dist: bionic
compiler: gcc
addons:
apt:
packages:
- gcc-8
- g++-8
before_install:
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then export CC=gcc-8; export CXX=g++-8; fi
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
- cd ../bin
- mv von-neumann von-neumann-linux
- stage: build
os: windows
script:
- mkdir build
- cd build
- cmake ..
- cmake --build . --config Release
- cd ../bin/Release
- mv von-neumann.exe von-neumann-windows.exe
# - stage: build
# os: osx
# script:
# - mkdir build
# - cd build
# - cmake ..
# - cmake --build .
# - mv ../bin/von-neumann ../bin/von-neumann-macos

script:
- mkdir build
- cd build
- cmake ..
- cmake --build .
- ../bin/tests
before_deploy:
- git config --local user.name "hjaremko"
- git config --local user.email "[email protected]"

deploy:
provider: releases
api_key: $github_token
file_glob: true
file:
- von-neumann*
skip_cleanup: true
overwrite: true
on:
tags: true
branch: master
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.10)
project(von-neumann LANGUAGES CXX VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 17)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Von Neumann machine emulator [![Build Status](https://travis-ci.org/hjaremko/von-neumann.svg?branch=master)](https://travis-ci.org/hjaremko/von-neumann)

### Downloading

Build for Windows and Linux are available [here](https://github.com/hjaremko/von-neumann/releases).

### Building
```
$ mkdir build && cd build
Expand Down
2 changes: 1 addition & 1 deletion include/word.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class word
{
}

constexpr word( const std::string& code, const std::string& mode, type arg )
word( const std::string& code, const std::string& mode, type arg )
: word_( arg & 0b0'0000'00'111111111 ), is_instruction_( true )
{
word_ |= static_cast<type>( instructions_from_str.at( code ) );
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.10)
project(von-neumann)

add_executable(${PROJECT_NAME}
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cmake_minimum_required(VERSION 3.10)
project(von_neumann_test)

set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../extern/catch)
Expand Down

0 comments on commit c64c5ce

Please sign in to comment.