Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ci #72

Merged
merged 5 commits into from Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,128 @@
name: CI

on:
pull_request:
push:
branches:
- master
- staging
- trying

env:
RUSTFLAGS: -Dwarnings

jobs:
build_and_test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [nightly, beta, stable]

steps:
- uses: actions/checkout@master

- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}

- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}

- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}

- name: Install Ceph
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
echo "deb https://download.ceph.com/debian-octopus/ bionic main" | sudo tee /etc/apt/sources.list.d/ceph.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends uuid-runtime ceph-mgr ceph-mon ceph-osd ceph-mds librados-dev libradosstriper-dev

- name: check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --tests

- name: check rados_striper
uses: actions-rs/cargo@v1
with:
command: check
args: --features rados_striper --all --bins --examples --tests

- name: check bench
uses: actions-rs/cargo@v1
if: matrix.rust == 'nightly'
with:
command: check
args: --benches

- name: tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all

cross:
name: Cross compile
runs-on: ubuntu-latest
strategy:
matrix:
target:
- i686-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu

steps:
- uses: actions/checkout@master

- name: Install nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Install cross
run: cargo install cross

- name: check
run: cross check --all --target ${{ matrix.target }}

check_fmt_and_docs:
name: Checking fmt and docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt

- name: setup
run: |
rustup component add rustfmt
rustc --version

- name: fmt
run: cargo fmt --all -- --check
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

11 changes: 0 additions & 11 deletions Cargo.toml
Expand Up @@ -31,10 +31,6 @@ for development etc. See README.md for details.
"""
edition = "2018"

[badges]

travis-ci = { repository = "ceph/ceph-rust", branch = "master" }

[dependencies]
bitflags = "1.2.1"
byteorder = "1"
Expand All @@ -50,10 +46,3 @@ tracing = "0.1"
[features]
default = []
rados_striper = []

# Run the example as follows: `cargo run --example ceph`

# [[bin]]
# doc = true
# name = "ceph"
# path = "examples/ceph.rs"
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -30,7 +30,7 @@ RUN set -eux; \
RUN apt-get update \
&& apt-get install apt-transport-https \
&& wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - \
&& echo "deb https://download.ceph.com/debian-nautilus/ xenial main" > /etc/apt/sources.list.d/ceph.list \
&& echo "deb https://download.ceph.com/debian-octopus/ focal main" > /etc/apt/sources.list.d/ceph.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
uuid-runtime \
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
## Ceph Rust
### Official Ceph Rust interface

[![Build Status](https://travis-ci.org/ceph/ceph-rust.svg?branch=master)](https://travis-ci.org/ceph/ceph-rust)
[![Build Status](https://github.com/ceph/ceph-rust/workflows/CI/badge.svg)](https://github.com/ceph/ceph-rust/actions?query=workflow%3ACI)
[![Version info](https://img.shields.io/crates/v/ceph.svg)](https://crates.io/crates/ceph)

Official Ceph Rust-lang interface. Contributions welcomed!
Expand Down
5 changes: 1 addition & 4 deletions examples/rados_striper.rs
@@ -1,8 +1,5 @@
#[cfg(feature = "rados_striper")]
use {ceph::ceph as ceph_helpers, ceph::error::RadosError, nix::errno::Errno};

use std::env;
use std::str;
use {ceph::ceph as ceph_helpers, ceph::error::RadosError, nix::errno::Errno, std::env, std::str};

#[cfg(not(feature = "rados_striper"))]
fn main() {}
Expand Down