Skip to content

Commit

Permalink
Augment artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Feb 10, 2019
1 parent d649852 commit f6c556a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 31 deletions.
56 changes: 48 additions & 8 deletions .azure-pipelines/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ steps:
)
cd ..
:: Download & extract Ninja
curl -L -o ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
curl -L -o ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip
mkdir ninja
cd ninja
7z x ../ninja.zip > nul
Expand Down Expand Up @@ -73,10 +73,11 @@ steps:
- script: |
set PATH=%CD%\llvm\bin;C:\Program Files\LLVM\bin;%CD%\ninja;%CD%\gnu;%PATH%
call "%VSINSTALLDIR%Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
set INSTALL_DIR=%CD%/install
echo on
mkdir build
cd build
cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang-cl.exe -DCMAKE_CXX_COMPILER:PATH=clang-cl.exe -DCMAKE_BUILD_TYPE=Release %EXTRA_CMAKE_FLAGS% -DCMAKE_INSTALL_PREFIX=%CD%/../install -DINCLUDE_INSTALL_DIR=%CD%/../install/import -DLLVM_ROOT_DIR=%CD%/../llvm -DD_COMPILER=%CD%/../bootstrap-ldc/bin/ldmd2 ..
cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang-cl.exe -DCMAKE_CXX_COMPILER:PATH=clang-cl.exe -DCMAKE_BUILD_TYPE=Release %EXTRA_CMAKE_FLAGS% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DINCLUDE_INSTALL_DIR=%INSTALL_DIR%/import -DLLVM_ROOT_DIR=%CD%/../llvm -DD_COMPILER=%CD%/../bootstrap-ldc/bin/ldmd2 ..
ninja -j2 all all-test-runners
bin\ldc2 --version
displayName: Build LDC & defaultlib unittest runners
Expand Down Expand Up @@ -114,21 +115,60 @@ steps:
set PATH=%CD%\ninja;%PATH%
cd build
ninja install > nul
:: (cat etc\ldc2.conf).replace("C:/projects/ldc2-$Env:APPVEYOR_JOB_ARCH/", '%%ldcbinarypath%%/../') | Set-Content etc\ldc2.conf
cd ..
powershell -c "(cat install/etc/ldc2.conf).replace('%CD:\=/%/install/', '%%%%ldcbinarypath%%%%/../') | Set-Content install/etc/ldc2.conf"
cat install/etc/ldc2.conf
cp LICENSE install
cp packaging/README.txt install
cp libcurl/ldc2/libcurl.dll install/bin
cp libcurl/ldc2/libcurl.dll install/lib
cp libcurl/ldc2/curl.lib install/lib
cp llvm/bin/lld-link.exe install/bin
:: Now rename the installation dir to test portability
mv install installed
displayName: Install LDC
displayName: Install LDC, make portable & copy curl
- script: |
7z a -mx=9 installed.7z installed > nul
cp llvm/bin/lld-link.exe installed/bin
curl -L -o mingw-w64-libs.7z https://github.com/ldc-developers/mingw-w64-libs/releases/download/v6.0.0-rc.4/mingw-w64-libs-v6.0.0-rc.4.7z
mkdir mingw-w64-libs
cd mingw-w64-libs
7z x ../mingw-w64-libs.7z > nul
cp -r lib%MODEL% ../installed/lib/mingw
displayName: Copy lld-link.exe & MinGW-w64-based libs
- script: |
call "%VSINSTALLDIR%Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
powershell -c "echo 'void main() { import std.stdio; writefln(\"Hello world, %d bits\", size_t.sizeof * 8); }'" > hello.d
installed\bin\ldc2 hello.d -of=hello_thin.exe -flto=thin -defaultlib=phobos2-ldc-lto,druntime-ldc-lto
hello_thin.exe
installed\bin\ldc2 hello.d -of=hello_full.exe -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto
hello_full.exe
displayName: Run hello-world integration test with LTO
- script: |
call "%VSINSTALLDIR%Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
set DC=%CD%/installed/bin/ldmd2
git clone --recursive https://github.com/dlang/dub.git
cd dub
powershell -c "git checkout \"$(cat ../packaging/dub_version -Raw)\""
powershell -c "(cat build.cmd).replace('curl.lib', '%CD%/../installed/lib/curl.lib') | Set-Content build.cmd"
build.cmd
cp bin/dub.exe ../installed/bin
displayName: Build & copy dub
- script: |
call "%VSINSTALLDIR%Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
git clone --recursive https://github.com/dlang/tools.git
cd tools
..\installed\bin\ldmd2 -w rdmd.d
..\installed\bin\ldmd2 -w ddemangle.d
..\installed\bin\ldmd2 -w DustMite\dustmite.d DustMite\splitter.d
cp *.exe ../installed/bin
displayName: Build & copy dlang tools
- script: |
set ARTIFACT_NAME=ldc2-%BUILD_SOURCEVERSION:~0,8%-windows-%ARCH%
mv installed %ARTIFACT_NAME%
mkdir artifacts
7z a -mx=9 artifacts/%ARTIFACT_NAME%.7z %ARTIFACT_NAME% > nul
displayName: Pack installation dir
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'ldc2.7z'
targetPath: 'installed.7z'
artifactName: 'windows-$(ARCH)'
targetPath: 'artifacts'
displayName: Publish artifact
37 changes: 14 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jobs:
- job: 'Win64'
- job: Build
timeoutInMinutes: 90
pool:
vmImage: 'vs2017-win2016'
Expand All @@ -9,27 +9,18 @@ jobs:
HOST_LDC_VERSION: 1.13.0
VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
EXTRA_CMAKE_FLAGS: -DBUILD_LTO_LIBS=ON
OS: win64
MODEL: 64
ARCH: x64
steps:
- template: .azure-pipelines/windows.yml

- job: 'Win32'
timeoutInMinutes: 90
pool:
vmImage: 'vs2017-win2016'
variables:
LLVM_VERSION: 7.0.1
CLANG_VERSION: 7.0.1
HOST_LDC_VERSION: 1.13.0
VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
EXTRA_CMAKE_FLAGS: -DBUILD_LTO_LIBS=ON
OS: win32
MODEL: 32
ARCH: x86
CFLAGS: -m32
CXXFLAGS: -m32
ASMFLAGS: -m32
strategy:
matrix:
Win64:
OS: win64
MODEL: 64
ARCH: x64
Win32:
OS: win32
MODEL: 32
ARCH: x86
CFLAGS: -m32
CXXFLAGS: -m32
ASMFLAGS: -m32
steps:
- template: .azure-pipelines/windows.yml

0 comments on commit f6c556a

Please sign in to comment.