Skip to content

Commit

Permalink
ci: define Azure Pipelines configuration
Browse files Browse the repository at this point in the history
Inspired by mozilla/lmdb-rs#16.

Surprisingly, I was able to get this working on the first attempt. This
is the easiest cross-platform CI I have ever set up for a project. I'm
in awe.
  • Loading branch information
indygreg committed Jun 29, 2019
1 parent 07ebadb commit 75fcd23
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PyOxidizer

[![Build Status](https://dev.azure.com/gregoryszorc/PyOxidizer/_apis/build/status/indygreg.PyOxidizer?branchName=main)](https://dev.azure.com/gregoryszorc/PyOxidizer/_build/latest?definitionId=1&branchName=main)

`PyOxidizer` is a utility for producing binaries that embed Python.
The over-arching goal of `PyOxidizer` is to make complex packaging and
distribution problems simple so application maintainers can focus on
Expand Down
46 changes: 46 additions & 0 deletions ci/azure-pipelines-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
stable:
rustup_toolchain: stable
beta:
rustup_toolchain: beta
nightly:
rustup_toolchain: nightly

steps:
- ${{ if ne(parameters.name, 'Windows') }}:
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
displayName: Install Rust
- ${{ if eq(parameters.name, 'Windows') }}:
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
displayName: Install Rust (Windows)
- script: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions
- script: cargo build -p pyoxidizer
displayName: Build

- ${{ if ne(parameters.name, 'Windows') }}:
- script: |
if [ "$RUSTUP_TOOLCHAIN" = 'nightly' ]
then cargo test -p pyoxidizer
fi
displayName: Test
- ${{ if eq(parameters.name, 'Windows') }}:
- script: if "%RUSTUP_TOOLCHAIN%" == "nightly" cargo test -p pyoxidizer
displayName: Test
15 changes: 15 additions & 0 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
jobs:
- template: azure-pipelines-template.yml
parameters:
name: Linux
vmImage: ubuntu-16.04

- template: azure-pipelines-template.yml
parameters:
name: macOS
vmImage: macOS-10.14

- template: azure-pipelines-template.yml
parameters:
name: Windows
vmImage: vs2017-win2016
2 changes: 1 addition & 1 deletion docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ New Features

* ``pip-install-simple`` packaging rule now supports ``excludes`` for excluding
resources from packaging. (#21)

* ``pip-install-simple`` packaging rule now supports ``extra_args`` for adding
parameters to the pip install command. (#42)

All Relevant Changes
^^^^^^^^^^^^^^^^^^^^

* Added CI powered by Azure Pipelines. (#45)
* Comments in auto-generated ``pyoxidizer.toml`` have been tweaked to
improve understanding. (#29)

Expand Down

0 comments on commit 75fcd23

Please sign in to comment.