Skip to content

Commit ab49c9a

Browse files
authored
fix: install rust toolchain via rustup (#82)
CentOS Stream 9 has removed rust 1.84 from its toolchain and our image builds are failing to install the package. Because we are not building upstream in an airtight environment, we can work around this by installing rustup and installing the 1.84 toolchain with it.
1 parent 5a35620 commit ab49c9a

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
sudo apt-get install -y \
4040
libbpf-dev \
4141
protobuf-compiler
42+
43+
rustup component add clippy
44+
4245
- shell: python
4346
id: args
4447
run: |
@@ -69,7 +72,10 @@ jobs:
6972
CLANG_FMT: clang-format-18
7073
steps:
7174
- uses: actions/checkout@v4
72-
- run: make format-check
75+
- name: Check code format
76+
run: |
77+
rustup component add rustfmt
78+
make format-check
7379
7480
vars:
7581
runs-on: ubuntu-24.04

Containerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ RUN dnf install --enablerepo=crb -y \
44
clang-19.1.7 \
55
libbpf-devel \
66
protobuf-compiler \
7-
protobuf-devel \
8-
cargo-1.84.1 \
9-
rust-1.84.1
7+
protobuf-devel && \
8+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
9+
sh -s -- -y --default-toolchain 1.84 --profile minimal
10+
11+
ENV PATH=/root/.cargo/bin:${PATH}
1012

1113
WORKDIR /app
1214

rust-toolchain.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[toolchain]
22
channel = "1.84"
3-
components = ["rustfmt", "rust-analyzer", "clippy"]

0 commit comments

Comments
 (0)