Add CI and declare earliest supported version
This commit is contained in:
parent
a65a273e8d
commit
909618a78b
56
.github/workflows/ci.yml
vendored
Normal file
56
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
# "Borrowed" with permission from https://github.com/Jonxslays/piston_rs/blob/master/.github/workflows/ci.yml.
|
||||||
|
# Thanks bud!
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-and-format:
|
||||||
|
name: Lint and format
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Rust (stable)
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Run format check
|
||||||
|
run: cargo fmt -- --check
|
||||||
|
|
||||||
|
- name: Run clippy check
|
||||||
|
run: cargo clippy
|
||||||
|
|
||||||
|
test-and-build:
|
||||||
|
name: Test and build
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
rust_version: [1.31.0, 1.56.0, stable, nightly]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Rust (${{ matrix.rust_version }})
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.rust_version }}
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: cargo build
|
22
.github/workflows/rust.yml
vendored
22
.github/workflows/rust.yml
vendored
|
@ -1,22 +0,0 @@
|
||||||
name: Build and test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
An IRC (RFC1459) parser and formatter, built in Rust.
|
An IRC (RFC1459) parser and formatter, built in Rust.
|
||||||
|
|
||||||
|
`ircparser` should work on basically any Rust version, but the earliest version checked in the CI is v1.31 (the first version with Rust 2018 support).
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
To use the latest stable version of `ircparser`, add it to your Cargo.toml file like so:
|
To use the latest stable version of `ircparser`, add it to your Cargo.toml file like so:
|
||||||
|
|
Loading…
Reference in a new issue