Skip to content

Commit

Permalink
Publish releases from travis
Browse files Browse the repository at this point in the history
- Add windows development headers for PathControl.
- Correct case for Linux includes.
- Handle travis commits for releases.
- Add travis dependencies for asciidoc
  • Loading branch information
deplinenoise committed Jan 27, 2018
1 parent 95f951a commit c2877ee
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 18 deletions.
42 changes: 30 additions & 12 deletions .travis.yml
Expand Up @@ -3,25 +3,43 @@ language: cpp
os: linux

compiler:
- clang
- gcc
- clang
- gcc

env:
- CHECKED=no
- CHECKED=yes
- CHECKED=no
- CHECKED=yes

install:
- sudo cpanm File::Slurp Digest::MD5
- sudo cpanm File::Slurp Digest::MD5

script:
- make NO_GIT_FILE=1 all run-all-tests
- make NO_GIT_FILE=1 CROSSMINGW=yes all
- make NO_GIT_FILE=1 all run-all-tests
- make NO_GIT_FILE=1 CROSSMINGW=yes all installer windows-zip

addons:
apt:
packages:
valgrind
yasm
cpanminus
mingw-w64
g++-mingw-w64-x86-64
- valgrind
- yasm
- cpanminus
- mingw-w64
- g++-mingw-w64-x86-64
- mingw-w64-x86-64-dev
- nsis
- asciidoc
- source-highlight

deploy:
skip_cleanup: true
provider: releases
api_key:
secure: REn8sb5HtROhJiCUJKxaY0Gd7vmEK1MqaMxNPGxM4aiUa98vAYXm9u8MaZDo0QV5h+gmgcKNZpTIUHFh6OEdMT62WBMfYNo7+mEbT4ccSbDvDVGL+U3498jglW233lV/8b4lgngeeDPNtSYoydUfcJH2tyiI3xK73Xn82LUCyRlXqJoYc/+9XKQR7miAYJeh/KER1BfHyT4TiwVE63jIWoEUxSmTd2cSRuKSfxY/dleN3fmFNgTbIZFjvKtGmS806FhTA8j8HOgtmm7hluvuOqdLNwZPUf93dlVan3WdiYFT2xxSDMHm0GsIv2oUuJe0tjXEHxs+vjljVD3et8ibTwrK5lH/2am9RSMnV9yNjvcPs8rhG44zV5tFoa+QT+5aRg2fjE6leNbmgyIuSyB/HVCRI6RjpYnyBKYJGwkHpzftR40s+H8o/26ktF3wuxPxDkSnPUqwjnLEgjhMW9zU15PpQZYYLQjdKa+fdpDbJsFmYU7tWprItNB4De18woaEgA3o7M+ss2Ybz2J6Bgk0XII3ngxXIb0frkDkQLX8A7DpR8Kjca5kr4bObzo/IR0Bfyt76ZO8lDco7QFhmgwrhyV4+WPHOWgmpt3aojZ06UkIC/TSrzM3d0Nteo20j/MnwEAs6T26edUworFmjDKe5+l//uirUWcLzh531LizmIs=
file:
- build.mingw/Tundra-Binaries.zip
- build.mingw/Tundra-Setup.exe
# Important to just pick one build here
on:
repo: deplinenoise/tundra
branch: auto-releases
condition: $CC = clang && $CHECKED = no
16 changes: 11 additions & 5 deletions Makefile
Expand Up @@ -12,18 +12,18 @@ LDFLAGS += -L$(BUILDDIR) -ltundra

PREFIX ?= /usr/local

ifndef NO_GIT_FILE
GIT_BRANCH := $(shell (git branch --no-color 2>/dev/null) | sed -n '/^\*/s/^\* //p')
# Handle travis builds specially - just trust what the CI tells us.
ifdef TRAVIS_BRANCH
GIT_BRANCH := $(TRAVIS_BRANCH)
else
GIT_BRANCH :=
endif

GIT_BRANCH := $(shell (git branch --no-color 2>/dev/null) | sed -n '/^\*/s/^\* //p')
ifeq ($(GIT_BRANCH),)
GIT_BRANCH := unknown
GIT_FILE := dummy_version_file
else
GIT_FILE := .git/refs/heads/$(GIT_BRANCH)
endif
endif

CHECKED ?= no
ifeq ($(CHECKED), no)
Expand Down Expand Up @@ -158,9 +158,15 @@ all: $(BUILDDIR)/tundra2$(EXESUFFIX) \
$(BUILDDIR)/t2-inspect$(EXESUFFIX) \
$(BUILDDIR)/t2-unittest$(EXESUFFIX)

ifdef TRAVIS_COMMIT
$(BUILDDIR)/git_version_$(GIT_BRANCH).c:
echo "const char g_GitVersion[] = \"$(TRAVIS_COMMIT)\";" > $@ && \
echo "const char g_GitBranch[] = \"$(TRAVIS_BRANCH)\";" >> $@
else
$(BUILDDIR)/git_version_$(GIT_BRANCH).c: $(GIT_FILE)
sed 's/^\(.*\)/const char g_GitVersion[] = "\1";/' < $^ > $@ && \
echo 'const char g_GitBranch[] ="'$(GIT_BRANCH)'";' >> $@
endif

$(BUILDDIR)/git_version_$(GIT_BRANCH).o: $(BUILDDIR)/git_version_$(GIT_BRANCH).c

Expand Down
2 changes: 1 addition & 1 deletion src/PathControl.cpp
Expand Up @@ -2,7 +2,7 @@
// This is a command-line utility used by the Windows installer to manipulate
// the system path.

#include <Windows.h>
#include <windows.h>
#include <stdlib.h>

const WCHAR g_UsageText[] =
Expand Down

0 comments on commit c2877ee

Please sign in to comment.