Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github: Build artifacts as part of workflow #210

Merged
merged 2 commits into from
Jul 30, 2020

Conversation

alistair23
Copy link
Collaborator

This PR builds libtock-rs binaries as part of the CI.

The idea here is then other repos (like the Tock kernel) can then use the binaries for testing.

@alistair23
Copy link
Collaborator Author

You can see what this looks like at: https://github.com/alistair23/libtock-rs/actions/runs/147760734

@jrvanwhy
Copy link
Collaborator

The produced artifacts will disappear after 90 days. Is that a problem for using them in Tock's CI?

@alistair23
Copy link
Collaborator Author

That's not ideal, but hopefully will be ok

tools/flash.sh Show resolved Hide resolved
@alistair23
Copy link
Collaborator Author

Apparently GitHub decided that downloading artifacts would be too useful and block it without authentication. actions/upload-artifact#51

I don't see a good way to allow Tock to download artifacts from libtock-rs without hard-coding someone's credentials in the scripts.

@alistair23 alistair23 force-pushed the alistair/artifacts branch from 985a467 to b41777c Compare July 10, 2020 18:34
@jrvanwhy
Copy link
Collaborator

Apparently GitHub decided that downloading artifacts would be too useful and block it without authentication. actions/upload-artifact#51

I don't see a good way to allow Tock to download artifacts from libtock-rs without hard-coding someone's credentials in the scripts.

Do you still have a use case for this PR?

@alistair23
Copy link
Collaborator Author

Kind of.

I still think it's worth merging. Worst case it just provides binaries which people can download (if they have a GitHub account).

Hopefully GitHub will fix their broken API, otherwise maybe we could have access keys in Tock's GitHub CI (and store them securely) to pull the binaries in.

@torfmaster
Copy link
Collaborator

I don't see a good way to allow Tock to download artifacts from libtock-rs without hard-coding someone's credentials in the scripts.

If we stick to travis there is a way of encrypting secrets in the CI pipeline, e.g. by https://docs.travis-ci.com/user/encryption-keys/

@jrvanwhy
Copy link
Collaborator

I don't see a good way to allow Tock to download artifacts from libtock-rs without hard-coding someone's credentials in the scripts.

If we stick to travis there is a way of encrypting secrets in the CI pipeline, e.g. by https://docs.travis-ci.com/user/encryption-keys/

Tock doesn't use Travis anymore; it has migrated entirely to GitHub Actions.

I was actually planning to send a PR to migrate libtock-rs to GitHub Actions as well, as long as it isn't slower than Travis.

@alistair23
Copy link
Collaborator Author

Ping!

@jrvanwhy
Copy link
Collaborator

bors r+

bors bot added a commit that referenced this pull request Jul 14, 2020
210: .github: Build artifacts as part of workflow r=jrvanwhy a=alistair23

This PR builds libtock-rs binaries as part of the CI.

The idea here is then other repos (like the Tock kernel) can then use the binaries for testing.

Co-authored-by: Alistair Francis <[email protected]>
@jrvanwhy
Copy link
Collaborator

bors r+

I'm not sure why Bors was cancelled, and its Details page requests permissions I am not comfortable giving it. Trying again blindly.

bors bot added a commit that referenced this pull request Jul 14, 2020
210: .github: Build artifacts as part of workflow r=jrvanwhy a=alistair23

This PR builds libtock-rs binaries as part of the CI.

The idea here is then other repos (like the Tock kernel) can then use the binaries for testing.

Co-authored-by: Alistair Francis <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 14, 2020

Build failed:

@alistair23
Copy link
Collaborator Author

Thanks!

Bors is unfortunately almost impossible to debug as it requires an account to even see the logs. Luckily I can see the failure on Travis, I'll send a patch

@alistair23 alistair23 force-pushed the alistair/artifacts branch from b41777c to c1ab0d5 Compare July 14, 2020 19:30
@alistair23
Copy link
Collaborator Author

That should fix it. The Tock submodule was too old and failing trying to download the OpenTitan ROM

@jrvanwhy
Copy link
Collaborator

bors d+

Please try to merge when the currently-ongoing Travis run is finished.

@bors
Copy link
Contributor

bors bot commented Jul 14, 2020

✌️ alistair23 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@jrvanwhy
Copy link
Collaborator

... and the Tock update appears to have broken the test runner. Has the path to tock's QEMU changed?

@alistair23
Copy link
Collaborator Author

No, it seems to be a weird Make behaviour. I'm trying to figure it out

@jrvanwhy
Copy link
Collaborator

Would moving the CI to GitHub actions (aways from Travis) make the debugging easier? If so, let me know, and I'll send a PR.

@alistair23
Copy link
Collaborator Author

This should fix the failure: tock/tock#2024

alistair23 added a commit to alistair23/tock that referenced this pull request Jul 16, 2020
Instead of running the setup commands as part of bash -c * just have
Make call them from the shell.

This fixes a build failure seen at: tock/libtock-rs#210

Signed-off-by: Alistair Francis <[email protected]>
bors bot added a commit to tock/tock that referenced this pull request Jul 20, 2020
1994: kernel: expose APIs for external `ProcessType`s r=bradjc a=bradjc

### Pull Request Overview

This pull request adds new functions with `pub` visibility modifiers to enable an implementation of `ProcessType` to exist outside of the kernel/ crate. These new functions are protected with capabilities since these are very sensitive operations that shouldn't be generally called.

I named the new functions `_public`. I don't think we have an existing convention for this, so I made one up.

I added a new capability `ExternalProcessCapability` to capture the use case for making these functions and constructors public. Increment/decrement work I re-used the `MainLoopCapability` since I think that accurately captures the permissions needed to increment or decrement work. For the others I wasn't sure what to do, so I added a new capability.

Replaces #1984.

### Testing Strategy

travis


### TODO or Help Wanted

@jon-flatley will this work?


### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


2024: Makefile: Don't run the setup commands inside bash r=ppannuto a=alistair23

### Pull Request Overview

Instead of running the setup commands as part of bash -c * just have
Make call them from the shell.

This fixes a build failure seen at: tock/libtock-rs#210


### Testing Strategy

Running the CI

### TODO or Help Wanted

### Documentation Updated

- [X] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


2035: OpenTitan: USB support cleanup r=bradjc a=alistair23

### Pull Request Overview

This PR includes various commits to start cleaning up the OpenTItan USB support. This is in preperation of supporting a CDC console in Tock.

With this PR the OpenTitan USB device will receive interrupts when attached to a USB host. I have more changes locally working on handling interrupt, but haven't made enough progress to send a PR yet.

### Testing Strategy

Connecting the OT FPGA dev kit to a Linux USB host.

### TODO or Help Wanted

### Documentation Updated

- [X] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [X] Ran `make prepush`.


Co-authored-by: Brad Campbell <[email protected]>
Co-authored-by: Alistair Francis <[email protected]>
@alistair23 alistair23 force-pushed the alistair/artifacts branch from c1ab0d5 to b9ede61 Compare July 20, 2020 16:06
@alistair23 alistair23 force-pushed the alistair/artifacts branch from b9ede61 to 87518f9 Compare July 29, 2020 00:43
@jrvanwhy
Copy link
Collaborator

Due to #225 I am going to merge this manually.

@jrvanwhy jrvanwhy merged commit 75f03d9 into tock:master Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants