Skip to content

Commit

Permalink
switch to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Apr 21, 2021
1 parent 2095185 commit 93c202c
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 32 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI-version

on:
push:
tags:
- "v*"

env:
CARGO_TERM_COLOR: always

jobs:
tests:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
toolchain:
- nightly
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
name: Test ${{ matrix.toolchain }} on ${{ matrix.os }} to ${{ matrix.target }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- run: cargo build --release --target ${{ matrix.target }}
- run: cargo test --release --target ${{ matrix.target }}
- run: cargo doc --release --target ${{ matrix.target }}
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on: [ push, pull_request ]

env:
CARGO_TERM_COLOR: always

jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- run: cargo fmt -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- run: cargo clippy -- -D warnings

tests:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
toolchain:
- nightly
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
name: Test ${{ matrix.toolchain }} on ${{ matrix.os }} to ${{ matrix.target }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- run: cargo build --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }}
- run: cargo doc --target ${{ matrix.target }}
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mprober"
version = "0.11.0-beta.7"
version = "0.11.0-beta.8"
authors = ["Magic Len <[email protected]>"]
edition = "2018"
repository = "https://github.com/magiclen/m-prober"
Expand All @@ -12,10 +12,6 @@ readme = "README.md"
license = "MIT"
include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE", "front-end/**/*", "views/**/*"]

[badges.travis-ci]
repository = "magiclen/m-prober"
branch = "master"

[profile.release]
lto = true
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
M Prober
====================

[![Build Status](https://travis-ci.org/magiclen/m-prober.svg?branch=master)](https://travis-ci.org/magiclen/m-prober)
[![CI](https://github.com/magiclen/m-prober/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/m-prober/actions/workflows/ci.yml)

This program aims to collect Linux system information including hostname, kernel version, uptime, RTC time, load average, CPU, memory, network interfaces, block devices and processes. It can be used not only as a normal CLI tool, but also a web application with a front-end webpage and useful HTTP APIs.

Expand Down

0 comments on commit 93c202c

Please sign in to comment.