From f8de25168d39af8177c947fe85c1f15fcde273c6 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Sat, 28 Sep 2019 21:49:16 +0900 Subject: [PATCH 1/3] Add github actions workflows --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++ .github/workflows/clippy.yml | 19 ++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/clippy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..f47c7c60 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +on: [push] + +jobs: + build_and_test: + name: Build adn test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@master + + - name: Install nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + + - name: check + uses: actions-rs/cargo@v1 + with: + command: check + args: --all --benches --bins --examples --tests + + - name: check unstable + uses: actions-rs/cargo@v1 + with: + command: check + args: --features unstable --all --benches --bins --examples --tests + + - name: tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --doc --features unstable + + check_fmt_and_docs: + name: Checking fmt and docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: setup + run: | + rustup default nightly + rustup component add rustfmt + cargo install mdbook + rustc --version + - name: mdbook + run: | + mdbook build docs + - name: fmt + run: cargo fmt --all -- --check + + - name: Docs + run: cargo doc --features docs,unstable diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 00000000..136557fb --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,19 @@ +on: push +name: Clippy check +jobs: + clippy_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - id: component + uses: actions-rs/components-nightly@v1 + with: + component: clippy + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - run: rustup component add clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} From 3b213e95d79c788be7590a1a5e52c820d21b1f43 Mon Sep 17 00:00:00 2001 From: nasa Date: Sun, 29 Sep 2019 18:32:39 +0900 Subject: [PATCH 2/3] Update .github/workflows/ci.yml Co-Authored-By: Yoshua Wuyts --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f47c7c60..d8cc2f60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ on: [push] jobs: build_and_test: - name: Build adn test on ${{ matrix.os }} + name: Build and test on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: From 4bbc95b6a269bf48e4d1abc2f8562476651fcdc5 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Mon, 30 Sep 2019 09:54:59 +0900 Subject: [PATCH 3/3] fix --- .github/workflows/ci.yml | 2 +- .github/workflows/clippy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8cc2f60..ff7e485c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: run: | rustup default nightly rustup component add rustfmt - cargo install mdbook + test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh rustc --version - name: mdbook run: | diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 136557fb..aa7b2d97 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -11,7 +11,7 @@ jobs: component: clippy - uses: actions-rs/toolchain@v1 with: - toolchain: nightly + toolchain: ${{ steps.component.outputs.toolchain }} override: true - run: rustup component add clippy - uses: actions-rs/clippy-check@v1