Skip to content

Commit

Permalink
Merge branch 'main' into pull_150_rb
Browse files Browse the repository at this point in the history
  • Loading branch information
belveryin authored Oct 2, 2023
2 parents 4d5154d + 61381ea commit 4bb2170
Show file tree
Hide file tree
Showing 65 changed files with 2,024 additions and 1,691 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on: [push, pull_request]

env:
RUSTFLAGS: -Dwarnings

jobs:
build:
name: Test on rust ${{matrix.rust}} (keys ${{ matrix.key_feature_set }})
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.60.0, stable, nightly]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- uses: Swatinem/rust-cache@v2
- run: cargo build --all --locked

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
- run: cargo clippy --all

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check

audit:
name: Check dependencies for security issues
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install --locked --version "~0.17" cargo-audit
- run: cargo audit --ignore RUSTSEC-2020-0159 --ignore RUSTSEC-2020-0071

3 changes: 2 additions & 1 deletion .github/workflows/event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
build:
if: ${{ github.repository == "aws/aws-nitro-enclaves-cli" }}
runs-on: ubuntu-latest
steps:
- name: if_pr
Expand All @@ -23,4 +24,4 @@ jobs:
echo "EVENT_URL=${{ github.event.issue.html_url }}" >> $GITHUB_ENV
- name: notify
run: |
curl -d '{ "type": "${{ env.EVENT_TYPE }}", "url": "${{ env.EVENT_URL }}" }' ${{ secrets.EVENT_WEBHOOK_URL }}
curl -d '{ "type": "${{ env.EVENT_TYPE }}", "url": "${{ env.EVENT_URL }}" }' ${{ secrets.EVENT_WEBHOOK_URL }}
54 changes: 54 additions & 0 deletions .github/workflows/license_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Update THIRD_PARTY_LICENSES_RUST_CRATES.html
on:
schedule:
# Run the job every midnight.
- cron: '0 0 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
update_license:
name: Update THIRD_PARTY_LICENSES_RUST_CRATES.html
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
# Clone the repository and check if THIRD_PARTY_LICENSES_RUST_CRATES.html
# is up-to-date.
- uses: actions/[email protected]
with:
persist-credentials: false
- run: cargo install --locked --version "~0.5" cargo-about
- run: cargo about generate --workspace --output-file THIRD_PARTY_LICENSES_RUST_CRATES.html about.hbs
- id: checkgitdiff # Early exit if there is no diff.
run: |
git diff --exit-code --quiet
[ $? -eq 0 ] && {
echo "THIRD_PARTY_LICENSES_RUST_CRATES.html is up-to-date."
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
}
continue-on-error: true
# Delete existing rust-crates-license-update branch.
- uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{github.token}}
branches: rust-crates-license-update
# Create a new PR.
- uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# https://github.com/actions/checkout/pull/1184
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: rust-crates-license-update
title: 'doc: update THIRD_PARTY_LICENSES_RUST_CRATES.html'
body: >
THIRD_PARTY_LICENSES_RUST_CRATES.html needs an update. This is an automatically generated PR by
a GitHub Action.
commit-message: 'doc: update THIRD_PARTY_LICENSES_RUST_CRATES.html'


3 changes: 2 additions & 1 deletion .github/workflows/summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build:
if: ${{ github.repository == "aws/aws-nitro-enclaves-cli" }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -33,4 +34,4 @@ jobs:
- name: notify
run: |
# Send open PRs and issues lists from corresponding environment variables to a dedicated webhook URL
curl -d '{ "repo": "${{ env.REPOSITORY_NAME }}", "prs": "${{ env.PRS_CONTENT }}", "issues": "${{ env.ISSUES_CONTENT }}" }' ${{ secrets.SUMMARY_WEBHOOK_URL }}
curl -d '{ "repo": "${{ env.REPOSITORY_NAME }}", "prs": "${{ env.PRS_CONTENT }}", "issues": "${{ env.ISSUES_CONTENT }}" }' ${{ secrets.SUMMARY_WEBHOOK_URL }}
Loading

0 comments on commit 4bb2170

Please sign in to comment.