Skip to content
Snippets Groups Projects
Commit feacd72d authored by Jean-Michel Picod's avatar Jean-Michel Picod
Browse files

Add Github workflows

These should do the checks for us.
Not an expert though so it may need a bit of tweaking before they do
what we want them to do.
parent 292da30c
No related branches found
No related tags found
No related merge requests found
name: markdownlint
on:
push:
paths:
- '**/*.md'
- '.markdownlint.json'
- '!third_party/**'
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: markdownlint-cli
uses: nosborn/github-action-markdown-cli@v1.1.1
with:
files: **/*.md
config_file: ".markdownlint.json"
name: pylint
on:
push:
paths:
- '**/*.py'
- '.pylintrc'
- '!third_party/**'
jobs:
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install tockloader
- name: Test code with pylint
run: |
pip install pylint
pylint --rcfile=.pylintrc
on:
push:
paths:
- 'examples/*.rs'
- 'libraries/**/*.rs'
- 'src/**/*.rs'
- 'patches/**'
- '**/Cargo.toml'
- '.cargo/config'
- '!third_party/**'
jobs:
initial_setup:
name: Set up project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: thumbv7em-none-eabi
override: true
- run: ./setup.sh
cargo_format_src:
name: Cargo format src/
needs: initial_setup
steps:
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
cargo_format_cbor:
name: Cargo format libraries/cbor
needs: initial_setup
steps:
- uses: actions-rs/cargo@v1
working-directory: libraries/cbor
with:
command: fmt
args: --all -- --check
cargo_format_crypto:
name: Cargo format libraries/crypto
needs: initial_setup
steps:
- uses: actions-rs/cargo@v1
working-directory: libraries/crypto
with:
command: fmt
args: --all -- --check
cargo_check:
name: Cargo Check
needs: initial_setup
steps:
- name: Check OpenSK w/o features
uses: actions-rs/cargo@v1
with:
command: check
args: --target thumbv7em-none-eabi --release
- name: Check OpenSK with_ctap1
uses: actions-rs/cargo@v1
with:
command: check
args: --target thumbv7em-none-eabi --release --features with_ctap1
- name: Check OpenSK debug_ctap
uses: actions-rs/cargo@v1
with:
command: check
args: --target thumbv7em-none-eabi --release --features debug_ctap
- name: Check OpenSK debug_ctap,with_ctap1
uses: actions-rs/cargo@v1
with:
command: check
args: --target thumbv7em-none-eabi --release --features debug_ctap,with_ctap1
- name: Check examples
uses: actions-rs/cargo@v1
with:
command: check
args: --target thumbv7em-none-eabi --release --examples
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment