Skip to content

Commit

Permalink
Merge #328
Browse files Browse the repository at this point in the history
328: Fix Windows release. r=Dylan-DPC a=reitermarkus



Co-authored-by: Markus Reiter <[email protected]>
  • Loading branch information
bors[bot] and reitermarkus authored Oct 1, 2019
2 parents ea29a50 + 95a7e1b commit d38d0cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,15 @@ steps:
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['CRATES_IO_PUBLISH'], '1'))
- bash: ci/build_release.sh
displayName: Build Release
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['DEPLOY'], '1'))
condition: eq(variables['DEPLOY'], '1')
- task: ArchiveFiles@2
inputs:
includeRootFolder: false
archiveType: tar
tarCompression: gz
archiveFile: $(Build.ArtifactStagingDirectory)/cross-$(TAG)-$(TARGET).tar.gz
verbose: true
condition: eq(variables['DEPLOY'], '1')
- task: GithubRelease@0
displayName: Create GitHub Release
inputs:
Expand Down
11 changes: 9 additions & 2 deletions ci/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
set -eux

cargo install --path . --force
cross rustc --target "${TARGET}" --release -- -C lto
cross build --target "${TARGET}" --release

tar czf "${BUILD_ARTIFACTSTAGINGDIRECTORY}/cross-${TAG}-${TARGET}.tar.gz" -C "target/${TARGET}/release" cross
rm -rf "${BUILD_BINARIESDIRECTORY}"
mkdir "${BUILD_BINARIESDIRECTORY}"

if [[ -f "target/${TARGET}/release/cross.exe" ]]; then
mv "target/${TARGET}/release/cross.exe" "${BUILD_BINARIESDIRECTORY}/"
else
mv "target/${TARGET}/release/cross" "${BUILD_BINARIESDIRECTORY}/"
fi

0 comments on commit d38d0cf

Please sign in to comment.