Skip to content

Commit e459819

Browse files
committed
Generate VM instead of downloading it because we need a bigger one
1 parent 11fa3bf commit e459819

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/nightly_rustc.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
2323
- host_target: "m68k-unknown-linux-gnu"
2424
cross_target: "m68k"
25+
debian_url: "http://ftp.ports.debian.org/debian-ports"
2526
gcc_urls: >
2627
https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
2728
@@ -52,7 +53,7 @@ jobs:
5253
if: ${{ matrix.arch.cross_target != '' }}
5354
run: |
5455
sudo apt-get update
55-
sudo apt-get install qemu-system qemu-user-static
56+
sudo apt-get install debootstrap qemu-system qemu-user-static
5657
5758
# `rustup show` installs from rust-toolchain.toml
5859
- name: Setup rust toolchain
@@ -69,9 +70,15 @@ jobs:
6970
sudo dpkg --force-overwrite -i package.deb
7071
done
7172
72-
- name: Download VM artifact
73+
- name: Generate Debian qemu image
7374
if: ${{ matrix.arch.cross_target != '' }}
74-
run: curl -LO https://github.com/cross-cg-gcc-tools/vms/releases/latest/download/debian-${{ matrix.arch.cross_target }}.img
75+
run: |
76+
dd if=/dev/zero of=debian.img bs=1M count=15360
77+
mkfs.ext4 debian.img -L root
78+
mkdir vm
79+
sudo mount debian.img vm
80+
sudo debootstrap --no-check-gpg --arch=${{ matrix.arch.cross_target }} --foreign unstable vm ${{ matrix.arch.debian_url }}
81+
sudo cp $(which qemu-${{ matrix.arch.cross_target }}-static) vm/usr/bin/
7582
7683
- name: Download cross-compiling libgccjit.so and move it in libgccjit-libs-dir
7784
if: ${{ matrix.arch.cross_target != '' }}
@@ -94,13 +101,6 @@ jobs:
94101
mkdir -p $dir
95102
mv libgccjit-${{ matrix.arch.cross_target }}.so $dir/libgccjit.so
96103
97-
- name: Prepare VM
98-
if: ${{ matrix.arch.cross_target != '' }}
99-
run: |
100-
mkdir vm
101-
sudo mount debian-${{ matrix.arch.cross_target }}.img vm
102-
sudo cp $(which qemu-${{ matrix.arch.cross_target }}-static) vm/usr/bin/
103-
104104
- name: Patch linux-raw-sys and rustix.
105105
if: ${{ matrix.arch.cross_target != '' }}
106106
run: |

0 commit comments

Comments
 (0)