From 86ac4a43a7279224c9e090b23fd3d4aa61e73c38 Mon Sep 17 00:00:00 2001 From: Sam Tebbs Date: Wed, 5 May 2021 21:30:08 +0100 Subject: [PATCH 1/3] Use install_path everywhere --- build.zig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index 3684b6b..4dabab3 100644 --- a/build.zig +++ b/build.zig @@ -59,7 +59,7 @@ pub fn build(b: *Builder) !void { const disable_display = b.option(bool, "disable-display", "Disable the qemu window") orelse false; const exec = b.addExecutable("pluto.elf", main_src); - exec.setOutputDir(b.cache_root); + exec.setOutputDir(b.install_path); exec.addBuildOption(TestMode, "test_mode", test_mode); exec.setBuildMode(build_mode); exec.setLinkerScriptPath(linker_script_path); @@ -84,14 +84,16 @@ pub fn build(b: *Builder) !void { } else if (test_mode == .Scheduler) { // Add some test files for the user mode runtime tests const user_program = b.addAssemble("user_program", "test/user_program.s"); - user_program.setOutputDir(b.cache_root); + user_program.setOutputDir(b.install_path); user_program.setTarget(target); user_program.setBuildMode(build_mode); user_program.strip = true; - const copy_user_program = b.addSystemCommand(&[_][]const u8{ "objcopy", "-O", "binary", "zig-cache/user_program.o", "zig-cache/user_program" }); + const user_program_path = try std.mem.join(b.allocator, "/", &[_][]const u8{ b.install_path, "user_program" }); + const user_program_obj_path = try std.mem.join(b.allocator, "/", &[_][]const u8{ b.install_path, "user_program.o" }); + const copy_user_program = b.addSystemCommand(&[_][]const u8{ "objcopy", "-O", "binary", user_program_obj_path, user_program_path }); copy_user_program.step.dependOn(&user_program.step); - try ramdisk_files_al.append("zig-cache/user_program"); + try ramdisk_files_al.append(user_program_path); exec.step.dependOn(©_user_program.step); } From 389588c285da1c4873a8c3fc0d6c1608866ff956 Mon Sep 17 00:00:00 2001 From: Sam Tebbs Date: Wed, 5 May 2021 21:32:30 +0100 Subject: [PATCH 2/3] Try going back to the latest ubuntu version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e03f712..a04ee58 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: test: name: Build mode ${{ matrix.build_mode }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: matrix: build_mode: ["", -Drelease-fast, -Drelease-safe, -Drelease-small] From 3fd98aca82f8e097a491b4d047956cebe65b8738 Mon Sep 17 00:00:00 2001 From: Sam Tebbs Date: Wed, 5 May 2021 21:35:19 +0100 Subject: [PATCH 3/3] OK maybe we can't go back to ubuntu-latest --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a04ee58..e03f712 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: test: name: Build mode ${{ matrix.build_mode }} - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 strategy: matrix: build_mode: ["", -Drelease-fast, -Drelease-safe, -Drelease-small]