Skip to content

Revert #112 (#114)

Revert #112 (#114) #9

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: Continous Integration
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
check:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
default: true
- name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
clippy-check:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
default: true
- name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings
format:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
default: true
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
build:
needs:
- format
- clippy-check
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
default: true
profile: minimal
- name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Archive release artifacts
uses: actions/upload-artifact@v3
with:
name: release artifact
path: target/release/magmawm