mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
update actions to run on ubuntu-18.04 (#7160)
This commit is contained in:
parent
15fd1e8d30
commit
0071dfdc5c
3 changed files with 16 additions and 6 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -17,13 +17,13 @@ jobs:
|
||||||
kind: test_release
|
kind: test_release
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
kind: test_release
|
kind: test_release
|
||||||
- os: ubuntu-16.04
|
- os: ubuntu-18.04
|
||||||
kind: test_release
|
kind: test_release
|
||||||
- os: ubuntu-16.04
|
- os: ubuntu-18.04
|
||||||
kind: test_debug
|
kind: test_debug
|
||||||
- os: ubuntu-16.04
|
- os: ubuntu-18.04
|
||||||
kind: bench
|
kind: bench
|
||||||
- os: ubuntu-16.04
|
- os: ubuntu-18.04
|
||||||
kind: lint
|
kind: lint
|
||||||
|
|
||||||
# Always run master branch builds to completion. This allows the cache to
|
# Always run master branch builds to completion. This allows the cache to
|
||||||
|
|
|
@ -34,7 +34,17 @@ pub(crate) fn cat(deno_exe: &PathBuf, megs: usize) -> Result<Value> {
|
||||||
pub(crate) fn tcp(deno_exe: &PathBuf, megs: usize) -> Result<Value> {
|
pub(crate) fn tcp(deno_exe: &PathBuf, megs: usize) -> Result<Value> {
|
||||||
let size = megs * MB;
|
let size = megs * MB;
|
||||||
|
|
||||||
let shell_cmd = format!("head -c {} /dev/zero | nc {}", size, CLIENT_ADDR);
|
// The GNU flavor of `nc` requires the `-N` flag to shutdown the network socket after EOF on stdin
|
||||||
|
let nc_command = if cfg!(target_os = "linux") {
|
||||||
|
"nc -N"
|
||||||
|
} else {
|
||||||
|
"nc"
|
||||||
|
};
|
||||||
|
|
||||||
|
let shell_cmd = format!(
|
||||||
|
"head -c {} /dev/zero | {} {}",
|
||||||
|
size, nc_command, CLIENT_ADDR
|
||||||
|
);
|
||||||
println!("{}", shell_cmd);
|
println!("{}", shell_cmd);
|
||||||
let cmd = &["sh", "-c", &shell_cmd];
|
let cmd = &["sh", "-c", &shell_cmd];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ const listener = Deno.listen({ hostname, port: Number(port) });
|
||||||
console.log("listening on", addr);
|
console.log("listening on", addr);
|
||||||
listener.accept().then(
|
listener.accept().then(
|
||||||
async (conn): Promise<void> => {
|
async (conn): Promise<void> => {
|
||||||
await Deno.copy(conn, conn);
|
console.log("recieved bytes:", await Deno.copy(conn, conn));
|
||||||
conn.close();
|
conn.close();
|
||||||
listener.close();
|
listener.close();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue