ci: switch to GitHub Actions

This commit is contained in:
Andrew Gallant 2020-01-11 12:14:30 -05:00
parent 8e757b15d1
commit 901cadaa74
5 changed files with 88 additions and 67 deletions

87
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,87 @@
name: ci
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '00 01 * * *'
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build:
- pinned
- pinned-win
- stable
- beta
- nightly
- macos
- win-msvc
- win-gnu
include:
- build: pinned
os: ubuntu-18.04
rust: 1.23.0
- build: pinned-win
os: windows-2019
rust: 1.23.0
- build: stable
os: ubuntu-18.04
rust: stable
- build: beta
os: ubuntu-18.04
rust: beta
- build: nightly
os: ubuntu-18.04
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: win-msvc
os: windows-2019
rust: stable
- build: win-gnu
os: windows-2019
rust: stable-x86_64-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- run: cargo build --verbose
- run: cargo doc --verbose
- if: startsWith(matrix.build, 'pinned-') == false
run: cargo test --verbose
- if: matrix.build == 'nightly'
run: |
set -x
cargo generate-lockfile -Z minimal-versions
cargo build --verbose
cargo test --verbose
# TODO: Switch to rustfmt for walkdir 3. walkdir 3 is in a
# half-finished state, and applying rustfmt now would wreak havoc.
# rustfmt:
# name: rustfmt
# runs-on: ubuntu-18.04
# steps:
# - name: Checkout repository
# uses: actions/checkout@v1
# with:
# fetch-depth: 1
# - name: Install Rust
# uses: hecrj/setup-rust-action@v1
# with:
# rust-version: stable
# - name: Install rustfmt
# run: rustup component add rustfmt
# - name: Check formatting
# run: |
# cargo fmt --all -- --check

View File

@ -1,17 +0,0 @@
language: rust
matrix:
include:
- os: linux
rust: 1.23.0
- os: linux
rust: stable
- os: linux
rust: beta
- os: linux
rust: nightly
- os: osx
rust: nightly
script: ci/script.sh
branches:
only:
- master

View File

@ -5,8 +5,7 @@ Comes with support for following symbolic links, controlling the number of
open file descriptors and efficient mechanisms for pruning the entries in the open file descriptors and efficient mechanisms for pruning the entries in the
directory tree. directory tree.
[![Linux build status](https://api.travis-ci.org/BurntSushi/walkdir.svg)](https://travis-ci.org/BurntSushi/walkdir) [![Build status](https://github.com/BurntSushi/walkdir/workflows/ci/badge.svg)](https://github.com/BurntSushi/walkdir/actions)
[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/walkdir?svg=true)](https://ci.appveyor.com/project/BurntSushi/walkdir)
[![](http://meritbadge.herokuapp.com/walkdir)](https://crates.io/crates/walkdir) [![](http://meritbadge.herokuapp.com/walkdir)](https://crates.io/crates/walkdir)
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).

View File

@ -1,26 +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 build --verbose
- cargo test --verbose
- cargo generate-lockfile -Z minimal-versions
- cargo build --verbose
- cargo test --verbose
branches:
only:
- master

View File

@ -1,22 +0,0 @@
#!/bin/sh
set -ex
MSRV="1.23.0"
cargo build --verbose
# Give up testing on MSRV since our dev-dependencies no longer support it.
if [ "$TRAVIS_RUST_VERSION" = "$MSRV" ]; then
exit
fi
cargo build --verbose --all
cargo doc --verbose
cargo test --verbose
if [ "$TRAVIS_RUST_VERSION" = nightly ]; then
cargo +nightly generate-lockfile -Z minimal-versions
cargo build --verbose
cargo test --verbose
fi