From bd8310ea9b6e82a3d31e70f493c2dae54ca9a2ca Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 10 Mar 2024 14:38:46 +0900 Subject: [PATCH] Migrate to GitHub Actions --- .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++ .travis.yml | 19 ---------------- appveyor.yml | 48 ---------------------------------------- 3 files changed, 45 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..34f92c1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [stable, beta, nightly] + include: + - os: windows-latest + rust: stable-x86_64-pc-windows-gnu + - os: windows-latest + rust: nightly-x86_64-pc-windows-gnu + - os: windows-latest + rust: stable-i686-pc-windows-msvc + - os: windows-latest + rust: nightly-i686-pc-windows-msvc + - os: windows-latest + rust: stable-i686-pc-windows-gnu + - os: windows-latest + rust: nightly-i686-pc-windows-gnu + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust }} + - run: cargo build + - run: cargo build --features termination + - run: cargo test + - run: cargo test --features termination + + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt --check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9ef23f3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: rust -cache: cargo -rust: - - stable - - beta - - nightly -env: -matrix: - include: - - rust: stable - env: SYNTAX_CHECK=1 - install: - - rustup component add rustfmt - script: - - cargo fmt -- --check - -notifications: - email: false -sudo: false diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index cc9ed3f..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Original version from https://github.com/starkat99/appveyor-rust - -os: Visual Studio 2015 - -environment: - matrix: - - channel: stable - target: x86_64-pc-windows-msvc - - channel: stable - target: i686-pc-windows-msvc - - channel: beta - target: x86_64-pc-windows-msvc - - channel: beta - target: i686-pc-windows-msvc - - channel: nightly - target: x86_64-pc-windows-msvc - - channel: nightly - target: i686-pc-windows-msvc - - channel: stable - target: x86_64-pc-windows-gnu - - channel: stable - target: i686-pc-windows-gnu - - channel: beta - target: x86_64-pc-windows-gnu - - channel: beta - target: i686-pc-windows-gnu - - channel: nightly - target: x86_64-pc-windows-gnu - - channel: nightly - target: i686-pc-windows-gnu - -matrix: - allow_failures: - - channel: nightly - -install: - - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init -yv --default-toolchain %channel% --default-host %target% - - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - - rustc -vV - - cargo -vV - -# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents -# the "directory does not contain a project or solution file" error. -build: false - -test_script: - - cargo test --verbose %cargoflags%