mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 06:04:16 +00:00
Migrate from Travis to GitHub Actions
This commit is contained in:
parent
181da2994b
commit
cbb6f5a376
3 changed files with 61 additions and 25 deletions
58
.github/workflows/ci.yml
vendored
Normal file
58
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main, master]
|
||||
|
||||
env:
|
||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
toolchain: [stable, beta, nightly]
|
||||
include:
|
||||
- os: macos-latest
|
||||
MACOS: true
|
||||
- os: windows-latest
|
||||
- os: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install linux deps
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install --no-install-recommends libasound2-dev pkg-config
|
||||
if: contains(matrix.os, 'ubuntu')
|
||||
|
||||
- name: install ${{ matrix.toolchain }} toolchain
|
||||
id: install_toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
profile: minimal
|
||||
# Don't use a 'components:' entry--we don't need them with beta/nightly, plus nightly often doesn't have them
|
||||
override: true
|
||||
|
||||
# This block can be uncommented to add clippy to CI, but first the existing clippy warnings need to be fixed!
|
||||
# - name: clippy
|
||||
# run: |
|
||||
# rustup component add clippy
|
||||
# cargo clippy -- -D warnings
|
||||
# if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'
|
||||
|
||||
- run: |
|
||||
rustup component add rustfmt
|
||||
cargo fmt --all -- --check
|
||||
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'
|
||||
|
||||
- run: cargo test --all-targets --all-features
|
23
.travis.yml
23
.travis.yml
|
@ -1,23 +0,0 @@
|
|||
sudo: false
|
||||
|
||||
language: rust
|
||||
rust:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- rust: stable
|
||||
- rust: nightly
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libasound2-dev
|
||||
|
||||
after_success:
|
||||
- |
|
||||
[ $TRAVIS_BRANCH = master ] &&
|
||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||
cargo publish --no-verify --token ${CRATESIO_TOKEN}
|
|
@ -1,7 +1,8 @@
|
|||
# Audio playback library
|
||||
|
||||
[![Build Status](https://travis-ci.org/RustAudio/rodio.svg?branch=master)](https://travis-ci.org/RustAudio/rodio)
|
||||
[![](http://meritbadge.herokuapp.com/rodio)](https://crates.io/crates/rodio)
|
||||
[![Crates.io Version](https://img.shields.io/crates/v/rodio.svg)](https://crates.io/crates/rodio)
|
||||
[![Crates.io Downloads](https://img.shields.io/crates/d/rodio.svg)](https://crates.io/crates/rodio)
|
||||
[![Build Status](https://github.com/RustAudio/rodio/workflows/CI/badge.svg)](https://github.com/RustAudio/rodio/actions)
|
||||
|
||||
Rust playback library.
|
||||
|
||||
|
|
Loading…
Reference in a new issue