NixOS-based container for running GitHub actions
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

more debugging

+116 -70
+4
.github/workflows/build2.yaml
··· 37 37 ls -la $GITHUB_WORKSPACE 38 38 cat /tmp/entrypoint-env.txt || true 39 39 40 + - name: Memory Test 41 + run: | 42 + $MEMORYTEST 43 + 40 44 - name: Reuse Lint 41 45 run: | 42 46 nix run .#reuse-lint
+99 -68
build.zig
··· 91 91 options.addOption([]const u8, "bash", bash); 92 92 options.addOption([]const u8, "sh", sh); 93 93 94 - const execas_exe = b.addExecutable(.{ 95 - .name = b.fmt("execas-{d}", .{uid}), 96 - .root_module = b.createModule(.{ 97 - .root_source_file = b.path("src/execas.zig"), 98 - .target = target, 99 - .optimize = optimize, 100 - }), 101 - .use_llvm = false, 102 - .use_lld = false, 103 - }); 104 - execas_exe.root_module.addOptions("options", options); 105 - b.installArtifact(execas_exe); 94 + { 95 + const execas_exe = b.addExecutable(.{ 96 + .name = b.fmt("execas-{d}", .{uid}), 97 + .root_module = b.createModule(.{ 98 + .root_source_file = b.path("src/execas.zig"), 99 + .target = target, 100 + .optimize = optimize, 101 + }), 102 + .use_llvm = false, 103 + .use_lld = false, 104 + }); 105 + execas_exe.root_module.addOptions("options", options); 106 + b.installArtifact(execas_exe); 106 107 107 - const execas_tests = b.addTest(.{ 108 - .root_module = execas_exe.root_module, 109 - }); 110 - const run_execas_tests = b.addRunArtifact(execas_tests); 111 - test_step.dependOn(&run_execas_tests.step); 108 + const execas_tests = b.addTest(.{ 109 + .root_module = execas_exe.root_module, 110 + }); 111 + const run_execas_tests = b.addRunArtifact(execas_tests); 112 + test_step.dependOn(&run_execas_tests.step); 113 + } 112 114 113 - const tail_exe = b.addExecutable(.{ 114 - .name = "tail", 115 - .root_module = b.createModule(.{ 116 - .root_source_file = b.path("src/tail.zig"), 117 - .target = target, 118 - .optimize = optimize, 119 - }), 120 - .use_llvm = false, 121 - .use_lld = false, 122 - }); 123 - tail_exe.root_module.addOptions("options", options); 115 + { 116 + const tail_exe = b.addExecutable(.{ 117 + .name = "tail", 118 + .root_module = b.createModule(.{ 119 + .root_source_file = b.path("src/tail.zig"), 120 + .target = target, 121 + .optimize = optimize, 122 + }), 123 + .use_llvm = false, 124 + .use_lld = false, 125 + }); 126 + tail_exe.root_module.addOptions("options", options); 127 + 128 + b.installArtifact(tail_exe); 124 129 125 - b.installArtifact(tail_exe); 130 + const tail_tests = b.addTest(.{ 131 + .root_module = tail_exe.root_module, 132 + }); 133 + 134 + const run_tail_tests = b.addRunArtifact(tail_tests); 135 + test_step.dependOn(&run_tail_tests.step); 136 + } 137 + 138 + { 139 + const bash_exe = b.addExecutable(.{ 140 + .name = "bash", 141 + .root_module = b.createModule(.{ 142 + .root_source_file = b.path("src/bash.zig"), 143 + .target = target, 144 + .optimize = optimize, 145 + }), 146 + .use_llvm = false, 147 + .use_lld = false, 148 + }); 149 + bash_exe.root_module.addOptions("options", options); 150 + 151 + b.installArtifact(bash_exe); 126 152 127 - const tail_tests = b.addTest(.{ 128 - .root_module = tail_exe.root_module, 129 - }); 153 + const bash_tests = b.addTest(.{ 154 + .root_module = bash_exe.root_module, 155 + }); 130 156 131 - const run_tail_tests = b.addRunArtifact(tail_tests); 132 - test_step.dependOn(&run_tail_tests.step); 157 + const run_bash_tests = b.addRunArtifact(bash_tests); 158 + test_step.dependOn(&run_bash_tests.step); 159 + } 133 160 134 - const bash_exe = b.addExecutable(.{ 135 - .name = "bash", 136 - .root_module = b.createModule(.{ 137 - .root_source_file = b.path("src/bash.zig"), 138 - .target = target, 139 - .optimize = optimize, 140 - }), 141 - .use_llvm = false, 142 - .use_lld = false, 143 - }); 144 - bash_exe.root_module.addOptions("options", options); 161 + { 162 + const sh_exe = b.addExecutable(.{ 163 + .name = "sh", 164 + .root_module = b.createModule(.{ 165 + .root_source_file = b.path("src/sh.zig"), 166 + .target = target, 167 + .optimize = optimize, 168 + }), 169 + .use_llvm = false, 170 + .use_lld = false, 171 + }); 172 + sh_exe.root_module.addOptions("options", options); 145 173 146 - b.installArtifact(bash_exe); 174 + b.installArtifact(sh_exe); 147 175 148 - const bash_tests = b.addTest(.{ 149 - .root_module = bash_exe.root_module, 150 - }); 176 + const sh_tests = b.addTest(.{ 177 + .root_module = sh_exe.root_module, 178 + }); 151 179 152 - const run_bash_tests = b.addRunArtifact(bash_tests); 153 - test_step.dependOn(&run_bash_tests.step); 180 + const run_sh_tests = b.addRunArtifact(sh_tests); 181 + test_step.dependOn(&run_sh_tests.step); 182 + } 154 183 155 - const sh_exe = b.addExecutable(.{ 156 - .name = "sh", 157 - .root_module = b.createModule(.{ 158 - .root_source_file = b.path("src/sh.zig"), 159 - .target = target, 160 - .optimize = optimize, 161 - }), 162 - .use_llvm = false, 163 - .use_lld = false, 164 - }); 165 - sh_exe.root_module.addOptions("options", options); 184 + { 185 + const memorytest_exe = b.addExecutable(.{ 186 + .name = "memorytest", 187 + .root_module = b.createModule(.{ 188 + .root_source_file = b.path("src/memorytest.zig"), 189 + .target = target, 190 + .optimize = optimize, 191 + }), 192 + .use_llvm = false, 193 + .use_lld = false, 194 + }); 195 + memorytest_exe.root_module.addOptions("options", options); 166 196 167 - b.installArtifact(sh_exe); 197 + b.installArtifact(memorytest_exe); 168 198 169 - const sh_tests = b.addTest(.{ 170 - .root_module = sh_exe.root_module, 171 - }); 199 + const memorytest_tests = b.addTest(.{ 200 + .root_module = memorytest_exe.root_module, 201 + }); 172 202 173 - const run_sh_tests = b.addRunArtifact(sh_tests); 174 - test_step.dependOn(&run_sh_tests.step); 203 + const run_memorytest_tests = b.addRunArtifact(memorytest_tests); 204 + test_step.dependOn(&run_memorytest_tests.step); 205 + } 175 206 }
+1 -2
flake.nix
··· 517 517 { 518 518 Cmd = [ "${lib.getExe' execas-github "bash"}" ]; 519 519 User = "0:0"; 520 - # WorkingDir = "/github/home"; 521 - # Entrypoint = [ "${lib.getExe entrypoint}" ]; 522 520 Env = [ 523 521 "USER=root" 524 522 "PATH=${ ··· 545 543 "GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" 546 544 "NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" 547 545 "NIX_PATH=/nix/var/nix/profiles/per-user/root/channels:/root/home/.nix-defexpr/channels" 546 + "MEMORYTEST=${lib.getExe' execas-github "memorytest"}" 548 547 ]; 549 548 }; 550 549 };
+12
src/memorytest.zig
··· 1 + // SPDX-FileCopyrightText: © 2023 Jeffrey C. Ollie 2 + // SPDX-License-Identifier: MIT 3 + 4 + const std = @import("std"); 5 + 6 + pub fn main(init: std.process.Init) !void { 7 + const alloc: std.mem.Allocator = init.arena.allocator(); 8 + while (true) { 9 + _ = try alloc.alloc(u8, 1024 * 1024); 10 + std.debug.print("Capacity: {Bi}\n", .{init.arena.queryCapacity()}); 11 + } 12 + }