Files
iroh/.github/workflows/netsim.yml
T
Asmir Avdicevic 89ed3bfdaf ci(secruity): hardening + lock files + dependabot cooldown (#4480)
## Description

Same pricinple as https://github.com/n0-computer/noq/pull/788

Uses --locked to ensure we only use deps from the lock file
Adds cooldown period to dependabot
pins actions versions
introduces zizimor and pinact

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] This PR was created by a human that thought critically about the
      proposed change and wrote an as clear and concise description as
      they could.
- [ ] This PR isn't slop, and is carefully crafted to do have the
      intented effect.
2026-08-21 10:24:02 +00:00

87 lines
2.4 KiB
YAML

name: netsim-CI
on:
push:
branches:
- main
workflow_dispatch:
inputs:
pr_number:
required: true
type: string
branch:
required: true
type: string
netsim_branch:
required: true
type: string
default: "main"
report_table:
required: false
type: boolean
default: false
rust_log:
description: "Custom RUST_LOG value (e.g. 'iroh=debug,noq=trace'). If empty, defaults to warn."
required: false
type: string
default: ""
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -Dwarnings
MSRV: "1.66"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
IROH_FORCE_STAGING_RELAYS: "1"
# Default to read-only; jobs that need more grant it explicitly.
permissions:
contents: read
jobs:
netsim-release:
permissions:
contents: read
pull-requests: write # netsim_runner posts the report comment
if: ${{github.ref_name=='main' && github.event_name == 'push'}}
uses: './.github/workflows/netsim_runner.yaml'
secrets:
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_REPORT_BUCKET: ${{ secrets.S3_REPORT_BUCKET }}
METRO_TOKEN: ${{ secrets.METRO_TOKEN }}
METRO_ENDPOINT: ${{ secrets.METRO_ENDPOINT }}
with:
branch: "main"
max_workers: 1
netsim_branch: "main"
sim_paths: "sims/iroh,sims/integration"
pr_number: ""
publish_metrics: true
build_profile: "optimized-release"
netsim-perf:
permissions:
contents: read
pull-requests: write # netsim_runner posts the report comment
if: ${{github.event_name != 'push'}}
uses: './.github/workflows/netsim_runner.yaml'
secrets:
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_REPORT_BUCKET: ${{ secrets.S3_REPORT_BUCKET }}
METRO_TOKEN: ${{ secrets.METRO_TOKEN }}
METRO_ENDPOINT: ${{ secrets.METRO_ENDPOINT }}
with:
branch: ${{inputs.branch}}
max_workers: 1
netsim_branch: ${{inputs.netsim_branch}}
sim_paths: "sims/iroh"
pr_number: ${{inputs.pr_number}}
publish_metrics: false
build_profile: "optimized-release"
report_table: ${{inputs.report_table}}
rust_log: ${{inputs.rust_log}}