add zig
This commit is contained in:
parent
e5a91bb71c
commit
c452d37b42
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /tmp/$2
|
||||
cp code.code main.zig
|
||||
timeout -s KILL 10 zig build-exe main.zig
|
||||
timeout -s KILL 3 xargs -a args.args -d '\n' ./main
|
|
@ -0,0 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
const stdout = std.io.getStdOut().writer();
|
||||
try stdout.print("good\n", .{});
|
||||
}
|
|
@ -124,3 +124,7 @@ echo '---'
|
|||
echo 'typescript'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "tsc --version"
|
||||
echo '---'
|
||||
|
||||
echo 'zig'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "zig version"
|
||||
echo '---'
|
||||
|
|
|
@ -221,5 +221,11 @@
|
|||
"ts",
|
||||
"typescript"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "zig",
|
||||
"aliases": [
|
||||
"zig"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -241,6 +241,17 @@ tar -xf dmd.2.095.0.linux.tar
|
|||
echo 'export PATH=$PATH:/opt/d/dmd2/linux/bin64' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# install zig
|
||||
# final binary: /opt/zig/zig
|
||||
# get version: /opt/zig/zig version
|
||||
cd /opt && mkdir zig && cd zig
|
||||
wget https://ziglang.org/download/0.7.1/zig-linux-x86_64-0.7.1.tar.xz
|
||||
tar -xf zig-linux-x86_64-0.7.1.tar.xz
|
||||
mv zig-linux-x86_64-0.7.1 zig
|
||||
rm zig-linux-x86_64-0.7.1.tar.xz
|
||||
echo 'export PATH=$PATH:/opt/zig/zig' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
useradd -M runner$i
|
||||
|
|
Loading…
Reference in New Issue