diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..36eb25d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + pull_request: + push: + merge_group: + +jobs: + rustfmt: + runs-on: ubuntu-latest + name: cargo fmt + steps: + - uses: actions/checkout@v4 + + - name: install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + + - name: cargo fmt + run: cargo fmt --all --check + + test-stable: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, macos-latest, ubuntu-latest] + name: cargo clippy + test + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + + - name: cargo clippy (default features) + run: cargo clippy -- -D warnings + + - name: cargo test + run: cargo test --all-features diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 22761ba..0000000 --- a/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d327978..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -environment: - PATH: '%PATH%;C:\Rust\bin' - matrix: - - RUST_CHANNEL: beta - - RUST_CHANNEL: nightly -install: - - ps: Start-FileDownload "https://github.com/PistonDevelopers/binaries/raw/master/x86_64/freetype.dll" - - ps: Start-FileDownload "https://github.com/PistonDevelopers/binaries/raw/master/x86_64/freetype.lib" - - mkdir C:\\freetype-x86_64-lib - - move freetype.dll C:\\freetype-x86_64-lib - - move freetype.lib C:\\freetype-x86_64-lib - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_CHANNEL}-x86_64-pc-windows-msvc.msi" - - msiexec /passive /i "rust-%RUST_CHANNEL%-x86_64-pc-windows-msvc.msi" ADDLOCAL=Rustc,Cargo,Std INSTALLDIR=C:\Rust - - mkdir .cargo - - echo [target.x86_64-pc-windows-msvc.freetype] >> .cargo\\config - - echo rustc-link-search = ["C:\\freetype-x86_64-lib"] >> .cargo\\config - - echo rustc-link-lib = ["freetype"] >> .cargo\\config - - type .cargo\\config -build_script: - - cargo test