Skip to content

Commit

Permalink
azure: enable Github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiming Jing committed Apr 1, 2019
1 parent e64beba commit ef72152
Show file tree
Hide file tree
Showing 11 changed files with 120 additions and 60 deletions.
94 changes: 55 additions & 39 deletions .azure-pipelines.yml
Expand Up @@ -6,81 +6,97 @@ resources:
- repository: templates
type: github
name: crate-ci/resources
endpoint: mesalock-linux
endpoint: mesalink

jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
strategy:
matrix:
stable:
rustup_toolchain: stable
#nightly:
# rustup_toolchain: nightly
steps:
- template: az-pipeline/unstable/rustup.yml@templates
parameters:
rustup_toolchain: $(rustup_toolchain)
- template: ci/azure/unix_build.yml
#- template: ci/azure/test.yml
#- template: ci/azure/bogo.yml
- job: macOS
pool:
vmImage: macOS-10.13
- job: native_build
strategy:
matrix:
stable:
rustup_toolchain: stable
#nightly:
# rustup_toolchain: nightly
steps:
- template: az-pipeline/unstable/rustup.yml@templates
parameters:
rustup_toolchain: $(rustup_toolchain)
- template: ci/azure/unix_build.yml
- job: Windows
x86_64_linux:
arch: 'x86_64_linux'
imageName: 'ubuntu-16.04'
x86_64_darwin:
arch: 'x86_64_darwin'
imageName: 'macos-10.13'
x86_64_windows_msvc:
arch: 'x86_64_windows_msvc'
imageName: 'vs2017-win2016'
pool:
vmImage: vs2017-win2016
strategy:
matrix:
stable:
rustup_toolchain: stable
#nightly:
# rustup_toolchain: nightly
vmImage: $(imageName)
steps:
- template: az-pipeline/unstable/rustup.yml@templates
- template: ci/azure/windows_build.yml
- job: Cross_compile
- template: ci/azure/native_build.yml
- template: ci/azure/pack.yml
- template: ci/azure/release.yml

- job: cross_build
pool:
vmImage: ubuntu-16.04
strategy:
matrix:
arm_linux:
rustup_target: 'arm-unknown-linux-gnueabi'
c_target: 'arm-linux-gnueabi'
arch: 'arm_linux'
aarch64_linux:
rustup_target: 'aarch64-unknown-linux-gnu'
c_target: 'aarch64-linux-gnu'
arch: 'aarch64_linux'
arm_android:
rustup_target: 'armv7-linux-androideabi'
c_target: 'arm-linux-androideabi'
arch: 'armv7_android'
aarch64_android:
rustup_target: 'aarch64-linux-android'
c_target: 'aarch64-linux-android'
arch: 'aarch64_android'
x86_64_android:
rustup_target: 'x86_64-linux-android'
c_target: 'x86_64-linux-android'
arch: 'x86_64_android'
x86_64_windows_mingw:
rustup_target: 'x86_64-pc-windows-gnu'
c_target: 'x86_64-windows-gnu'
arch: 'x86_64_windows_mingw'
steps:
- template: az-pipeline/unstable/rustup.yml@templates
parameters:
rustup_target: $(rustup_target)
- template: ci/azure/cross_build.yml
parameters:
c_target: $(c_target)
- template: ci/azure/pack.yml
- template: ci/azure/release.yml
- job: test
pool:
vmImage: ubuntu-16.04
strategy:
matrix:
stable:
rustup_toolchain: stable
nightly:
rustup_toolchain: nightly
steps:
- template: az-pipeline/unstable/rustup.yml@templates
parameters:
rustup_toolchain: $(rustup_toolchain)
- template: ci/azure/test.yml
- template: ci/azure/bogo.yml
- template: az-pipeline/unstable/rustfmt.yml@templates
- template: az-pipeline/unstable/clippy.yml@templates
parameters:
rustup_toolchain: ${{ variables.clippy_toolchain }}
- job: coverage
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure/coverage.yml

trigger:
branches:
include:
- master
- azure_pipelines
tags:
include:
- v*
6 changes: 5 additions & 1 deletion bogo/config.json
Expand Up @@ -193,6 +193,8 @@
"ServerAuth-Verify-RSA-PKCS1-SHA384-TLS13": ":PEER_MISBEHAVIOUR:",
"ClientAuth-Verify-RSA-PKCS1-SHA512-TLS13": ":PEER_MISBEHAVIOUR:",
"ServerAuth-Verify-RSA-PKCS1-SHA512-TLS13": ":PEER_MISBEHAVIOUR:",
"ClientAuth-InvalidSignature-RSA-PKCS1-SHA1-TLS12": ":PEER_MISBEHAVIOUR:",
"ServerAuth-InvalidSignature-RSA-PKCS1-SHA1-TLS12": ":PEER_MISBEHAVIOUR:",
"ServerAuth-Sign-RSA-PKCS1-SHA256-TLS13": ":INCOMPATIBLE:",
"ServerAuth-Sign-RSA-PKCS1-SHA384-TLS13": ":INCOMPATIBLE:",
"ServerAuth-Sign-RSA-PKCS1-SHA512-TLS13": ":INCOMPATIBLE:",
Expand Down Expand Up @@ -304,6 +306,8 @@
"TestLocalErrorMap": {
"SendServerHelloAsHelloRetryRequest": "remote error: error decoding message",
"GarbageCertificate-Server-TLS12": "remote error: access denied",
"GarbageCertificate-Server-TLS13": "remote error: access denied"
"GarbageCertificate-Server-TLS13": "remote error: access denied",
"ClientAuth-Verify-RSA-PKCS1-SHA1-TLS12": "remote error: access denied",
"ServerAuth-Verify-RSA-PKCS1-SHA1-TLS12": "remote error: illegal parameter"
}
}
1 change: 0 additions & 1 deletion bogo/runme
Expand Up @@ -33,7 +33,6 @@ fi
# Best effort on OS-X
case $OSTYPE in darwin*) set +e ;; esac

