diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..45f1369 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +env: + RUSTFLAGS: -Cdebuginfo=0 + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + RUST_BACKTRACE: 1 + +jobs: + tests: + name: Tests + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.toolchain == 'nightly' }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + toolchain: [stable, 1.60.0] + steps: + - uses: actions/checkout@v2 + + # install the toolchain we are going to compile and test with + - name: install ${{ matrix.toolchain }} toolchain + id: install_toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + profile: minimal + override: true + + # we want to install the latest nightly with clippy and rustfmt to run checks against stable + - name: install nightly toolchain + id: install_nightly_toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + components: clippy, rustfmt + if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' + + # run rustfmt and clippy checks, but only once + - run: cargo +nightly fmt --all -- --check + if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' + + #- run: cargo +nightly clippy -Z unstable-options --workspace --all-targets --all-features + # if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' + + # run tests + - run: cargo test --verbose diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 023b136..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: rust -sudo: false -branches: - except: - - master diff --git a/Cargo.toml b/Cargo.toml index 900886b..d79ab9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ path = "lib.rs" [dependencies] expat-sys = "2.1.0" -freetype-sys = "0.13.0" +freetype-sys = "0.17.0" [build-dependencies] pkg-config = "0.3" diff --git a/build.rs b/build.rs index 23e9653..c311c53 100644 --- a/build.rs +++ b/build.rs @@ -40,7 +40,7 @@ fn main() { assert!(Command::new("make") .env("MAKEFLAGS", env::var("CARGO_MAKEFLAGS").unwrap_or_default()) - .args(&["-R", "-f", "makefile.cargo"]) + .args(["-R", "-f", "makefile.cargo"]) .status() .unwrap() .success());