Commit Graph
100 Commits
Author SHA1 Message Date
Jean-Michel Picod 49182c531a Add new python dependency 2020-03-12 13:23:54 +01:00
Jean-Michel Picod 0e1c76455d Address review round #2 2020-03-12 12:12:45 +01:00
Jean-Michel Picod 7c5c7b9d05 Ensure we have something to do. 2020-03-11 18:31:09 +01:00
Jean-Michel Picod 4a3ccb48d7 Allow flashing only the kernel without any app. 2020-03-11 18:29:31 +01:00
Jean-Michel Picod b22832e9c7 Rely on Makefile to build Tock OS 2020-03-11 18:20:18 +01:00
Jean-Michel Picod 550098d560 Remove duplicate patch 2020-03-11 17:54:37 +01:00
Jean-Michel Picod e87e78acf4 Minor changes (review round 1) 2020-03-11 17:54:37 +01:00
Jean-Michel Picod 9c13d738fd Fix pylint 2020-03-11 17:54:37 +01:00
Jean-Michel Picod e63482af1c Revamp deploy.py
Now the script supports more flashing methods:
- JLink (with tockloader)
- OpenOCD (with tockloader)
- pyOCD
- Nordic DFU
- none (will produce an IntelHex file)

Also merged the contributions from:
- Yihui Xiong to support the Makerdiary USB dongle board
- Dennis Geurts to support Nordic DFU

Doc updated accordingly.

