File tree Expand file tree Collapse file tree 4 files changed +103
-0
lines changed
Expand file tree Collapse file tree 4 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 4343 on :
4444 tags : true # must be a git tag
4545 repo : dlang-community/dfmt # must be a tag on dlang-community
46+ - stage : GitHub Release
47+ # if: tag IS present
48+ d : ldc-1.8.0
49+ os : linux
50+ script : echo "Deploying to GitHub releases ..." && ./release.sh
51+ deploy :
52+ provider : releases
53+ api_key : $GH_REPO_TOKEN
54+ file_glob : true
55+ file : bin/dfmt-*.tar.gz
56+ skip_cleanup : true
57+ on :
58+ repo : dlang-community/dfmt
59+ tags : true
60+ - stage : GitHub Release
61+ # if: tag IS present
62+ d : ldc-1.8.0
63+ os : osx
64+ script : echo "Deploying to GitHub releases ..." && ./release.sh
65+ deploy :
66+ provider : releases
67+ api_key : $GH_REPO_TOKEN
68+ file_glob : true
69+ file : bin/dfmt-*.tar.gz
70+ skip_cleanup : true
71+ on :
72+ repo : dlang-community/dfmt
73+ tags : true
74+ - stage : GitHub Release
75+ # if: tag IS present
76+ d : dmd
77+ os : linux
78+ language : generic
79+ sudo : yes
80+ script : echo "Deploying to GitHub releases ..." && ./release-windows.sh
81+ addons :
82+ apt :
83+ packages :
84+ - p7zip-full
85+ - wine
86+ deploy :
87+ provider : releases
88+ api_key : $GH_REPO_TOKEN
89+ file_glob : true
90+ file : bin/dfmt-*.zip
91+ skip_cleanup : true
92+ on :
93+ repo : dlang-community/dfmt
94+ tags : true
95+ stages :
96+ - name : test
97+ if : type = pull_request or (type = push and branch = master)
Original file line number Diff line number Diff line change @@ -44,3 +44,6 @@ pkg: dmd
4444
4545clean :
4646 $(RM ) bin/dfmt
47+
48+ release :
49+ ./release.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Build the Windows binaries under Linux (requires wine)
3+ set -eux -o pipefail
4+ VERSION=$( git describe --abbrev=0 --tags)
5+ OS=windows
6+ ARCH_SUFFIX=" x86"
7+
8+ # Allow the script to be run from anywhere
9+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
10+ cd $DIR
11+
12+ # Step 1: download the DMD binaries
13+ if [ ! -d dmd2 ] ; then
14+ wget http://downloads.dlang.org/releases/2.x/2.079.0/dmd.2.079.0.windows.7z
15+ 7z x dmd.2.079.0.windows.7z > /dev/null
16+ fi
17+
18+ # Step 2: Run DMD via wineconsole
19+ archiveName=" dfmt-$VERSION -$OS -$ARCH_SUFFIX .zip"
20+ echo " Building $archiveName "
21+ mkdir -p bin
22+ DC=" $DIR /dmd2/windows/bin/dmd.exe" wine cmd /C build.bat
23+
24+ cd bin
25+ zip " $archiveName " dfmt.exe
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -eux -o pipefail
3+ VERSION=$( git describe --abbrev=0 --tags)
4+ ARCH=" ${ARCH:- 64} "
5+ LDC_FLAGS=()
6+ unameOut=" $( uname -s) "
7+ case " $unameOut " in
8+ Linux* ) OS=linux; LDC_FLAGS=(" -flto=full" " -linker=gold" " -static" ) ;;
9+ Darwin* ) OS=osx; LDC_FLAGS+=(" -L-macosx_version_min" " -L10.7" " -L-lcrt1.o" ); ;;
10+ * ) echo " Unknown OS: $unameOut " ; exit 1
11+ esac
12+
13+ case " $ARCH " in
14+ 64) ARCH_SUFFIX=" x86_64" ;;
15+ 32) ARCH_SUFFIX=" x86" ;;
16+ * ) echo " Unknown ARCH: $ARCH " ; exit 1
17+ esac
18+
19+ archiveName=" dfmt-$VERSION -$OS -$ARCH_SUFFIX .tar.gz"
20+
21+ echo " Building $archiveName "
22+ ${MAKE:- make} ldc LDC_FLAGS=" ${LDC_FLAGS[*]} "
23+ tar cvfz " bin/$archiveName " -C bin dfmt
You can’t perform that action at this time.
0 commit comments