Upgrade Azure Pipelines (#65)

* Update azure pipeline config

* iterate

* Depend on master

* Depend on master: take 2

* Depend on master: take 3

* cargo fmt

* Remove min rust version check

* Attempt to remove MSRV test

* Attempt to remove MSRV test: fix jobs template path

* Attempt to remove MSRV test: fix jobs template path

* Attempt to remove MSRV test: fix jobs template path
This commit is contained in:
Gregory 2020-03-18 20:15:52 -04:00 committed by GitHub
parent 0cfe1b766c
commit 3cd464cce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 57 deletions

View file

@ -1,8 +1,3 @@
edition = "2018"
max_width = 80
wrap_comments = true
format_strings = true
merge_imports = true
match_block_trailing_comma = true
reorder_impl_items = true
use_field_init_shorthand = true

View file

@ -6,57 +6,30 @@ trigger:
resources:
repositories:
- repository: templates
- repository: rust_pipelines
type: github
name: xoac/rust-azure-pipelines
ref: refs/tags/v0.0.2
ref: refs/heads/master
endpoint: githubConnection
stages:
- stage: test
displayName: "Test"
jobs:
- template: ci/jobs/cargo-test.yaml@rust_pipelines
jobs:
# This represents the minimum Rust version supported.
# Tests are not run as tests may require newer versions of rust.
- template: ci/cargo-check.yml@templates
parameters:
name: minrust
rust_version: 1.31.0 # The 2018 edition
displayName: Check rust min ver
################
# Test stage #
###############
# Test stable
- template: ci/test.yml@templates
parameters:
name: cargo_test_stable
displayName: Cargo test
cross: true # Test on Windows and macOS
###################
# DEPLOY PART #
###################
# Release binary
- template: ci/github-release.yml@templates
parameters:
name: github_release
dependsOn:
- minrust
- cargo_test_stable
rust_version: stable
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
contents: |
*
!*.rlib
!*.d
!.*
targets:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
github:
gitHubConnection: githubConnection
repositoryName: chmln/sd
- stage: build
displayName: "Build"
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
dependsOn:
- test
# Deploy binaries to github only if tags start with `v` for example `v0.1.5`
- stage: deploy
displayName: "Deploy"
dependsOn:
- build
jobs:
- template: ci/scenarios/github/release.yml@rust_pipelines
parameters:
job_condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
gitHubConnection: githubConnection

View file

@ -133,7 +133,7 @@ impl Replacer {
}
Ok(())
},
}
(Source::Files(paths), true) => {
use rayon::prelude::*;
@ -145,7 +145,7 @@ impl Replacer {
});
Ok(())
},
}
(Source::Files(paths), false) => {
let stdout = std::io::stdout();
let mut handle = stdout.lock();
@ -157,7 +157,7 @@ impl Replacer {
Ok(())
})
},
}
}
}
}