Imported 2 patches for Tock kernel:
- 06-add-set_vector_table_offset.patch (upstream tock/tock#1579)
- 07-nrf52-bootloader.patch (upstream tock/tock#1681)
2020-03-11 17:54:37 +01:00
Jean-Michel Picod 47bd524c40 Merge pull request #68 from jmichelp/master
Fix extraneous globbing in workflows
2020-03-06 14:07:48 +01:00
Jean-Michel Picod e21c753dd3 Merge branch 'master' into master 2020-03-06 13:36:11 +01:00
Jean-Michel Picod 9b3eca2c78 Fix extraneous globbing in workflows 2020-03-06 11:35:38 +01:00
Jean-Michel Picod dbacd7c9e4 Merge pull request #65 from jmichelp/master
Make internal python linter happy.
2020-03-03 16:04:55 +01:00
Jean-Michel Picod 740d6658a5 Make internal python linter happy.
It seems that our internal linter is stricter than what pylint does.
Fixing the python code to make both happy and tries to fix the gap by
modifying pylintrc configuration file
2020-03-03 14:56:11 +01:00
Jean-Michel Picod b649433c5f Merge pull request #64 from jmichelp/master
Fix cargo audit workflow
2020-03-03 14:24:38 +01:00
Jean-Michel Picod 2e92227164 Fix cargo audit workflow
The env context is only available at the step level, not the job one so
we need to use the github context instead. But the head_ref will only be
populated if we run in a pull_request event. So until we find a better
solution, let's match on the repo URL.
2020-03-03 12:05:38 +01:00
Jean-Michel Picod 4930bff7f8 Merge pull request #62 from jmichelp/master
Fix clippy warnings.
2020-03-02 15:34:49 +01:00
Jean-Michel Picod 1c87efd27a Fix clippy warnings.
Because of libtock-rs we can't run clippy on our codebase. But it could
run at least on `build.rs`.
2020-03-02 15:14:50 +01:00
Jean-Michel Picod e61e47820c Merge pull request #61 from jmichelp/master
Run everything that Travis-CI is running as Github workflows
2020-03-02 15:07:57 +01:00
Jean-Michel Picod 433103cbc9 Merge branch 'master' into master 2020-03-02 15:01:18 +01:00
Jean-Michel Picod f9f27d7f89 Try to avoid running cargo audit on forks (it fails) 2020-03-02 14:28:16 +01:00
Jean-Michel Picod 72ac346d57 Revert strategy.matrix and fix missing release mode 2020-03-02 14:27:51 +01:00
Jean-Michel Picod 73de02d141 Try using strategy.matrix to run cargo check 2020-03-02 14:24:10 +01:00
Jean-Michel Picod 421f8194af Gate also crypto unit tests in pull-request by paths
These tests take 10 min. Let's avoid running them when not needed.
2020-02-28 17:10:28 +01:00
Jean-Michel Picod e30ef9c984 Fix typo 2020-02-28 16:56:15 +01:00
Jean-Michel Picod 40632af186 Remove cargo audit on pull request as it fails 2020-02-28 16:55:18 +01:00
Jean-Michel Picod ac42e86d37 Also ensure we build on OS X 2020-02-28 16:54:16 +01:00
Jean-Michel Picod f91538506e Restore path guards 2020-02-28 16:38:42 +01:00
Jean-Michel Picod 578742034e Remove toolchain parameter for workflow
It seems the github action will pick up the rust-toolchain file and if
we specify it as an input, it will have a higher priority
2020-02-28 16:32:20 +01:00
Jean-Michel Picod c8ac2baca3 Fix wrong workflow name 2020-02-28 16:24:21 +01:00
Jean-Michel Picod ae1242a55d Temp enable all unit test to verify workflows 2020-02-28 16:11:23 +01:00
Jean-Michel Picod cc35ce5067 Create workflows for unit testing 2020-02-28 16:03:04 +01:00
Jean-Michel Picod 68f9eb6b09 Enables cargo audit on pull request 2020-02-28 15:58:32 +01:00
Jean-Michel Picod 9de3817ade Add missing license header 2020-02-28 15:57:48 +01:00
Jean-Michel Picod ac37d7dd8a Restore path guards 2020-02-28 15:55:06 +01:00
Jean-Michel Picod 7dedf40440 Fix typo in YAML workflow 2020-02-28 15:53:44 +01:00
Jean-Michel Picod 19056abbf3 Replace custom action by shell script 2020-02-28 15:52:09 +01:00
Jean-Michel Picod 6c23c45e3c Merge pull request #59 from cfsghost/master
Fixed incorrect command in install.md.
2020-02-28 10:38:00 +01:00
Jean-Michel Picod 47c523e959 Fix entrypoint 2020-02-27 20:11:29 +01:00
Jean-Michel Picod fa19a80366 Try with a custom action 2020-02-27 20:07:29 +01:00
Jean-Michel Picod db3b23cf22 Still trying to trigger pylint 2020-02-27 19:22:06 +01:00
Jean-Michel Picod 7a86f80e2b Now try to trigger pylint matcher 2020-02-27 19:16:45 +01:00
Jean-Michel Picod 051a78ab98 Fix yapf matcher 2020-02-27 19:09:57 +01:00
Jean-Michel Picod 816d2020be Fix invalid regexp 2020-02-27 18:51:03 +01:00
Jean-Michel Picod 507f4a9f89 Temp disable path restriction 2020-02-27 18:47:21 +01:00
Jean-Michel Picod 4e4b4a3357 Add mistake in deploy.py to test matchers 2020-02-27 18:45:53 +01:00
Jean-Michel Picod 28afe7f86f Fix yaml bad indent 2020-02-27 18:43:02 +01:00
Jean-Michel Picod d69b40f2cf Add custom python problem matcher for pylint and yapf 2020-02-27 18:41:14 +01:00
Jean-Michel Picod 41020ec9f6 Merge pull request #53 from jmichelp/master
Add Github workflows
2020-02-25 16:25:11 +01:00
Jean-Michel Picod 9de4662dee Add more checks
- python code formatting is tested with yapf
- cron workflow to run cargo audit
- Don't run on latest
2020-02-25 14:12:37 +01:00
Jean-Michel Picod 59f381c920 Add badges 2020-02-25 10:26:12 +01:00
Jean-Michel Picod 53964b1d61 Also run checks on pull requests 2020-02-25 10:25:55 +01:00
Jean-Michel Picod a13f9cf8bc Restore path restriction
This avoids running workflows when it's not needed
2020-02-25 10:07:03 +01:00
Jean-Michel Picod 6c96c639ca Split cargo fmt and cargo check into 2 workflows 2020-02-25 10:06:36 +01:00
Jean-Michel Picod b152bf98d0 Remove jobs breakdown/dependencies as it seems to not work? 2020-02-25 09:59:10 +01:00
Jean-Michel Picod 51b0e0f48a Revert debug mode 2020-02-25 09:58:52 +01:00
Jean-Michel Picod cd14738a2f Fix missing python dependencies 2020-02-25 09:41:48 +01:00
Jean-Michel Picod 89d15f5759 Fix tput stopping the workflow 2020-02-25 09:36:20 +01:00
Jean-Michel Picod 1113410195 Debug why Github workflow is failing here 2020-02-25 09:27:57 +01:00
Jean-Michel Picod dbde04df45 Fix setup script for Github 2020-02-24 19:34:39 +01:00
Jean-Michel Picod a73837cb59 Fix undefined term in Github workflows 2020-02-24 19:31:37 +01:00
Jean-Michel Picod b18d3097a3 Fix cargo workflow 2020-02-24 19:28:14 +01:00
Jean-Michel Picod ac800aa5d2 Fix typo and pylint 2020-02-24 19:25:57 +01:00
Jean-Michel Picod 949e06ce51 Rename workflows 2020-02-24 19:22:04 +01:00
Jean-Michel Picod ca40818eb6 Fix markdownlint warnings 2020-02-24 19:21:12 +01:00
Jean-Michel Picod 40d5121d0b Remove paths to check workflows. 2020-02-24 19:11:15 +01:00
Jean-Michel Picod 80096529ad Fix YAML syntax 2020-02-24 19:04:09 +01:00
Jean-Michel Picod feacd72d6e 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.
2020-02-24 19:00:51 +01:00
Jean-Michel Picod 292da30cad Merge pull request #51 from jmichelp/master
Configure pylint for Google's Python style.
2020-02-24 18:54:33 +01:00
Jean-Michel d11887de76 Add missing new line... 2020-02-24 15:50:50 +01:00
Jean-Michel f4d60cf342 Fix configuration about missing newline 2020-02-24 15:45:11 +01:00
Jean-Michel e9f69170e4 Configure pylint for Google's Python style.
Adding pylint configuration, VSCode configuration to lint on save and
make the deploy.py script compliant.
2020-02-21 17:41:40 +01:00
Jean-Michel Picod cb13ff6962 Merge pull request #49 from jmichelp/master
Fix errors in deploy script.
2020-02-21 15:28:42 +01:00
Jean-Michel 8ad28efa5b Fix errors in deploy script. 2020-02-21 14:42:34 +01:00
Jean-Michel Picod 36f2530af6 Merge pull request #48 from jmichelp/master
Document troubleshooting on OS X
2020-02-21 14:08:07 +01:00
Jean-Michel a5c0ea054d Document troubleshooting on OS X 2020-02-21 11:57:11 +01:00
Jean-Michel Picod 00222a4976 Merge pull request #46 from jmichelp/fix-openssl
Better handling of OpenSSL generated keys.
2020-02-20 17:58:12 +01:00
Jean-Michel Picod ed6f408063 Address comments on pull-request 2020-02-20 17:09:08 +01:00
Jean-Michel Picod 5d9383376b Merge branch 'master' into fix-openssl 2020-02-20 16:32:46 +01:00
Jean-Michel Picod dfc0663324 Merge pull request #45 from jmichelp/master
Improve deploy script.
2020-02-20 16:32:30 +01:00
Jean-Michel Picod 6c363981c4 Better handling of OpenSSL generated keys.
It seems that ECC keys generated by OpenSSL can be between 30 and 33
bytes long whereas OpenSK code expects a fixed size of 32 bytes.
This variation could cause Travis CI to fail but also invalid ECC keys
to be flashed, causing the authenticator to not work.
2020-02-20 15:32:37 +01:00
Jean-Michel Picod f345a75302 Add Microsoft Python extension to allow code formatting, linting,... 2020-02-20 15:09:40 +01:00
Jean-Michel Picod 557eebab2c Improve deploy script.
- Check that JLinkExe in properly installed
- Verify that the app is installed
- Always report failures in the exit code
- Add vscode settings for Python code formatting using Google style
- Fix issue #42 regarding tockloader version and sticky parameter
2020-02-20 11:36:44 +01:00
Jean-Michel Picod ef414bc2cb Merge pull request #39 from google/gendx-patch-1
Add troubleshooting instructions.
2020-02-19 16:58:29 +01:00
Jean-Michel Picod 76aaea0333 Merge branch 'master' into gendx-patch-1 2020-02-19 16:16:03 +01:00
Jean-Michel Picod 7fda4c6435 Merge pull request #40 from jmichelp/master
Replace shell script with a python3 script
2020-02-19 16:15:30 +01:00
Jean-Michel Picod 1128a66e94 Fix typo 2020-02-19 15:43:13 +01:00
Jean-Michel Picod 5082e23e65 Revert a minor change 2020-02-19 15:22:27 +01:00
Jean-Michel Picod 992ffbbef3 Check for JLinkExe in path 2020-02-19 11:50:52 +01:00
Jean-Michel Picod 7d421d3ae0 Replace shell script with a python3 script.
Updated the shell script that generates the certificates and the
documentation accordingly.
Caveat: now installation is a 2-step procedure, installing OS and
application are split into 2 commands.
2020-02-19 11:34:43 +01:00
Jean-Michel Picod fa9fc3bb28 Merge pull request #22 from jmichelp/master
Fix run_desktop_tests.sh script
2020-02-06 16:52:24 +01:00
Jean-Michel Picod 5bd7863c4d Fix run_desktop_tests.sh script
The script begins with `set -eux` and therefore will fail when using an
undefined variable. This is the case with `TRAVIS_OS_NAME` outside of
Travis.
2020-02-06 16:34:34 +01:00
Jean-Michel Picod 8cbffc5ead Merge pull request #21 from jmichelp/master
Enable Travis on OSX
2020-02-06 16:00:18 +01:00
Jean-Michel Picod 06e5f1dbf1 Run unit tests also outside of travis 2020-02-06 15:31:11 +01:00
Jean-Michel Picod 95a8fe7d3f Enable Travis on OSX
Only do the build/link check. The unit tests are only ran on linux.
2020-02-06 15:13:21 +01:00
Jean-Michel Picod f5ed8a09f6 Merge pull request #14 from jmichelp/master
Change the way private key and cert are embedded.
2020-02-06 11:55:37 +01:00
Jean-Michel Picod 130aec165d Revert python3-crcmod install
Python3 on Travis is old (3.5) so crcmod is installed by pip anyway.
2020-02-06 10:59:09 +01:00
Jean-Michel Picod 3eef0ec859 Package python3-wheel was also missing on Travis. 2020-02-06 10:52:47 +01:00
Jean-Michel Picod 3ae0337fda Install system python3-crcmod on Travis.
Python3-setuptools seems old and installing crcmod (dependency from
tockloader) from pip fails because of this. Installing from the system
package manager should solve the problem.
2020-02-06 10:38:05 +01:00
Jean-Michel Picod 83eec6394f Merge pull request #16 from superderon/patch-1
Update install.md
2020-02-06 10:35:04 +01:00