Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Apr 11, 2024
1 parent 8d5d948 commit afd0e19
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) Nitrokey GmbH
# SPDX-License-Identifier: CC0-1.0

name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Install rust
run: rustup show
- name: Execute checks
run: make ci
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) Nitrokey GmbH
# SPDX-License-Identifier: CC0-1.0

.PHONY: all
all: check lint test

.PHONY: check
check:
cargo check --all-targets
cargo check --all-targets --no-default-features
cargo check --all-targets --all-features

.PHONY: lint
lint:
cargo clippy --all-targets --all-features
cargo fmt -- --check
cargo doc --all-features --no-deps

.PHONY: test
test:
cargo test --all-features

.PHONY: ci
ci: export RUSTFLAGS=-Dwarnings
ci: export RUSTDOCFLAGS=-Dwarnings
ci: check lint test
8 changes: 4 additions & 4 deletions src/core_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2065,11 +2065,11 @@ impl<Twi: I2CForT1, D: DelayUs<u32>> Se050Backend<Twi, D> {
};
debug!("trussed: Chacha8Poly1305::WrapKey {:?}", req.key);
match parsed_key {
ParsedObjectId::VolatileKey(id) => {
debug!("Id: {:?}", id.0);
ParsedObjectId::VolatileKey(_id) => {
debug!("Id: {:?}", _id.0);
}
ParsedObjectId::VolatileRsaKey(id) => {
debug!("Rsa Ids: {:?}", (id.key_id(), id.intermediary_key_id()));
ParsedObjectId::VolatileRsaKey(_id) => {
debug!("Rsa Ids: {:?}", (_id.key_id(), _id.intermediary_key_id()));
}
_ => unreachable!(),
}
Expand Down

0 comments on commit afd0e19

Please sign in to comment.