diff --git a/.github/workflows/mdlint.yml b/.github/workflows/mdlint.yml new file mode 100644 index 0000000000000000000000000000000000000000..5c2db7b97d04c21d0d254cd4ce689737a69e1c74 --- /dev/null +++ b/.github/workflows/mdlint.yml @@ -0,0 +1,18 @@ +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" diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000000000000000000000000000000000000..929a05143cdd7dfac83077a06df45127616f93ec --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,27 @@ +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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000000000000000000000000000000000000..0611f1f0a9272a8f1d7b1d6b417a6c2585b4be02 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,79 @@ +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