mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 09:01:04 -05:00
chore(CI): Switch to AzDO
This commit is contained in:
parent
f5af748146
commit
8811ebf75a
3 changed files with 128 additions and 111 deletions
65
.travis.yml
65
.travis.yml
|
@ -1,65 +0,0 @@
|
||||||
sudo: false
|
|
||||||
language: rust
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- nightly
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- env: RUSTFMT
|
|
||||||
rust: 1.38.0 # `stable`: Locking down for consistent behavior
|
|
||||||
install:
|
|
||||||
- rustup component add rustfmt
|
|
||||||
script:
|
|
||||||
- cargo fmt --all -- --check
|
|
||||||
- env: CodeGen
|
|
||||||
rust: 1.38.0 # `stable`: Locking down for consistent behavior
|
|
||||||
install:
|
|
||||||
- rustup component add rustfmt
|
|
||||||
script:
|
|
||||||
- cargo run --package typos-codegen -- --input typos-dict/assets/words.csv --output typos-dict/src/dict_codegen.rs --check
|
|
||||||
- env: RUSTFLAGS="-D warnings"
|
|
||||||
rust: 1.38.0 # `stable`: Locking down for consistent behavior
|
|
||||||
install:
|
|
||||||
script:
|
|
||||||
- cargo check --tests --all
|
|
||||||
- env: CLIPPY
|
|
||||||
rust: 1.38.0 # `stable`: Locking down for consistent behavior
|
|
||||||
install:
|
|
||||||
- rustup component add clippy
|
|
||||||
script:
|
|
||||||
- cargo clippy --all-features --all
|
|
||||||
- env: BENCH
|
|
||||||
rust: nightly
|
|
||||||
script:
|
|
||||||
- cargo bench --all
|
|
||||||
|
|
||||||
install:
|
|
||||||
- rustc -Vv
|
|
||||||
- cargo -V
|
|
||||||
- export PATH=$HOME/.cargo/bin:$PATH
|
|
||||||
|
|
||||||
script:
|
|
||||||
- cargo check --verbose --all
|
|
||||||
- cargo test --verbose --all
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
# Release tags
|
|
||||||
- /^v\d+\.\d+\.\d+.*$/
|
|
||||||
- master
|
|
||||||
|
|
||||||
# Need to cache the whole `.cargo` directory to keep .crates.toml for
|
|
||||||
# cargo-update to work
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- /home/travis/.cargo
|
|
||||||
# But don't cache the cargo registry
|
|
||||||
before_cache:
|
|
||||||
- rm -rf $HOME/.cargo/registry
|
|
||||||
# Travis can't cache files that are not readable by "others"
|
|
||||||
- chmod -R a+r $HOME/.cargo
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: never
|
|
46
appveyor.yml
46
appveyor.yml
|
@ -1,46 +0,0 @@
|
||||||
environment:
|
|
||||||
global:
|
|
||||||
RUST_VERSION: stable
|
|
||||||
#APPVEYOR_CACHE_SKIP_RESTORE: true
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
# Stable channel
|
|
||||||
- TARGET: i686-pc-windows-msvc
|
|
||||||
CHANNEL: stable
|
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
|
||||||
CHANNEL: stable
|
|
||||||
# Beta channel
|
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
|
||||||
CHANNEL: beta
|
|
||||||
# Nightly channel
|
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
|
||||||
CHANNEL: nightly
|
|
||||||
|
|
||||||
install:
|
|
||||||
- ps: >-
|
|
||||||
$Env:PATH += ';C:\msys64\usr\bin'
|
|
||||||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
|
||||||
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
|
|
||||||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
|
||||||
- rustc -Vv
|
|
||||||
- cargo -V
|
|
||||||
|
|
||||||
test_script:
|
|
||||||
- cargo check --verbose --all
|
|
||||||
- cargo test --verbose --all
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
# Release tags
|
|
||||||
- /^v\d+\.\d+\.\d+.*$/
|
|
||||||
- master
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- C:\Users\appveyor\.cargo\registry
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
- provider: Email
|
|
||||||
on_build_success: false
|
|
||||||
|
|
||||||
# Building is done in the test phase, so we disable Appveyor's build phase.
|
|
||||||
build: false
|
|
128
azure-pipelines.yml
Normal file
128
azure-pipelines.yml
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include: ['master']
|
||||||
|
tags:
|
||||||
|
include: ['v*']
|
||||||
|
schedules:
|
||||||
|
- cron: "3 3 3 * *"
|
||||||
|
displayName: Monthly Build
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- template: azure/stages.yml@templates
|
||||||
|
parameters:
|
||||||
|
minrust: 1.36.0
|
||||||
|
codecov_token: $(CODECOV_TOKEN_SECRET)
|
||||||
|
- stage: committed
|
||||||
|
displayName: Lint History
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- job: "Committed"
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
- template: v1/azdo-step.yml@gh-install
|
||||||
|
parameters:
|
||||||
|
git: crate-ci/committed
|
||||||
|
target: 'x86_64-unknown-linux-gnu'
|
||||||
|
to: $(Build.StagingDirectory)/tools
|
||||||
|
- script: |
|
||||||
|
echo "This project uses Conventional style, see https://www.conventionalcommits.org"
|
||||||
|
$(Build.StagingDirectory)/tools/committed HEAD~..HEAD^2 --no-merge-commit -vv
|
||||||
|
displayName: Committed
|
||||||
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
||||||
|
- stage: Release
|
||||||
|
dependsOn: test
|
||||||
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
|
||||||
|
jobs:
|
||||||
|
- job:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
windows:
|
||||||
|
imageName: 'vs2017-win2016'
|
||||||
|
target: 'x86_64-pc-windows-msvc'
|
||||||
|
crate_name: typos
|
||||||
|
mac:
|
||||||
|
imageName: 'macos-10.14'
|
||||||
|
target: 'x86_64-apple-darwin'
|
||||||
|
crate_name: typos
|
||||||
|
linux:
|
||||||
|
imageName: 'ubuntu-16.04'
|
||||||
|
target: 'x86_64-unknown-linux-gnu'
|
||||||
|
crate_name: typos
|
||||||
|
pool:
|
||||||
|
vmImage: $(imageName)
|
||||||
|
steps:
|
||||||
|
- template: azure/install-rust.yml@templates
|
||||||
|
- script: |
|
||||||
|
cargo rustc --target $(TARGET) --release --bin $(CRATE_NAME)-cli -- -C lto
|
||||||
|
displayName: Build
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Stage assets
|
||||||
|
condition: ne( variables['Agent.OS'], 'Windows_NT' )
|
||||||
|
inputs:
|
||||||
|
sourceFolder: '$(Build.SourcesDirectory)/target/$(TARGET)/release'
|
||||||
|
contents: $(crate_name)
|
||||||
|
targetFolder: '$(Build.BinariesDirectory)/'
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Stage assets on Windows
|
||||||
|
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
||||||
|
inputs:
|
||||||
|
sourceFolder: '$(Build.SourcesDirectory)/target/$(TARGET)/release'
|
||||||
|
contents: $(crate_name).exe
|
||||||
|
targetFolder: '$(Build.BinariesDirectory)/'
|
||||||
|
- task: ArchiveFiles@2
|
||||||
|
displayName: Tarball assets
|
||||||
|
condition: ne( variables['Agent.OS'], 'Windows_NT' )
|
||||||
|
inputs:
|
||||||
|
rootFolderOrFile: '$(Build.BinariesDirectory)/$(crate_name)'
|
||||||
|
archiveType: 'tar'
|
||||||
|
tarCompression: 'gz'
|
||||||
|
archiveFile: '$(Build.ArtifactStagingDirectory)/$(crate_name)-$(Build.SourceBranchName)-$(TARGET).tar.gz'
|
||||||
|
- task: GithubRelease@0
|
||||||
|
condition: ne( variables['Agent.OS'], 'Windows_NT' )
|
||||||
|
inputs:
|
||||||
|
gitHubConnection: 'crate-ci-token'
|
||||||
|
repositoryName: 'crate-ci/typos'
|
||||||
|
action: 'edit'
|
||||||
|
target: '$(build.sourceVersion)'
|
||||||
|
tagSource: 'manual'
|
||||||
|
tag: '$(Build.SourceBranchName)'
|
||||||
|
assets: '$(Build.ArtifactStagingDirectory)/$(crate_name)-$(Build.SourceBranchName)-$(TARGET).tar.gz'
|
||||||
|
title: '$(Build.SourceBranchName)'
|
||||||
|
assetUploadMode: 'replace'
|
||||||
|
addChangeLog: true
|
||||||
|
- task: ArchiveFiles@2
|
||||||
|
displayName: Zip assets
|
||||||
|
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
||||||
|
inputs:
|
||||||
|
rootFolderOrFile: '$(Build.BinariesDirectory)/$(crate_name).exe'
|
||||||
|
archiveType: 'zip'
|
||||||
|
archiveFile: '$(Build.ArtifactStagingDirectory)/$(crate_name)-$(Build.SourceBranchName)-$(TARGET).zip'
|
||||||
|
- task: GithubRelease@0
|
||||||
|
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
||||||
|
inputs:
|
||||||
|
gitHubConnection: 'crate-ci-token'
|
||||||
|
repositoryName: 'crate-ci/typos'
|
||||||
|
action: 'edit'
|
||||||
|
target: '$(build.sourceVersion)'
|
||||||
|
tagSource: 'manual'
|
||||||
|
tag: '$(Build.SourceBranchName)'
|
||||||
|
assets: '$(Build.ArtifactStagingDirectory)/$(crate_name)-$(Build.SourceBranchName)-$(TARGET).zip'
|
||||||
|
title: '$(Build.SourceBranchName)'
|
||||||
|
assetUploadMode: 'replace'
|
||||||
|
addChangeLog: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: templates
|
||||||
|
type: github
|
||||||
|
name: crate-ci/azure-pipelines
|
||||||
|
endpoint: crate-ci
|
||||||
|
- repository: gh-install
|
||||||
|
type: github
|
||||||
|
name: crate-ci/gh-install
|
||||||
|
endpoint: crate-ci
|
Loading…
Reference in a new issue