Update release scripts
This commit is contained in:
parent
15f5b11977
commit
14c8b7cc9f
37
.travis.yml
37
.travis.yml
|
@ -17,14 +17,13 @@ env:
|
||||||
- BUILD=dub
|
- BUILD=dub
|
||||||
|
|
||||||
script: ./.travis.sh
|
script: ./.travis.sh
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: GitHub Release
|
- stage: GitHub Release
|
||||||
if: tag IS present
|
#if: tag IS present
|
||||||
d: ldc
|
d: ldc-1.8.0
|
||||||
os: linux
|
os: linux
|
||||||
script: echo "Deploying to GitHub releases ..." && make release
|
script: echo "Deploying to GitHub releases ..." && ./release.sh
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: $GH_REPO_TOKEN
|
api_key: $GH_REPO_TOKEN
|
||||||
|
@ -35,10 +34,10 @@ jobs:
|
||||||
repo: dlang-community/dcd
|
repo: dlang-community/dcd
|
||||||
tags: true
|
tags: true
|
||||||
- stage: GitHub Release
|
- stage: GitHub Release
|
||||||
if: tag IS present
|
#if: tag IS present
|
||||||
d: ldc
|
d: ldc-1.8.0
|
||||||
os: osx
|
os: osx
|
||||||
script: echo "Deploying to GitHub releases ..." && make release
|
script: echo "Deploying to GitHub releases ..." && ./release.sh
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: $GH_REPO_TOKEN
|
api_key: $GH_REPO_TOKEN
|
||||||
|
@ -48,3 +47,27 @@ jobs:
|
||||||
on:
|
on:
|
||||||
repo: dlang-community/dcd
|
repo: dlang-community/dcd
|
||||||
tags: true
|
tags: true
|
||||||
|
- stage: GitHub Release
|
||||||
|
#if: tag IS present
|
||||||
|
d: dmd
|
||||||
|
os: linux
|
||||||
|
language: generic
|
||||||
|
sudo: yes
|
||||||
|
script: echo "Deploying to GitHub releases ..." && ./release-windows.sh
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- p7zip-full
|
||||||
|
- wine
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key: $GH_REPO_TOKEN
|
||||||
|
file_glob: true
|
||||||
|
file: bin/dcd-.*.zip
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: dlang-community/dcd
|
||||||
|
tags: true
|
||||||
|
stages:
|
||||||
|
- name: test
|
||||||
|
if: type = pull_request or (type = push and branch = master)
|
||||||
|
|
24
makefile
24
makefile
|
@ -150,27 +150,5 @@ ldcserver: githash
|
||||||
test: debugserver dmdclient
|
test: debugserver dmdclient
|
||||||
cd tests && ./run_tests.sh
|
cd tests && ./run_tests.sh
|
||||||
|
|
||||||
.ONESHELL:
|
|
||||||
release:
|
release:
|
||||||
@set -eux -o pipefail
|
./release.sh
|
||||||
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="dcd-$$VERSION-$$OS-$$ARCH_SUFFIX.tar.gz"
|
|
||||||
|
|
||||||
echo "Building $$archiveName"
|
|
||||||
${MAKE} ldcclient
|
|
||||||
${MAKE} ldcserver
|
|
||||||
tar cvfz "bin/$$archiveName" -C bin dcd-client dcd-server
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build the Windows binaries under Linux (requires wine)
|
||||||
|
set -eux -o pipefail
|
||||||
|
VERSION=$(git describe --abbrev=0 --tags)
|
||||||
|
OS=windows
|
||||||
|
ARCH_SUFFIX="x86"
|
||||||
|
|
||||||
|
# Allow the script to be run from anywhere
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
cd $DIR
|
||||||
|
|
||||||
|
# Step 1: download the DMD binaries
|
||||||
|
if [ ! -d dmd2 ] ; then
|
||||||
|
wget http://downloads.dlang.org/releases/2.x/2.079.0/dmd.2.079.0.windows.7z
|
||||||
|
7z x dmd.2.079.0.windows.7z > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Step 2: Run DMD via wineconsole
|
||||||
|
archiveName="dcd-$VERSION-$OS-$ARCH_SUFFIX.zip"
|
||||||
|
echo "Building $archiveName"
|
||||||
|
mkdir -p bin
|
||||||
|
DC="$DIR/dmd2/windows/bin/dmd.exe" wine cmd /C build.bat
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
zip "$archiveName" dcd-server.exe dcd-client.exe
|
|
@ -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="dcd-$VERSION-$OS-$ARCH_SUFFIX.tar.gz"
|
||||||
|
|
||||||
|
echo "Building $archiveName"
|
||||||
|
${MAKE:-make} ldcclient ldcserver LDC_FLAGS="${LDC_FLAGS[*]}"
|
||||||
|
tar cvfz "bin/$archiveName" -C bin dcd-server dcd-client
|
Loading…
Reference in New Issue