Bridge: add check for missing dynamic libs #509
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bridge CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'bridge/**' | |
- '.github/workflows/bridge-ci.yml' | |
pull_request: | |
paths: | |
- 'bridge/**' | |
- '.github/workflows/bridge-ci.yml' | |
# When pushing to a PR, cancel any jobs still running for the previous head commit of the PR | |
concurrency: | |
# head_ref is only defined for pull requests, run_id is always unique and defined so if this | |
# workflow was not triggered by a pull request, nothing gets cancelled. | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
check-fmt: | |
name: Check formatting | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: rustfmt | |
run: cargo fmt -- --check | |
working-directory: bridge | |
test-versions: | |
name: Webhook Bridge CI | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
rust: [stable, beta] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "bridge -> target" | |
# only save the cache on the main branch | |
# cf https://github.com/Swatinem/rust-cache/issues/95 | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
# include relevant information in the cache name | |
prefix-key: "bridge-${{ matrix.rust }}" | |
- uses: taiki-e/install-action@nextest | |
- name: Clippy | |
run: cargo clippy --locked --all-targets --all-features -- -D warnings | |
working-directory: bridge | |
- name: Install system dependencies | |
# Packages should align with whatever is in the bridge/Dockerfile | |
run: | | |
sudo apt-get install -y \ | |
build-essential=12.* \ | |
checkinstall=1.* \ | |
curl \ | |
libssl-dev=* \ | |
pkg-config=1.8.* \ | |
zlib1g-dev=1:* | |
- name: Start required services | |
run: docker compose -f "bridge/testing-docker-compose.yml" up -d | |
- name: Run tests | |
working-directory: bridge | |
run: ./run-tests.sh | |
- name: Stop required services | |
run: docker compose -f "bridge/testing-docker-compose.yml" down | |
# deny-check: | |
# name: cargo-deny check | |
# runs-on: ubuntu-24.04 | |
# continue-on-error: ${{ matrix.checks == 'advisories' }} | |
# strategy: | |
# matrix: | |
# checks: | |
# - advisories | |
# - bans licenses sources | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: EmbarkStudios/cargo-deny-action@v1 | |
# with: | |
# command: check ${{ matrix.checks }} | |
# arguments: --all-features --manifest-path axum/Cargo.toml |