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

Bump nightly CI runs to 10-01-2023 #222

Merged
merged 1 commit into from
Apr 5, 2024
Merged
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
126 changes: 2 additions & 124 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ name: ci
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
# This works around `dtolnay/rust-toolchain@master` it defaults to "sparse"
nick-mobilecoin marked this conversation as resolved.
Show resolved Hide resolved
# when 1.68 is used, but the current nightly version (nightly-2023-01-04) is
# before the official support that doesn't use `-Z sparse`
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "git"

jobs:
# TODO: Fix automatically
Expand All @@ -35,92 +31,6 @@ jobs:
# FIXME: Add yamllint problem matcher
- run: yamllint -s .

crev:
nick-mobilecoin marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-22.04
needs:
- lint
# TODO: once we have enough reviews, make this a required check
continue-on-error: true
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
continue-on-error: false
with:
path: |
Cargo.lock
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-
- uses: taiki-e/install-action@v2
with:
# Pinning to 0.23 due to
# https://github.com/crev-dev/cargo-crev/issues/598
tool: [email protected]
- name: Configure Crev
run: |
cargo crev trust \
--level high \
--no-commit https://github.com/mobilecoinfoundation/crev-proofs
- name: Run Cargo Crev
id: cargo-crev
run: |
set +e
export MARKER=$RANDOM
echo "UNREVIEWED_DEPENDENCIES<<EOF${MARKER}" >> $GITHUB_OUTPUT
# GH does not like colors in crev output
export TERM=xterm-mono
# - Get a TSV-formatted table of dependencies without reviews
# - Skip any "local" dependencies
# - Convert the table to GHF markdown
# - Sort descending by the "LoC" value (first column preceeds first
# pipe)

cargo generate-lockfile --offline
cargo crev crate verify \
--for-id vMr-9g5KzKQLsCpkp1tc8o7AR6a0OptjOICjf7NMyHE \
--show-all \
--skip-indirect \
--skip-verified \
--skip-known-owners \
--trust medium \
--thoroughness medium \
--understanding medium \
--redundancy 2 | \
grep -v '^local ' | \
awk '{
printf("| %s | %s | %s | %s | %s | %s | %s |\n",
$14, $15, $2, $10, $11, $12, $13)
}' | \
sort -t\| -n -k5 | \
tee /dev/stderr >> $GITHUB_OUTPUT
STATUS=$?
echo "EOF${MARKER}" >> $GITHUB_OUTPUT

set -e

# TODO: When we're ready to make this required
# exit $STATUS
exit 0
shell: bash
- uses: mshick/add-pr-comment@v2
with:
# yamllint disable rule:line-length
message: |
#### :x: Unreviewed dependencies found

| Crate | Version | Reviews (N/2) | LoC | Left-Pad Index | Geiger | Flags |
| ----- | ------- | ------------- | --- | -------------- | ------ | ----- |
${{ steps.cargo-crev.outputs.UNREVIEWED_DEPENDENCIES }}
# yamllint enable rule:line-length

deny:
runs-on: ubuntu-22.04
needs:
Expand Down Expand Up @@ -187,7 +97,7 @@ jobs:
rust:
- stable
- beta
- nightly-2023-01-04
- nightly-2023-10-01
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -207,7 +117,7 @@ jobs:
rust:
- stable
- beta
- nightly-2023-01-04
- nightly-2023-10-01
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -259,35 +169,3 @@ jobs:
- uses: codecov/codecov-action@v4
with:
files: lcov.info

notify:
runs-on: ubuntu-latest
if: github.event_name == 'push' && failure()
needs:
- lint
- deny
- sort
- clippy
- build
- test
- doc
- coverage
steps:
- name: Notify Discord on failure
nick-mobilecoin marked this conversation as resolved.
Show resolved Hide resolved
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
username: "Github Actions"
status: Failure
color: 0xff0000
nodetail: true
# yamllint disable rule:line-length
title: "${{ github.repository }} ${{ github.workflow }} has failed on ${{ github.event_name }} to ${{ github.ref_name }}"
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
description: >
[`@${{ github.actor }}`](${{ github.server_url }}/${{ github.actor }})
was the last one to touch
[that repository](${{ github.server_url }}/${{ github.repository }}),
is all I'm saying.
avatar_url: "https://media0.giphy.com/media/oe33xf3B50fsc/200.gif"
# yamllint enable rule:line-length
Loading