Skip to content

Workflow file for this run

# Only check that build passes
name: Basic check
on:
workflow_call:
inputs:
toolchain:
type: string
required: true
github_token:
type: string
required: true
jobs:
lint:
name: lint and format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ inputs.toolchain }}
- name: Install cargo
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
components: rustfmt, clippy
rustflags: ""
override: true
- name: Lint and format
uses: .github/actions/lint_format
with:
github_token: ${{ inputs.github_token }}
rust_test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ inputs.toolchain }}
- name: Install required libs (Ubuntu)
run: sudo apt-get install libxkbcommon-dev
- name: Install cargo
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
rustflags: ""
override: true
- name: Run rust test
run: cargo test --features capi