forked from google/OpenSK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request google#61 from jmichelp/master
Run everything that Travis-CI is running as Github workflows
- Loading branch information
Showing
10 changed files
with
241 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"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 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/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 |