Bump actions/checkout from 3 to 4 #88
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: Continuous integration | |
# Stops the running workflow of previous pushes | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
- 1.71 # MSRV | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install SDL2 | |
run: | | |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" | |
sudo apt-get update -y -qq | |
sudo apt-get install libsdl2-dev | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Run tests with --no-default-features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --no-default-features | |
- name: Run tests with --all-features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features | |
lints-and-checks: | |
name: Lints and checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
components: rust-docs, rustfmt, clippy | |
- name: Rustfmt lints | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Clippy lints | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --no-deps -- -D warnings | |
- name: Build docs with --all-features | |
uses: actions-rs/cargo@v1 | |
env: | |
RUSTDOCFLAGS: -D warnings --cfg docsrs | |
with: | |
command: doc | |
args: --no-deps --all-features |