Skip to content
Snippets Groups Projects
Unverified Commit e61e4782 authored by Jean-Michel Picod's avatar Jean-Michel Picod Committed by GitHub
Browse files

Merge pull request #61 from jmichelp/master

Run everything that Travis-CI is running as Github workflows
parents d6661a09 433103cb
No related branches found
No related tags found
No related merge requests found
{
"problemMatcher": [
{
"owner": "yapf-diff",
"pattern": [
{
"regexp": "^[+-]{3}\\s*([^\\s]*)\\s*\\((original|reformatted)\\)$",
"file": 1
},
{
"regexp": "^@@\\s*-(\\d+),(\\d+)\\s*\\+(\\d+),(\\d+)\\s*@@$",
"line": 1,
"column": 2
},
{
"regexp": "^(\\s|\\+[^+]|\\-[^-]).*$",
"loop": true,
"message": 1
}
]
},
{
"owner": "pylint",
"pattern": [
{
"regexp": "^PYLINT:(.*)/.*$",
"fromPath": 1
},
{
"regexp": "^\\*{13}\\s*Module\\s+(.*)$",
"file": 1
},
{
"regexp": "^([CEFIRW]\\d{4}):\\s*(\\d+)\\s*:\\s*(.*)$",
"code": 1,
"line": 2,
"message": 3
}
]
}
]
}
......@@ -2,16 +2,16 @@ name: Security audit
on:
schedule:
- cron: '0 0 * * *'
jobs:
audit:
runs-on: ubuntu-18.04
if: env.GITHUB_HEAD_REF == 0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: thumbv7em-none-eabi
override: true
- uses: actions/setup-python@v1
with:
python-version: 3.7
......
......@@ -19,9 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: thumbv7em-none-eabi
override: true
- uses: actions/setup-python@v1
with:
python-version: 3.7
......
......@@ -19,9 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: thumbv7em-none-eabi
override: true
- uses: actions/setup-python@v1
with:
python-version: 3.7
......
---
name: CBOR tests
on:
push:
paths:
- 'libraries/cbor/**/*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
cbor_test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: thumbv7em-none-eabi
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Set up OpenSK
run: ./setup.sh
- name: Unit testing of CBOR library (release mode)
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path libraries/cbor/Cargo.toml --release --features std
- name: Unit testing of CBOR library (debug mode)
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path libraries/cbor/Cargo.toml --features std
---
name: Crypto library tests
on:
push:
paths:
- 'libraries/crypto/**/*'
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'libraries/crypto/**/*'
jobs:
crypto_test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: thumbv7em-none-eabi
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Set up OpenSK
run: ./setup.sh
- run: echo "::set-env name=RUSTFLAGS::-C target-feature=+aes"
- name: Unit testing of crypto library (release mode)
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path libraries/crypto/Cargo.toml --release --features std,derive_debug
- name: Unit testing of crypto library (debug mode)
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path libraries/crypto/Cargo.toml --features std,derive_debug
---
name: OpenSK build
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build_ctap2:
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: thumbv7em-none-eabi
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Set up OpenSK
run: ./setup.sh
- name: Building OpenSK
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target=thumbv7em-none-eabi --features with_ctap1
---
name: OpenSK tests
on:
push:
paths:
- 'src/**/*.rs'
pull_request:
types: [opened, synchronize, reopened]
jobs:
ctap2_test:
name: CTAP2 unit tests
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: thumbv7em-none-eabi
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Set up OpenSK
run: ./setup.sh
- name: Unit testing of CTAP2 (release mode)
uses: actions-rs/cargo@v1
with:
command: test
args: --release --features std
- name: Unit testing of CTAP2 (debug mode)
uses: actions-rs/cargo@v1
with:
command: test
args: --features std
- name: Unit testing of CTAP2 (release mode + CTAP1)
uses: actions-rs/cargo@v1
with:
command: test
args: --release --features std,with_ctap1
- name: Unit testing of CTAP2 (debug mode + CTAP1)
uses: actions-rs/cargo@v1
with:
command: test
args: --features std,with_ctap1
......@@ -22,11 +22,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install tockloader
pip install tockloader pylint
- name: Register matcher
run: echo ::add-matcher::./.github/python_matcher.json
- name: Test code with pylint
run: |
pip install pylint
pylint --rcfile=.pylintrc --score=n `find . ! -path "./third_party/*" -type f -name '*.py'`
run: ./tools/run_pylint.sh
yapf:
runs-on: ubuntu-18.04
......@@ -39,6 +39,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install yapf
pip install yapf tockloader
- name: Test code formatting with yapf
run: yapf --style=chromium --recursive --exclude third_party --diff .
run: |
echo ::add-matcher::./.github/python_matcher.json
yapf --style=chromium --recursive --exclude third_party --diff .
#!/usr/bin/env bash
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SUCCESS=0
# Ensure we are at the project root directory
cd $(readlink -f $(dirname $0))/..
for file in `find . ! -path "./third_party/*" -type f -name '*.py'`
do
# Output header for our custom matcher on Github workflow
echo "PYLINT:${file}"
if ! pylint --rcfile=.pylintrc --score=n "$file"
then
SUCCESS=1
fi
done
exit $SUCCESS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment