Switch from Travis/AppVeyor to GitHub Actions

This commit is contained in:
Alex Crichton
2019-09-03 10:11:50 -07:00
parent 17cd2f7f65
commit 65921c72cf
5 changed files with 80 additions and 59 deletions

80
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,80 @@
name: CI
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [stable, beta, nightly, macos, win32, win64, 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: win32
os: windows-latest
rust: stable-i686
- build: win64
os: windows-latest
rust: stable-x86_64
- 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 test --verbose
- run: cargo test --verbose --features serde
- run: cargo test --verbose --features std
- run: cargo test --verbose --features kv_unstable
- run: cargo test --verbose --features "kv_unstable std"
- run: cargo test --verbose --features "kv_unstable_sval"
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release
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
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update 1.16.0 && rustup default 1.16.0
- run: cargo build --verbose
- run: cargo build --verbose --features serde
- run: cargo build --verbose --features std
embedded:
name: Embedded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
- run: rustup target add thumbv6m-none-eabi
- run: cargo build --verbose --target=thumbv6m-none-eabi

View File

@@ -1,34 +0,0 @@
language: rust
sudo: false
rust:
- stable
- beta
- nightly
matrix:
include:
- rust: stable
env:
- LABEL="Embedded"
script:
- rustup target add thumbv6m-none-eabi
- cargo build --verbose --target=thumbv6m-none-eabi
- rust: 1.16.0
env:
- LABEL="MSRV"
script:
- cargo build --verbose
- cargo build --verbose --features serde
- cargo build --verbose --features std
script:
- cargo test --verbose
- cargo test --verbose --features serde
- cargo test --verbose --features std
- cargo test --verbose --features kv_unstable
- cargo test --verbose --features "kv_unstable std"
- cargo test --verbose --features "kv_unstable_sval"
- cargo run --verbose --manifest-path test_max_level_features/Cargo.toml
- cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release
notifications:
email:
on_success: never

View File

@@ -44,10 +44,6 @@ std = []
kv_unstable = []
kv_unstable_sval = ["kv_unstable", "sval/fmt"]
[badges]
travis-ci = { repository = "rust-lang-nursery/log" }
appveyor = { repository = "alexcrichton/log" }
[dependencies]
cfg-if = "0.1.2"
serde = { version = "1.0", optional = true, default-features = false }

View File

@@ -3,8 +3,6 @@ log
A Rust library providing a lightweight logging *facade*.
[![Build Status](https://travis-ci.com/rust-lang-nursery/log.svg?branch=master)](https://travis-ci.com/rust-lang-nursery/log)
[![Build status](https://ci.appveyor.com/api/projects/status/nopdjmmjt45xcrki?svg=true)](https://ci.appveyor.com/project/alexcrichton/log)
[![Latest version](https://img.shields.io/crates/v/log.svg)](https://crates.io/crates/log)
[![Documentation](https://docs.rs/log/badge.svg)](https://docs.rs/log)
![License](https://img.shields.io/crates/l/log.svg)

View File

@@ -1,19 +0,0 @@
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
- TARGET: i686-pc-windows-msvc
- TARGET: i686-pc-windows-gnu
install:
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
- SET PATH=%PATH%;C:\MinGW\bin
- rustc -V
- cargo -V
build: false
test_script:
- cargo test --verbose
- cargo test --verbose --features serde
- cargo test --verbose --features std