Reduce the minimal deployment target for OSX

This commit is contained in:
Sebastian Wilzbach 2018-04-05 04:24:02 +02:00
parent eafae0f6c0
commit 3fc205998a
3 changed files with 30 additions and 28 deletions

View File

@ -16,10 +16,10 @@ script: "./.travis.sh"
jobs:
include:
- stage: GitHub Release
if: tag IS present
d: ldc
#if: tag IS present
d: ldc-1.8.0
os: linux
script: echo "Deploying to GitHub releases ..." && make release
script: echo "Deploying to GitHub releases ..." && ./release.sh
deploy:
provider: releases
api_key: $GH_REPO_TOKEN
@ -30,10 +30,10 @@ jobs:
repo: dlang-community/D-Scanner
tags: true
- stage: GitHub Release
if: tag IS present
d: ldc
#if: tag IS present
d: ldc-1.8.0
os: osx
script: echo "Deploying to GitHub releases ..." && make release
script: echo "Deploying to GitHub releases ..." && ./release.sh
deploy:
provider: releases
api_key: $GH_REPO_TOKEN

View File

@ -76,26 +76,5 @@ report: all
dscanner --report src > src/dscanner-report.json
sonar-runner
.ONESHELL:
release:
@set -eux -o pipefail
VERSION=$$(git describe --abbrev=0 --tags)
ARCH="$${ARCH:-64}"
unameOut="$$(uname -s)"
case "$$unameOut" in
Linux*) OS=linux; ;;
Darwin*) OS=osx; ;;
*) echo "Unknown OS: $$unameOut"; exit 1
esac
case "$$ARCH" in
64) ARCH_SUFFIX="x86_64";;
32) ARCH_SUFFIX="x86";;
*) echo "Unknown ARCH: $$ARCH"; exit 1
esac
archiveName="dscanner-$$VERSION-$$OS-$$ARCH_SUFFIX.tar.gz"
echo "Building $$archiveName"
${MAKE} ldcbuild LDC_FLAGS="-flto=full"
tar cvfz "bin/$$archiveName" -C bin dscanner
./release.sh

23
release.sh Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -eux -o pipefail
VERSION=$(git describe --abbrev=0 --tags)
ARCH="${ARCH:-64}"
LDC_FLAGS=()
unameOut="$(uname -s)"
case "$unameOut" in
Linux*) OS=linux; LDC_FLAGS=("-flto=full" "-linker=gold" "-static") ;;
Darwin*) OS=osx; LDC_FLAGS+=("-L-macosx_version_min" "-L10.7" "-L-lcrt1.o"); ;;
*) echo "Unknown OS: $unameOut"; exit 1
esac
case "$ARCH" in
64) ARCH_SUFFIX="x86_64";;
32) ARCH_SUFFIX="x86";;
*) echo "Unknown ARCH: $ARCH"; exit 1
esac
archiveName="dscanner-$VERSION-$OS-$ARCH_SUFFIX.tar.gz"
echo "Building $archiveName"
${MAKE:-make} ldcbuild LDC_FLAGS="${LDC_FLAGS[*]}"
tar cvfz "bin/$archiveName" -C bin dscanner