Skip to content

Commit

Permalink
Install necessary dependencies in CI
Browse files Browse the repository at this point in the history
With the introduction of libbpf-rs as a dev-dependency we require
additional system dependencies as part of various CI jobs. Install them.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o committed Oct 18, 2024
1 parent 6271c07 commit 388f207
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest]
runs-on: [ubuntu-latest]
rust: [stable]
profile: [dev, release]
# gsym-in-apk requires `blazesym-dev/generate-unit-test-files`
# feature, which requires `llvm-gsymutil` installed. We don't
# want that dependency in this large OS spanning matrix.
args: ["--workspace --exclude=gsym-in-apk"]
args: ["--workspace --exclude=blazesym-dev --exclude=gsym-in-apk"]
include:
- runs-on: ubuntu-latest
rust: stable
Expand All @@ -49,10 +49,10 @@ jobs:
rust: stable
profile: release
args: "--lib --no-default-features"
- runs-on: windows-latest
- runs-on: macos-latest
rust: stable
profile: dev
args: "--tests --features=blazesym-dev/dont-generate-unit-test-files"
profile: release
args: "--lib --no-default-features"
- runs-on: ubuntu-latest
rust: stable
profile: dev
Expand Down Expand Up @@ -135,10 +135,10 @@ jobs:
env:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- name: Install required tools
run: sudo apt-get install -y llvm-14 libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Install required tools
run: sudo apt-get install -y llvm-14
- name: Check incremental rebuilds
env:
CARGO_OPTS: --workspace --quiet --tests
Expand All @@ -157,15 +157,15 @@ jobs:
env:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- name: Install required tools
run: sudo apt-get install -y llvm-14 libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
id: py312
with:
python-version: '3.12'
- name: Install required tools
run: sudo apt-get install -y llvm-14
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install llvm-tools-preview
Expand Down Expand Up @@ -277,6 +277,8 @@ jobs:
env:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- name: Install development dependencies
run: sudo apt-get install -y libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
Expand All @@ -303,6 +305,8 @@ jobs:
env:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- name: Install development dependencies
run: sudo apt-get install -y libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- name: Install required tools
run: sudo apt-get install -y llvm-14
Expand All @@ -316,6 +320,8 @@ jobs:
# Stack borrows are very experimental. Disable for now.
MIRIFLAGS: '-Zmiri-disable-stacked-borrows'
steps:
- name: Install development dependencies
run: sudo apt-get install -y libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -339,6 +345,8 @@ jobs:
env:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- name: Install development dependencies
run: sudo apt-get install -y libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo run --example backtrace
Expand Down Expand Up @@ -387,6 +395,8 @@ jobs:
name: Lint with clippy
runs-on: ubuntu-latest
steps:
- name: Install development dependencies
run: sudo apt-get install -y libelf-dev zlib1g-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --workspace --no-deps --all-targets --features=blazesym-dev/dont-generate-unit-test-files -- -A unknown_lints -D clippy::todo
Expand All @@ -408,4 +418,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo doc --workspace --no-deps
- run: cargo doc --workspace --exclude=gsym-in-apk --no-deps
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ members = [
"examples/sym-debuginfod",
"examples/gsym-in-apk",
]
# We don't want every Cargo command to operate on all members, unless
# --workspace is specified.
default-members = ["."]

[package]
name = "blazesym"
Expand Down

0 comments on commit 388f207

Please sign in to comment.