Skip to content

Remove redundant beta disclaimers #567

Remove redundant beta disclaimers

Remove redundant beta disclaimers #567

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
# Pin the native NAT sources linked by the sys crates.
MINIUPNP_REF: 4e7a10948004ca2085ac8103e14fc77edb898b4c
PCPNATPMP_REF: a6e787f837e507336a8774522c33b54264ef4a4b
jobs:
workflow-lint:
name: GitHub Actions workflow lint
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout emulebb-rust
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pinned Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.27.1"
cache: false
- name: Validate GitHub Actions workflows
run: go run github.com/rhysd/actionlint/cmd/actionlint@914e7df21a07ef503a81201c76d2b11c789d3fca
build-test:
name: build+test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 45
env:
EMULEBB_WORKSPACE_ROOT: ${{ github.workspace }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest, windows-latest]
steps:
- name: Checkout emulebb-rust
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Checkout emulebb-miniupnp (native C source)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: emulebb/emulebb-miniupnp
ref: ${{ env.MINIUPNP_REF }}
path: .ci/emulebb-miniupnp
- name: Checkout emulebb-libpcpnatpmp (native C source)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: emulebb/emulebb-libpcpnatpmp
ref: ${{ env.PCPNATPMP_REF }}
path: .ci/emulebb-libpcpnatpmp
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@ce678459e9fc7500d337468f904b95f1b5c10b5e # 1.98.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
package-manager-cache: false
- name: Install Linux UI build dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libfontconfig1-dev
- name: Cache cargo build
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
env:
CARGO_TARGET_DIR: ${{ runner.temp }}/emulebb-rust-out/builds/rust/target
- name: Rust build/test gate
env:
EMULEBB_WORKSPACE_OUTPUT_ROOT: ${{ runner.temp }}/emulebb-rust-out
CARGO_TARGET_DIR: ${{ runner.temp }}/emulebb-rust-out/builds/rust/target
MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp
PCPNATPMP_ROOT: ${{ github.workspace }}/.ci/emulebb-libpcpnatpmp
run: python tools/rust_quality_gate.py ci-test
- name: Retain tested beta build
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: emulebb-rust-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}
path: |
${{ runner.temp }}/emulebb-rust-out/tools/emulebb-rust/bin/
!${{ runner.temp }}/emulebb-rust-out/tools/emulebb-rust/bin/*.pdb
if-no-files-found: error
retention-days: 14
rest-openapi:
name: live REST/OpenAPI conformance
needs: build-test
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
EMULEBB_WORKSPACE_ROOT: ${{ github.workspace }}
steps:
- name: Checkout emulebb-rust
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: repos/emulebb-rust
- name: Checkout pinned live conformance harness
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: emulebb/emulebb-build-tests
ref: 19b26181b42d5e2d1bfb44b301d8d2930f00ccf0
path: repos/emulebb-build-tests
- name: Checkout pinned Rust OpenAPI contract
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: emulebb/emulebb-tooling
ref: 7ee780e9e7c12421e854d092af2295701257a0da
path: repos/emulebb-tooling
- name: Download tested Linux daemon
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: emulebb-rust-Linux-X64-${{ github.sha }}
path: ${{ runner.temp }}/emulebb-rust-out/tools/emulebb-rust/bin
- name: Restore daemon execute permission
run: chmod +x "${{ runner.temp }}/emulebb-rust-out/tools/emulebb-rust/bin/emulebb-rust"
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Install live conformance dependencies
run: python -m pip install PyYAML==6.0.3 jsonschema==4.26.0
- name: Gate live REST responses against OpenAPI
working-directory: repos/emulebb-build-tests
env:
EMULEBB_WORKSPACE_OUTPUT_ROOT: ${{ runner.temp }}/emulebb-rust-out
CARGO_TARGET_DIR: ${{ runner.temp }}/emulebb-rust-out/builds/rust/target
run: python scripts/rust-rest-openapi-ci.py
- name: Retain live REST/OpenAPI evidence
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: rust-rest-openapi-${{ github.sha }}
path: ${{ runner.temp }}/emulebb-rust-out/reports/rust-rest-openapi-ci/
if-no-files-found: warn
retention-days: 14
quality:
name: policy + format + clippy
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
EMULEBB_WORKSPACE_ROOT: ${{ github.workspace }}
steps:
- name: Checkout emulebb-rust
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# clippy --workspace builds both native NAT sys crates; provide the same
# pinned sources as the build-test job.
- name: Checkout emulebb-miniupnp (native C source)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: emulebb/emulebb-miniupnp
ref: ${{ env.MINIUPNP_REF }}
path: .ci/emulebb-miniupnp
- name: Checkout emulebb-libpcpnatpmp (native C source)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: emulebb/emulebb-libpcpnatpmp
ref: ${{ env.PCPNATPMP_REF }}
path: .ci/emulebb-libpcpnatpmp
- name: Install pinned Rust with rustfmt and Clippy
uses: dtolnay/rust-toolchain@ce678459e9fc7500d337468f904b95f1b5c10b5e # 1.98.1
with:
components: rustfmt, clippy
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
package-manager-cache: false
- name: Install Linux UI build dependencies
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libfontconfig1-dev
- name: Rust quality gate
env:
EMULEBB_WORKSPACE_OUTPUT_ROOT: ${{ runner.temp }}/emulebb-rust-out
CARGO_TARGET_DIR: ${{ runner.temp }}/emulebb-rust-out/builds/rust/target
MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp
PCPNATPMP_ROOT: ${{ github.workspace }}/.ci/emulebb-libpcpnatpmp
run: python tools/rust_quality_gate.py quick
supply-chain:
name: cargo-deny (advisories, licenses, sources)
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout emulebb-rust
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: cargo-deny — advisories, licenses, and sources
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2
with:
command: check advisories licenses sources
required-ci:
name: Required CI
if: ${{ always() }}
needs: [workflow-lint, build-test, rest-openapi, quality, supply-chain]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require every CI job
shell: bash
env:
WORKFLOW_LINT_RESULT: ${{ needs.workflow-lint.result }}
BUILD_TEST_RESULT: ${{ needs.build-test.result }}
REST_OPENAPI_RESULT: ${{ needs.rest-openapi.result }}
QUALITY_RESULT: ${{ needs.quality.result }}
SUPPLY_CHAIN_RESULT: ${{ needs.supply-chain.result }}
run: |
set -euo pipefail
for result in \
"$WORKFLOW_LINT_RESULT" \
"$BUILD_TEST_RESULT" \
"$REST_OPENAPI_RESULT" \
"$QUALITY_RESULT" \
"$SUPPLY_CHAIN_RESULT"; do
test "$result" = success
done