set -o pipefail
( cd bogo && ./bogo.test -shim-path ../../target/debug/examples/bogo_shim \
-shim-config ../config.json \
-pipe -allow-unimplemented )
5 changes: 5 additions & 0 deletions ci/azure/coverage.yml
@@ -0,0 +1,5 @@
steps:
- script: |
docker run --cpuset-cpus="0" --security-opt seccomp=unconfined -v "$PWD:/volume" xd009642/tarpaulin sh -c "cargo tarpaulin --out Xml"
bash <(curl -s https://codecov.io/bash)
displayName: cargo-tarpaulin
4 changes: 2 additions & 2 deletions ci/azure/cross_build.yml
Expand Up @@ -32,9 +32,9 @@ steps:
fi
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../inst/usr/local -DCMAKE_TOOLCHAIN_FILE=../cmake/${{ parameters.c_target }}.toolchain.cmake ..
cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/inst/usr/local -DCMAKE_TOOLCHAIN_FILE=../cmake/${{ parameters.c_target }}.toolchain.cmake ..
make && make install
du -sh ../inst/usr/local/lib/*
du -sh $(Build.BinariesDirectory)/inst/usr/local/lib/*
env:
TARGET: $(c_target)
displayName: "Cross compiling for ${{ parameters.c_target }}"
15 changes: 15 additions & 0 deletions ci/azure/native_build.yml
@@ -0,0 +1,15 @@
steps:
- bash: |
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/inst/usr/local ..
make && make install
du -sh $(Build.BinariesDirectory)/inst/usr/local/lib/*
condition: ne( variables['Agent.OS'], 'Windows_NT' )
displayName: "CMake build (Linux/macOS)"
- bash: |
mkdir build && cd build
cmake -G "Visual Studio 15 2017 Win64" ..
cmake --build .
"C:/Program Files/CMake/bin/cpack.exe" -D CPACK_GENERATOR="NSIS64"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: "CMake build (Windows)"
23 changes: 23 additions & 0 deletions ci/azure/pack.yml
@@ -0,0 +1,23 @@
steps:
- bash: |
MY_TAG="$(Build.SourceBranch)"
MY_TAG=${MY_TAG#refs/tags/}
echo $MY_TAG
echo "##vso[task.setvariable variable=build.my_tag]$MY_TAG"
displayName: "Create the TAG variable"
- task: ArchiveFiles@2
displayName: Generate release tarballs
condition: ne( variables['Agent.OS'], 'Windows_NT' )
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/inst'
includeRootFolder: false
archiveType: 'tar'
tarCompression: 'gz'
archiveFile: '$(Build.ArtifactStagingDirectory)/MesaLink-$(build.my_tag)-$(arch).tar.gz'
- task: CopyFiles@2
displayName: Copy the NSIS installer
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
sourceFolder: '$(Build.SourcesDirectory)/build'
contents: 'MesaLink*.exe'
targetFolder: '$(Build.ArtifactStagingDirectory)'
14 changes: 14 additions & 0 deletions ci/azure/release.yml
@@ -0,0 +1,14 @@
steps:
- task: GithubRelease@0
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
inputs:
gitHubConnection: 'mesalink'
repositoryName: 'mesalock-linux/mesalink'
action: 'edit'
target: '$(build.sourceVersion)'
tag: '$(build.my_tag)'
tagSource: 'manual'
assets: '$(Build.ArtifactStagingDirectory)/*'
title: '$(build.my_tag)'
assetUploadMode: 'replace'
addChangeLog: false
7 changes: 0 additions & 7 deletions ci/azure/unix_build.yml

This file was deleted.

6 changes: 0 additions & 6 deletions ci/azure/windows_build.yml

This file was deleted.

5 changes: 1 addition & 4 deletions src/libssl/ssl.rs
Expand Up @@ -220,7 +220,6 @@ impl MESALINK_CTX {
SSL_SESSION_CACHE_MAX_SIZE_DEFAULT,
));

use webpki_roots;
client_config
.root_store
.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);
Expand Down Expand Up @@ -492,7 +491,6 @@ pub extern "C" fn mesalink_library_init() -> c_int {

#[cfg(feature = "error_strings")]
fn init_logger() {
use env_logger;
env_logger::Builder::new().parse("trace").init()
}

Expand Down Expand Up @@ -949,7 +947,6 @@ fn inner_mesalink_ssl_ctx_use_certificate_chain_file(
filename_ptr: *const c_char,
) -> MesalinkInnerResult<c_int> {
use crate::libcrypto::pem;
use std::fs;

let ctx = sanitize_ptr_for_mut_ref(ctx_ptr)?;
if filename_ptr.is_null() {
Expand Down Expand Up @@ -1139,7 +1136,6 @@ fn inner_mesalink_ssl_ctx_use_privatekey_file(
filename_ptr: *const c_char,
) -> MesalinkInnerResult<c_int> {
use crate::libcrypto::pem;
use std::fs;

let ctx = sanitize_ptr_for_mut_ref(ctx_ptr)?;
if filename_ptr.is_null() {
Expand Down Expand Up @@ -3651,6 +3647,7 @@ mod tests {
mesalink_SSL_CTX_free(ctx);
}

#[cfg(feature = "sgx")]
#[test]
fn test_sgx_verifier() {
let ctx_ptr = mesalink_SSL_CTX_new(mesalink_TLS_client_method());
Expand Down

0 comments on commit ef72152

Please sign in to comment.