Skip to content

Commit

Permalink
Switch CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Aug 15, 2019
1 parent 5d7cdc9 commit 660035c
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 109 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: CI
on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
# I don't really understand the build matrix here...
build: [stable, beta, nightly, macos, windows, mingw]
include:
- build: stable
os: ubuntu-latest
rust: stable
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: windows
os: windows-latest
rust: stable
- build: mingw
os: windows-latest
rust: stable-x86_64-gnu
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
if: matrix.os != 'macos-latest'
- name: Install Rust (macos)
run: |
curl https://sh.rustup.rs | sh -s -- -y
echo "##[add-path]$HOME/.cargo/bin"
if: matrix.os == 'macos-latest'
- run: cargo build
- run: rustdoc --test README.md -L target/debug/deps --extern flate2=target/debug/libflate2.rlib
- run: cargo test
- run: cargo test --features zlib
- run: cargo test --features tokio
- run: cargo test --features "tokio zlib"
- run: cargo test --features zlib --no-default-features
- run: cargo test --features miniz-sys --no-default-features

rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt -- --check

systest:
name: Systest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
- run: cargo run --manifest-path systest/Cargo.toml

wasm:
name: WebAssembly
runs-on: ubuntu-latest
strategy:
matrix:
target: [wasm32-unknown-unknown, wasm32-wasi]
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup target add ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }}

rust_backend:
name: Rust Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
- run: cargo test --features rust_backend
continue-on-error: true
- run: cargo test --features rust_backend --no-default-features
continue-on-error: true

publish_docs:
name: Publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Build documentation
run: cargo doc --no-deps --all-features
- name: Publish documentation
run: |
cd target/doc
git init
git add .
git -c user.name='ci' -c user.email='ci' commit -m init
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# flate2

[![Build Status](https://dev.azure.com/alexcrichton/flate2-rs/_apis/build/status/alexcrichton.flate2-rs?branchName=master)](https://dev.azure.com/alexcrichton/flate2-rs/_build/latest?definitionId=1&branchName=master)
[![Crates.io](https://img.shields.io/crates/v/flate2.svg?maxAge=2592000)](https://crates.io/crates/flate2)
[![Documentation](https://docs.rs/flate2/badge.svg)](https://docs.rs/flate2)

Expand Down
59 changes: 0 additions & 59 deletions azure-pipelines.yml

This file was deleted.

28 changes: 0 additions & 28 deletions ci/azure-install-rust.yml

This file was deleted.

21 changes: 0 additions & 21 deletions ci/azure-job-test-all.yml

This file was deleted.

0 comments on commit 660035c

Please sign in to comment.