Skip to content

Commit ed1e9b7

Browse files
committed
Manually run in a VM in the m68k CI
1 parent 3021598 commit ed1e9b7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/m68k.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,12 @@ jobs:
108108
run: |
109109
./y.sh build --target-triple m68k-unknown-linux-gnu
110110
111+
vm_dir=$(pwd)/vm
111112
cd tests/hello-world
112113
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo build --target m68k-unknown-linux-gnu
113-
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo run --target m68k-unknown-linux-gnu > hello_world_stdout
114-
test $(cat hello_world_stdout) == "Hello, world!" || exit 1
114+
sudo cp target/m68k-unknown-linux-gnu/debug/hello_world $vm_dir/home/
115+
sudo chroot $vm_dir qemu-m68k-static /home/hello_world > hello_world_stdout
116+
test $(cat hello_world_stdout) == "Hello, world!" || (echo "Output differs. Actual output: $(cat hello_world_stdout)"; exit 1)
115117
116118
# Summary job for the merge queue.
117119
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

build_system/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ impl ConfigInfo {
374374
if self.target_triple.is_empty() {
375375
return Err("Unknown non-native platform".to_string());
376376
}
377+
// TODO: check if this is still needed.
377378
linker = Some(format!("-Clinker={}-gcc", self.target_triple));
378379
self.run_in_vm = true;
379380
}

0 commit comments

Comments
 (0)