Compare commits
No commits in common. "5cb9c3d202b08ea75e3765eab574921c7e9d3e4a" and "c6abd47ef0d6cc958237068ecc4bba155b1000c7" have entirely different histories.
5cb9c3d202
...
c6abd47ef0
@ -1,5 +1,2 @@
|
||||
[alias]
|
||||
xtask = "run --package xtask --"
|
||||
|
||||
[build]
|
||||
rustflags = "-Ctarget-cpu=core-avx2"
|
||||
|
@ -1,11 +1,12 @@
|
||||
FROM rust:1.81-bookworm as build
|
||||
FROM rust:1.80-alpine3.20 as build
|
||||
|
||||
COPY battlesnake/ /usr/app
|
||||
WORKDIR /usr/app
|
||||
|
||||
RUN apk add --no-cache musl-dev=1.2.5-r0
|
||||
RUN cargo install --path .
|
||||
|
||||
FROM debian:bookworm
|
||||
FROM alpine:3.20
|
||||
COPY --from=build /usr/local/cargo/bin/battlesnake /bin/battlesnake
|
||||
|
||||
CMD ["battlesnake"]
|
||||
|
@ -1,2 +0,0 @@
|
||||
[build]
|
||||
rustflags = "-Ctarget-cpu=core-avx2"
|
@ -159,13 +159,13 @@ fn regression() -> Result<(), DynError> {
|
||||
let (won, games) = res?;
|
||||
println!(
|
||||
"\nThe local snake has won {won}/{games} games ({}%)",
|
||||
(won + games / 200) * 100 / games
|
||||
won * 100 / games
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn try_regression() -> Result<(usize, usize), DynError> {
|
||||
const GAMES: usize = 1000;
|
||||
const GAMES: usize = 100;
|
||||
// limit the parallelism
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(std::thread::available_parallelism()?.get() / 3)
|
||||
@ -184,8 +184,6 @@ fn try_regression() -> Result<(usize, usize), DynError> {
|
||||
"11",
|
||||
"-H",
|
||||
"11",
|
||||
"--timeout",
|
||||
"50",
|
||||
"--name",
|
||||
"local",
|
||||
"--url",
|
||||
@ -248,10 +246,6 @@ fn run_production(port: u16) -> Result<Child, DynError> {
|
||||
let mut snake = Command::new("docker")
|
||||
.args([
|
||||
"run",
|
||||
"--name",
|
||||
"battlesnake-regression",
|
||||
"--init",
|
||||
"--replace",
|
||||
"--env",
|
||||
"RUST_LOG=error",
|
||||
"--env",
|
||||
|
Loading…
Reference in New Issue
Block a user