Migrate from Travis CI to GitHub Actions (#220)

* Migrate from Travis CI to GitHub Actions

* name

* downgrade to checkout@v2 and ditch actions-rs

* Update ci.yml

* Update ci.yml

* KNOWN_TO_HAVE_RUSTFMT

* we don't need continue-on-error, we can just exclude it from required status

* Cover Windows 32bit

* CC: clang

* Skip clippy in 1.45.0

* Update ci.yml

* pin bitflags to last known good version

* Pin to nightly-2020-07-12 for now

* use ${{}} for windows compat

* Prevent line ending normalization

* Actually let's force LF.

* shell: bash for windows

* default to bash

* Remove appveyor/travis
without.crypto
Kagami Sascha Rosylight 2 years ago committed by GitHub
parent 762887be3f
commit 5fbe85f970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      .appveyor.yml
  2. 2
      .gitattributes
  3. 65
      .github/workflows/ci.yml
  4. 17
      .rustfmt.toml
  5. 48
      .travis.yml
  6. 2
      Cargo.toml
  7. 3
      README.md

@ -1,38 +0,0 @@
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
TOOLCHAIN: stable
- TARGET: i686-pc-windows-msvc
TOOLCHAIN: stable
- TARGET: x86_64-pc-windows-msvc
TOOLCHAIN: beta
- TARGET: i686-pc-windows-msvc
TOOLCHAIN: beta
- TARGET: x86_64-pc-windows-msvc
TOOLCHAIN: nightly
- TARGET: i686-pc-windows-msvc
TOOLCHAIN: nightly
install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %TOOLCHAIN%
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- choco install make -y
- choco install mingw -y
- refreshenv
- rustc -Vv
- cargo -Vv
- make -v
- gcc -v
# Disable AppVeyor's build phase, let 'cargo test' take care of the build
build: false
test_script:
- SET RUST_BACKTRACE=1
- cargo test --all --target %TARGET% --verbose
- cargo test --all --release --target %TARGET% --verbose
cache:
- C:\Users\appveyor\.cargo\registry
- target

2
.gitattributes vendored

@ -0,0 +1,2 @@
# Force LF normalization
* text=auto eol=lf

@ -0,0 +1,65 @@
name: CI Build Status
on: [push, pull_request]
env:
RUST_BACKTRACE: 1
# We install a known-to-have-rustfmt version of the nightly toolchain
# in order to run the nightly version of rustfmt, which supports rules
# that we depend upon. When updating, pick a suitable nightly version
# from https://rust-lang.github.io/rustup-components-history/
# See .rustfmt.toml for the list of unstable features.
KNOWN_TO_HAVE_RUSTFMT: nightly-2020-07-12
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
target:
- { os: ubuntu-latest, host: '' }
- { os: macos-latest, host: '' }
- { os: windows-latest, host: '-x86_64-pc-windows-msvc' }
- { os: windows-latest, host: '-i686-pc-windows-msvc' }
toolchain: [1.45.0, stable, beta, nightly]
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain ${{ matrix.toolchain }}${{ matrix.target.host }} on ${{ matrix.target.os }}
run: |
rustup toolchain install ${{ matrix.toolchain }}${{ matrix.target.host }} --profile minimal --component rustfmt clippy
rustup default ${{ matrix.toolchain }}${{ matrix.target.host }}
- if: ${{ matrix.toolchain == 'nightly' }}
run: |
rustup toolchain install $KNOWN_TO_HAVE_RUSTFMT --profile minimal --component rustfmt clippy
cargo +$KNOWN_TO_HAVE_RUSTFMT fmt --all -- --check
- if: ${{ matrix.toolchain == 'nightly' }}
run: cargo +$KNOWN_TO_HAVE_RUSTFMT clippy --all-features -- -D warnings
env:
CC: clang
- run: cargo build --verbose
- name: Test with all features
run: cargo test --all --verbose
- name: Test with no default features
run: cargo test --lib --no-default-features --verbose
- name: Test with db-dup-sort
run: cargo test --lib --no-default-features --features "db-dup-sort" --verbose
- name: Test with db-int-key
run: cargo test --lib --no-default-features --features "db-int-key" --verbose
- name: Test in release mode
run: cargo test --release --all --verbose
- name: Run all examples
run: ./run-all-examples.sh

@ -1,9 +1,18 @@
match_block_trailing_comma = true
max_width = 120
use_small_heuristics = "Off"
### unstable, nightly-only
# https://github.com/rust-lang/rustfmt/issues/3349
comment_width = 90
# https://github.com/rust-lang/rustfmt/issues/3374
force_multiline_blocks = true
# https://github.com/rust-lang/rustfmt/issues/4991
imports_granularity="Crate"
# https://github.com/rust-lang/rustfmt/issues/3361
imports_layout = "Vertical"
match_block_trailing_comma = true
max_width = 120
merge_imports = true
# https://github.com/rust-lang/rustfmt/issues/3363
reorder_impl_items = true
use_small_heuristics = "Off"
# https://github.com/rust-lang/rustfmt/issues/3347
wrap_comments = true

@ -1,48 +0,0 @@
language: rust
sudo: false
cache: cargo
rust:
- 1.45.0
- stable
- beta
- nightly
os:
- linux
- osx
matrix:
allow_failures:
- rust: nightly
fast_finish: true
before_script:
# We install a known-to-have-rustfmt version of the nightly toolchain
# in order to run the nightly version of rustfmt, which supports rules
# that we depend upon. When updating, pick a suitable nightly version
# from https://rust-lang.github.io/rustup-components-history/
- rustup toolchain install nightly-2020-07-12
- rustup component add rustfmt --toolchain nightly-2020-07-12
- rustup component add clippy --toolchain nightly-2020-07-12
# Use official clang in order to test out building on osx.
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
brew update;
brew install llvm;
export PATH="/usr/local/opt/llvm/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/llvm/lib";
export CPPFLAGS="-I/usr/local/opt/llvm/include";
fi
script:
- cargo +nightly-2020-07-12 fmt --all -- --check
- CC="clang" cargo +nightly-2020-07-12 clippy --all-features -- -D warnings
- cargo build --verbose
- export RUST_BACKTRACE=1
- cargo test --all --verbose
- cargo test --lib --no-default-features --verbose
- cargo test --lib --no-default-features --features "db-dup-sort" --verbose
- cargo test --lib --no-default-features --features "db-int-key" --verbose
- cargo test --release --all --verbose
- ./run-all-examples.sh

@ -30,7 +30,7 @@ with-fuzzer-no-link = ["lmdb-rkv/with-fuzzer-no-link"]
[dependencies]
arrayref = "0.3"
bincode = "1.0"
bitflags = "1.1"
bitflags = "~1.2"
byteorder = "1"
id-arena = "2.2"
lazy_static = "1.1"

@ -1,7 +1,6 @@
# rkv
[![Travis CI Build Status](https://travis-ci.org/mozilla/rkv.svg?branch=master)](https://travis-ci.org/mozilla/rkv)
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/lk936u5y5bi6qafb/branch/master?svg=true)](https://ci.appveyor.com/project/mykmelez/rkv/branch/master)
[![CI Build Status](https://github.com/mozilla/rkv/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mozilla/rkv/actions/workflows/ci.yml)
[![Documentation](https://docs.rs/rkv/badge.svg)](https://docs.rs/rkv/)
[![Crate](https://img.shields.io/crates/v/rkv.svg)](https://crates.io/crates/rkv)

Loading…
Cancel
Save