2018-10-08 16:45:49 -05:00
|
|
|
jobs:
|
2018-12-19 12:27:49 -06:00
|
|
|
|
|
|
|
- job: check_formatting
|
2019-01-09 01:57:34 -06:00
|
|
|
displayName: Check formatting
|
2018-12-19 12:27:49 -06:00
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-16.04
|
|
|
|
steps:
|
|
|
|
- script: |
|
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
|
|
$HOME/.cargo/bin/rustup component add rustfmt
|
2019-01-09 01:57:34 -06:00
|
|
|
displayName: Install stable Rust
|
2018-12-19 12:27:49 -06:00
|
|
|
- script: |
|
|
|
|
$HOME/.cargo/bin/cargo fmt -- --check
|
2019-01-09 01:57:34 -06:00
|
|
|
displayName: Run rustfmt
|
2018-10-08 16:45:49 -05:00
|
|
|
|
2019-03-06 13:14:20 -06:00
|
|
|
- job: run_book_tests
|
|
|
|
displayName: Book code example tests
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-16.04
|
|
|
|
steps:
|
|
|
|
- script: |
|
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
|
|
$HOME/.cargo/bin/rustup component add rustfmt
|
|
|
|
displayName: Install stable Rust
|
|
|
|
- script: |
|
|
|
|
cd docs/book/tests && $HOME/.cargo/bin/cargo test
|
|
|
|
displayName: Test book code examples via skeptic
|
|
|
|
|
|
|
|
- job: build_book_master
|
|
|
|
displayName: Build rendered book on master branch and push to Github
|
|
|
|
dependsOn: run_book_tests
|
|
|
|
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
|
|
|
variables:
|
|
|
|
- group: github-keys
|
|
|
|
steps:
|
|
|
|
- task: InstallSSHKey@0
|
|
|
|
inputs:
|
|
|
|
hostName: $(secret.GHSshKnownHosts)
|
|
|
|
sshPublicKey: $(secret.GHSshPub)
|
|
|
|
sshKeySecureFile: $(secret.GHSshPriv)
|
|
|
|
- script: |
|
|
|
|
./docs/book/build.sh master
|
|
|
|
|
2018-10-08 16:45:49 -05:00
|
|
|
- template: _build/azure-pipelines-template.yml
|
|
|
|
parameters:
|
|
|
|
name: Linux
|
|
|
|
vmImage: ubuntu-16.04
|
|
|
|
|
2018-12-19 12:27:49 -06:00
|
|
|
- template: _build/azure-pipelines-template.yml
|
|
|
|
parameters:
|
|
|
|
name: macOS
|
|
|
|
vmImage: macOS-10.13
|
|
|
|
|
2018-10-08 16:45:49 -05:00
|
|
|
- template: _build/azure-pipelines-template.yml
|
|
|
|
parameters:
|
|
|
|
name: Windows
|
|
|
|
vmImage: vs2017-win2016
|