From 901cadaa7451dc9d14a2b68928db55ea9b0a5bb5 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 11 Jan 2020 12:14:30 -0500 Subject: ci: switch to GitHub Actions --- .github/workflows/ci.yml | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 17 ---------- README.md | 3 +- appveyor.yml | 26 --------------- ci/script.sh | 22 ------------ 5 files changed, 88 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100755 ci/script.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f302fcd --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 36dcdaf..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 1bfc52c..b7dcd76 100644 --- a/README.md +++ b/README.md @@ -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 directory tree. -[![Linux build status](https://api.travis-ci.org/BurntSushi/walkdir.svg)](https://travis-ci.org/BurntSushi/walkdir) -[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/walkdir?svg=true)](https://ci.appveyor.com/project/BurntSushi/walkdir) +[![Build status](https://github.com/BurntSushi/walkdir/workflows/ci/badge.svg)](https://github.com/BurntSushi/walkdir/actions) [![](http://meritbadge.herokuapp.com/walkdir)](https://crates.io/crates/walkdir) Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 22d2842..0000000 --- a/appveyor.yml +++ /dev/null @@ -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 diff --git a/ci/script.sh b/ci/script.sh deleted file mode 100755 index fa95d02..0000000 --- a/ci/script.sh +++ /dev/null @@ -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 -- cgit v1.2.3