Skip to content

Commit c448ace

Browse files
CohenArthurdkm
authored andcommitted
ci: Install Rust directly from rustup instead of apt
ChangeLog: * .github/workflows/ccpp.yml: Install Rust manually.
1 parent 9c09c84 commit c448ace

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/ccpp.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ jobs:
3737
build-essential \
3838
gcc-multilib \
3939
g++-multilib \
40-
dejagnu
40+
dejagnu;
41+
# install Rust directly using rustup
42+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
4143
4244
- name: Configure
4345
run: |
@@ -52,6 +54,8 @@ jobs:
5254
shell: bash
5355
run: |
5456
cd gccrs-build; \
57+
# Add cargo to our path quickly
58+
. "$HOME/.cargo/env";
5559
make -Otarget -j $(nproc) 2>&1 | tee log
5660
5761
- name: Check for new warnings
@@ -114,7 +118,9 @@ jobs:
114118
build-essential \
115119
gcc-multilib \
116120
g++-multilib \
117-
dejagnu
121+
dejagnu;
122+
# install Rust directly using rustup
123+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
118124
119125
- name: Configure
120126
run: |
@@ -129,6 +135,8 @@ jobs:
129135
shell: bash
130136
run: |
131137
cd gccrs-build; \
138+
# Add cargo to our path quickly
139+
. "$HOME/.cargo/env";
132140
make -Otarget -j $(nproc) 2>&1 | tee log
133141
134142
- name: Check for new warnings
@@ -178,6 +186,7 @@ jobs:
178186
run: |
179187
apt-get update;
180188
apt-get install -y \
189+
curl \
181190
automake \
182191
autoconf \
183192
libtool \
@@ -192,8 +201,9 @@ jobs:
192201
g++-4.8 \
193202
gcc-4.8-multilib \
194203
g++-4.8-multilib \
195-
dejagnu \
196-
cargo
204+
dejagnu;
205+
# install Rust directly using rustup
206+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
197207
198208
- name: Configure
199209
run: |
@@ -209,6 +219,8 @@ jobs:
209219
- name: Build
210220
shell: bash
211221
run: |
222+
# Add cargo to our path quickly
223+
. "$HOME/.cargo/env";
212224
make -C gccrs-build -j $(nproc)
213225
214226
- name: Run Tests
@@ -248,7 +260,9 @@ jobs:
248260

249261
- name: Install Deps
250262
run: |
251-
brew install dejagnu mpfr libmpc gmp
263+
brew install dejagnu mpfr libmpc gmp;
264+
# install Rust directly using rustup
265+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
252266
253267
- name: Configure
254268
run: |

0 commit comments

Comments
 (0)