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

CI: Fix nightly lint error & fix rust nightly version #331

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/as-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ jobs:
if: github.event_name == 'pull_request' || github.event_name == 'push'
name: Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
env:
RUSTC_VERSION: 1.76.0
steps:
- name: Code checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -56,11 +53,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y libsgx-dcap-quote-verify-dev

- name: Install Rust toolchain (${{ matrix.rust }})
- name: Install Rust toolchain (${{ env.RUSTC_VERSION }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: ${{ env.RUSTC_VERSION }}
override: true
components: rustfmt, clippy

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/as-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
name: TEE=${{ matrix.restful_tee_enum }} Generate Evidence Dynamically=${{ matrix.generate_evidence }}
runs-on: ${{ matrix.runner }}
env:
RUSTC_VERSION: 1.76.0
GRPC_TEE_ENUM: ${{ matrix.grpc_tee_enum }}
RESTFUL_TEE_ENUM: ${{ matrix.restful_tee_enum }}
steps:
Expand All @@ -36,7 +37,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: ${{ env.RUSTC_VERSION }}

- uses: actions/setup-go@v5
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/kbs-docker-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:
jobs:
e2e-test:
runs-on: ubuntu-latest
env:
RUSTC_VERSION: 1.76.0
steps:
- name: Checkout KBS
uses: actions/checkout@v4
Expand All @@ -20,7 +22,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: ${{ env.RUSTC_VERSION }}

- name: Build client
uses: actions-rs/cargo@v1
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/kbs-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ defaults:
jobs:
e2e-test:
runs-on: ${{ fromJSON(inputs.runs-on) }}

env:
RUSTC_VERSION: 1.76.0
steps:
- uses: actions/download-artifact@v4

Expand All @@ -33,7 +34,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: ${{ env.RUSTC_VERSION }}

- uses: actions/setup-go@v5
with:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/kbs-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ jobs:
ci:
strategy:
fail-fast: false
matrix:
rust:
- stable
- beta
- nightly
os:
- ubuntu-latest

runs-on: ${{ matrix.os }}
env:
RUSTC_VERSION: 1.76.0
runs-on: ubuntu-latest

steps:
- name: Code checkout
Expand All @@ -39,7 +33,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: ${{ env.RUSTC_VERSION }}
override: true
components: rustfmt, clippy
target: x86_64-unknown-linux-gnu
Expand Down
1 change: 0 additions & 1 deletion attestation-service/attestation-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{

use anyhow::{anyhow, Result};
use serde::Deserialize;
use std::convert::TryFrom;
use std::fs::File;
use std::path::{Path, PathBuf};

Expand Down
2 changes: 1 addition & 1 deletion attestation-service/verifier/src/cca/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//

use super::*;
use anyhow::{anyhow, Context, Result};
use anyhow::anyhow;
use async_trait::async_trait;
use base64::Engine;
use core::result::Result::Ok;
Expand Down
1 change: 0 additions & 1 deletion attestation-service/verifier/src/csv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: Apache-2.0
//

use anyhow::{Context, Result};
use log::{debug, warn};
extern crate serde;
use self::serde::{Deserialize, Serialize};
Expand Down
1 change: 0 additions & 1 deletion attestation-service/verifier/src/sample/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use anyhow::{Context, Result};
use log::debug;
extern crate serde;
use self::serde::{Deserialize, Serialize};
Expand Down
3 changes: 1 addition & 2 deletions attestation-service/verifier/src/snp/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Context, Result};
use anyhow::anyhow;
use base64::Engine;
use log::debug;
extern crate serde;
Expand Down Expand Up @@ -255,7 +255,6 @@ pub(crate) fn parse_tee_evidence(report: &AttestationReport) -> TeeEvidenceParse
mod tests {
use super::*;
use openssl::nid::Nid;
use sev::firmware::host::CertTableEntry;

#[test]
fn check_milan_certificates() {
Expand Down
2 changes: 0 additions & 2 deletions attestation-service/verifier/src/tdx/eventlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use anyhow::*;
use byteorder::{LittleEndian, ReadBytesExt};
use core::mem::size_of;
use eventlog_rs::Eventlog;
use std::convert::{TryFrom, TryInto};
use std::string::ToString;
use strum::{Display, EnumString};

#[derive(Debug, Clone, EnumString, Display)]
Expand Down
3 changes: 1 addition & 2 deletions attestation-service/verifier/src/tdx/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Context, Result};
use anyhow::anyhow;
use log::{debug, warn};

use crate::tdx::claims::generate_parsed_claim;
Expand Down Expand Up @@ -105,7 +105,6 @@ async fn verify_evidence(

#[cfg(test)]
mod tests {
use crate::tdx::claims::generate_parsed_claim;

use super::*;
use std::fs;
Expand Down
1 change: 0 additions & 1 deletion attestation-service/verifier/src/tdx/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use qvl::{
tee_qv_get_collateral, tee_supp_data_descriptor_t, tee_verify_quote,
};
use scroll::Pread;
use std::convert::TryInto;
use std::mem;
use std::time::{Duration, SystemTime};

Expand Down
1 change: 0 additions & 1 deletion kbs/src/api/src/policy_engine/opa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ impl PolicyEngineInterface for Opa {
mod tests {
use super::*;
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use base64::Engine;
use serde_json::json;

fn dummy_input(product_id: &str, svn: u64) -> String {
Expand Down
Loading