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

Update CI for SGX SDK action update #14

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Changes from 1 commit
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
114 changes: 36 additions & 78 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,25 @@ env:

jobs:
rustfmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
toolchain: nightly-2022-07-22
- uses: r7kamura/rust-problem-matchers@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check

markdown-lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: xt0rted/markdownlint-problem-matcher@v2
- uses: DavidAnson/markdownlint-cli2-action@v8

deny:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
Expand All @@ -54,130 +49,93 @@ jobs:
command: check ${{ matrix.checks }}

sort:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
- uses: actions-rs/install@v0.1
with:
crate: cargo-sort
version: latest
use-tool-cache: true
# We run this manually because actions-rs/cargo doesn't have output redirect
toolchain: nightly-2022-07-22
nick-mobilecoin marked this conversation as resolved.
Show resolved Hide resolved
- run: cargo install cargo-sort
- run: cargo sort --workspace --check >/dev/null

clippy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly-2022-07-22
components: clippy
override: true
toolchain: nightly-2022-07-22
- uses: r7kamura/rust-problem-matchers@v1
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --all-features -- -D warnings
- run: cargo clippy --all --all-features -- -D warnings

build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
strategy:
matrix:
rust:
- nightly-2022-07-22
steps:
- uses: actions/checkout@v3
- uses: mobilecoinfoundation/actions/sgxsdk@main
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: r7kamura/rust-problem-matchers@v1
- uses: actions-rs/cargo@v1
version: 2.18.100.3
- uses: dtolnay/rust-toolchain@master
with:
command: build
args: --release
toolchain: nightly-2022-07-22
- uses: r7kamura/rust-problem-matchers@v1
- run: cargo build --release

test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
strategy:
matrix:
rust:
- nightly-2022-07-22
steps:
- uses: actions/checkout@v3
- uses: mobilecoinfoundation/actions/sgxsdk@main
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: r7kamura/rust-problem-matchers@v1
- uses: actions-rs/cargo@v1
version: 2.18.100.3
- uses: dtolnay/rust-toolchain@master
with:
command: test
args: --release
toolchain: nightly-2022-07-22
- uses: r7kamura/rust-problem-matchers@v1
- run: cargo test --release

doc:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
strategy:
matrix:
rust:
- nightly-2022-07-22
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
toolchain: nightly-2022-07-22
- uses: r7kamura/rust-problem-matchers@v1
- uses: actions-rs/cargo@v1
with:
command: doc
args: --release --no-deps
- run: cargo doc --release --no-deps

coverage:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- "rustfmt"
- "markdown-lint"
steps:
- uses: actions/checkout@v3
- uses: mobilecoinfoundation/actions/sgxsdk@main
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-07-22
override: true
version: 2.18.100.3
- uses: dtolnay/rust-toolchain@master
with:
components: llvm-tools-preview
toolchain: nightly-2022-07-22
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: actions-rs/cargo@v1
with:
command: llvm-cov
args: --workspace --lcov --output-path lcov.info
- run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- uses: codecov/codecov-action@v3
with:
files: lcov.info
Expand Down