diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dc77583 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + +env: + RUST_BACKTRACE: 1 + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-Cdebuginfo=0 --deny=warnings" + RUSTDOCFLAGS: "--deny=warnings" + +jobs: + fmt: + name: Check Formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: hecrj/setup-rust-action@v1 + with: + rust-version: stable + components: rustfmt + - name: Check Formatting + run: cargo fmt --all -- --check + + tests: + name: Tests + # Note: `raw-window-handle` doesn't have any `#[cfg(...)]` guards, so + # we don't bother testing on other platforms + runs-on: ubuntu-latest + strategy: + matrix: + rust_version: [stable, nightly] + + steps: + - uses: actions/checkout@v2 + + - uses: hecrj/setup-rust-action@v1 + with: + rust-version: ${{ matrix.rust_version }} + + - name: Check documentation + run: cargo doc --no-deps --document-private-items + + - name: Run tests + run: cargo test --verbose diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4ab59bb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,61 +0,0 @@ -language: rust - -matrix: - include: - # Linux 32bit - - env: TARGET=i686-unknown-linux-gnu - os: linux - rust: nightly - addons: - apt: - # Cross compiler and cross compiled C libraries - packages: &i686_packages - - gcc-multilib - - env: TARGET=i686-unknown-linux-gnu - os: linux - rust: stable - addons: - apt: - packages: *i686_packages - - # Linux 64bit - - env: TARGET=x86_64-unknown-linux-gnu - os: linux - rust: nightly - - env: TARGET=x86_64-unknown-linux-gnu - os: linux - rust: stable - - # macOS - - env: TARGET=x86_64-apple-darwin - os: osx - rust: nightly - - env: TARGET=x86_64-apple-darwin - os: osx - rust: stable - - # iOS - - env: TARGET=x86_64-apple-ios - os: osx - rust: nightly - - env: TARGET=x86_64-apple-ios - os: osx - rust: stable - -install: - - rustup self update - - rustup target add $TARGET; true - - rustup toolchain install stable - - rustup component add rustfmt --toolchain stable - -script: - - cargo +stable fmt --all -- --check - - cargo build --target $TARGET --verbose - # Running iOS apps on OSX requires the simulator so we skip that for now - - if [ "$TARGET" != "x86_64-apple-ios" ]; then cargo test --target $TARGET --verbose; fi - -after_success: - - | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - cargo publish --token ${CRATESIO_TOKEN} diff --git a/Cargo.toml b/Cargo.toml index 80967f3..57d6a00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,10 +16,6 @@ alloc = [] [dependencies] cty = "0.2" -[badges] -travis-ci = { repository = "rust-windowing/raw-window-handle" } -appveyor = { repository = "rust-windowing/raw-window-handle" } - [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] diff --git a/README.md b/README.md index d26c4db..bee8061 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # `raw-window-handle`: A common windowing interoperability library for Rust + [![Crates.io](https://img.shields.io/crates/v/raw-window-handle.svg?maxAge=2592000)](https://crates.io/crates/raw-window-handle) [![Docs](https://docs.rs/raw-window-handle/badge.svg)](https://docs.rs/raw-window-handle) +[![CI Status](https://github.com/rust-windowing/raw-window-handle/workflows/CI/badge.svg)](https://github.com/rust-windowing/raw-window-handle/actions) This library provides standard types for accessing a window's platform-specific raw window handle and display's platform-specific raw display handle. This does diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 050795b..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - CHANNEL: nightly - - TARGET: x86_64-pc-windows-msvc - CHANNEL: stable - - TARGET: i686-pc-windows-msvc - CHANNEL: nightly - - TARGET: i686-pc-windows-gnu - CHANNEL: nightly -install: - - 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 - - SET PATH=%PATH%;C:\MinGW\bin - - rustc -V - - cargo -V - -build: false - -test_script: - - cargo test --verbose