From 5e3271d7af85e42fd6d44f446c4bfc2653784e14 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Fri, 22 Nov 2024 03:47:07 -0500 Subject: [PATCH 1/4] chore(rust_rareicon_gameserver): updating the cargo.toml for the build. --- apps/rust_rareicon_gameserver/Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/rust_rareicon_gameserver/Cargo.toml b/apps/rust_rareicon_gameserver/Cargo.toml index 89634b7a7..9cc37502b 100644 --- a/apps/rust_rareicon_gameserver/Cargo.toml +++ b/apps/rust_rareicon_gameserver/Cargo.toml @@ -2,10 +2,14 @@ name = "rust_rareicon_gameserver" version = "0.1.0" edition = "2021" +publish = false [dependencies] tokio = { version = "1.41.1", features = ["full"] } axum = "0.7" tower = { version = "0.5", features = ["full"] } -tower-http = "0.5" \ No newline at end of file +tower-http = { version = "0.5.1", features = ["cors"] } +serde = { version = "1", features = ["derive"] } +serde_json = "1.0" +prost = "0.13" \ No newline at end of file From 574f726cb2e711217c01fc89f9de0b2518ca0c56 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Fri, 22 Nov 2024 04:49:24 -0500 Subject: [PATCH 2/4] feat(rust_rareicon_gameserver): added based docker build. --- apps/rust_rareicon_gameserver/Cargo.toml | 8 ++- apps/rust_rareicon_gameserver/Dockerfile | 56 +++++++++++++++ apps/rust_rareicon_gameserver/project.json | 49 ++++++++++++- apps/rust_rareicon_gameserver/src/main.rs | 81 +++++++++++++++++++++- 4 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 apps/rust_rareicon_gameserver/Dockerfile diff --git a/apps/rust_rareicon_gameserver/Cargo.toml b/apps/rust_rareicon_gameserver/Cargo.toml index 9cc37502b..b926dd706 100644 --- a/apps/rust_rareicon_gameserver/Cargo.toml +++ b/apps/rust_rareicon_gameserver/Cargo.toml @@ -7,9 +7,13 @@ publish = false [dependencies] tokio = { version = "1.41.1", features = ["full"] } -axum = "0.7" +axum = { version = "0.7", features = ["ws"] } +futures = "0.3" +futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } tower = { version = "0.5", features = ["full"] } tower-http = { version = "0.5.1", features = ["cors"] } serde = { version = "1", features = ["derive"] } serde_json = "1.0" -prost = "0.13" \ No newline at end of file +prost = "0.13" +tracing = "0.1" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } \ No newline at end of file diff --git a/apps/rust_rareicon_gameserver/Dockerfile b/apps/rust_rareicon_gameserver/Dockerfile new file mode 100644 index 000000000..9432706b4 --- /dev/null +++ b/apps/rust_rareicon_gameserver/Dockerfile @@ -0,0 +1,56 @@ +# [STAGE A] - Base Image +FROM rust:1.82 AS base +RUN cargo install cargo-chef --version ^0.1 +WORKDIR /app + +# [STAGE B] - Planner +FROM base AS planner +COPY . . +RUN cargo chef prepare --recipe-path recipe.json + +# [STAGE C] - Builder +FROM base AS builder +COPY --from=planner /app/recipe.json recipe.json +RUN cargo chef cook --release --recipe-path recipe.json +COPY . . +RUN cargo build --release + +# [STAGE D] - Chisel +# Rust Profile Chisel by h0lybyte and special thanks to Fernando Silva for Chisel Go core. +FROM ubuntu:24.04 AS os_builder + +RUN apt-get update && apt-get update && apt-get install -y wget + +WORKDIR /tmp + +RUN wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz + +RUN tar -xvf go1.21.1.linux-amd64.tar.gz +RUN mv go /usr/local +RUN GOBIN=/usr/local/bin/ /usr/local/go/bin/go install github.com/canonical/chisel/cmd/chisel@latest +WORKDIR /rootfs +RUN chisel cut --release ubuntu-24.04 --root /rootfs \ + base-files_base \ + base-files_release-info \ + ca-certificates_data \ + libgcc-s1_libs \ + libc6_libs \ + openssl_config + +# [STAGE E] - Jemalloc +FROM ubuntu:24.04 AS jemalloc +RUN apt-get update \ + && apt-get install -y --no-install-recommends libjemalloc-dev \ + && apt-get autoremove -y \ + && apt-get purge -y --auto-remove \ + && rm -rf /var/lib/apt/lists/* + +# [STAGE Z] - Release +FROM scratch +COPY --from=os_builder /rootfs / +COPY --from=builder /app/target/release/rust_rareicon_gameserver ./rust_rareicon_gameserver +#COPY --from=jemalloc /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 + +#ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 +#ENV MALLOC_CONF="background_thread:true,dirty_decay_ms:1000,muzzy_decay_ms:1000,lg_tcache_max:16,narenas:4,oversize_threshold:8388608" +ENTRYPOINT ["./rust_rareicon_gameserver"] \ No newline at end of file diff --git a/apps/rust_rareicon_gameserver/project.json b/apps/rust_rareicon_gameserver/project.json index 786cf5cbc..39b7f39f8 100644 --- a/apps/rust_rareicon_gameserver/project.json +++ b/apps/rust_rareicon_gameserver/project.json @@ -54,7 +54,54 @@ "release": true } } - } + }, + "container": { + "executor": "@nx-tools/nx-container:build", + "defaultConfiguration": "local", + "options": { + "engine": "docker", + "context": "apps/rust_rareicon_gameserver", + "file": "apps/rust_rareicon_gameserver/Dockerfile", + "metadata": { + "images": ["kbve/rareicongs"], + "load": true, + "tags": ["1.03", "1.03.0"] + }, + "configurations": { + "local": { + "tags": ["1.03", "1.03.0"], + "push": false + }, + "production": { + "tags": ["1.03", "1.03.0"], + "push": true, + "customBuildOptions": "--push", + "cache-from": [ + "type=registry,ref=kbve/rareicongs:buildcache" + ], + "cache-to": [ + "type=registry,ref=kbve/rareicongs:buildcache,mode=max" + ] + } + } + } + }, + "orb": { + "executor": "nx:run-commands", + "options": { + "commands": [ + { + "command": "pnpm nx container rust_rareicon_gameserver", + "forwardAllArgs": false + }, + { + "command": "docker run -p 3000:3000 -p 3001:3001 -p 8086:8086 kbve/rareicongs:1.03", + "forwardAllArgs": false + } + ], + "parallel": false + } + } }, "tags": [] } diff --git a/apps/rust_rareicon_gameserver/src/main.rs b/apps/rust_rareicon_gameserver/src/main.rs index 24e4cf865..bde9a95de 100644 --- a/apps/rust_rareicon_gameserver/src/main.rs +++ b/apps/rust_rareicon_gameserver/src/main.rs @@ -1,4 +1,81 @@ -fn main() { - println!("Hello, world!"); +use axum::{ + extract::ws::{Message, WebSocket, WebSocketUpgrade}, + http::StatusCode, + response::IntoResponse, + routing::get, + Router, +}; +use futures::{sink::SinkExt, stream::StreamExt}; +use std::net::SocketAddr; +use tokio::net::UdpSocket; +use tower_http::services::ServeDir; + + +#[tokio::main] +async fn main() { + // Serve static files from the "build" directory + let static_files = Router::new().nest_service("/", ServeDir::new("build")); + + // WebSocket route + let websocket_route = Router::new().route("/ws", get(websocket_handler)); + + // Combine static files and WebSocket routes + let app = static_files.merge(websocket_route); + + // Start the UDP server + tokio::spawn(run_udp_server()); + + // Run the HTTP and WebSocket server + let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); + println!("Server running at http://{}", addr); + axum::Server::bind(&addr) + .serve(app.into_make_service()) + .await + .unwrap(); +} + +// WebSocket handler +async fn websocket_handler(ws: WebSocketUpgrade) -> impl IntoResponse { + ws.on_upgrade(handle_websocket) } +// Handle WebSocket connections +async fn handle_websocket(mut socket: WebSocket) { + println!("WebSocket connection established"); + + while let Some(Ok(msg)) = socket.next().await { + if let Message::Text(text) = msg { + println!("Received: {}", text); + + // Echo the message back + if socket.send(Message::Text(format!("Echo: {}", text))).await.is_err() { + println!("WebSocket connection closed"); + break; + } + } + } +} + +// UDP server +async fn run_udp_server() { + let socket = UdpSocket::bind("127.0.0.1:8081").await.unwrap(); + println!("UDP server running on 127.0.0.1:8081"); + + let mut buf = [0; 1024]; + + loop { + match socket.recv_from(&mut buf).await { + Ok((size, addr)) => { + println!("Received {} bytes from {}", size, addr); + + // Echo the data back + if let Err(e) = socket.send_to(&buf[..size], addr).await { + println!("Failed to send response: {}", e); + } + } + Err(e) => { + println!("UDP error: {}", e); + } + } + } +} \ No newline at end of file From f75da51be730c1e3cb3f87f03b67eb753e31fba7 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:42:12 -0500 Subject: [PATCH 3/4] fix(rust_rareicon_gameserver): adjusting the dockerifle to build strictly x86. --- Cargo.lock | 444 ++++++++++++++++++++-- apps/rust_rareicon_gameserver/Cargo.toml | 14 +- apps/rust_rareicon_gameserver/Dockerfile | 16 +- apps/rust_rareicon_gameserver/src/main.rs | 69 ++-- migrations/kube/charts/rareicon/.gitkeep | 0 5 files changed, 454 insertions(+), 89 deletions(-) create mode 100644 migrations/kube/charts/rareicon/.gitkeep diff --git a/Cargo.lock b/Cargo.lock index 1712ca506..3ef79db02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -380,7 +380,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -415,7 +415,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -497,6 +497,33 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "aws-lc-rs" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe7c2840b66236045acd2607d5866e274380afd87ef99d6226e961e2cb47df45" +dependencies = [ + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad3a619a9de81e1d7de1f1186dcba4506ed661a0e483d84410fdef0ee87b2f96" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] + [[package]] name = "axum" version = "0.6.20" @@ -504,7 +531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.3.4", "bitflags 1.3.2", "bytes", "futures-util", @@ -524,9 +551,46 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 0.1.2", "tokio", - "tower", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core 0.4.5", + "base64 0.22.1", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.0", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "sync_wrapper 1.0.1", + "tokio", + "tokio-tungstenite", + "tower 0.5.1", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -546,14 +610,35 @@ dependencies = [ "tower-service", ] +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.1", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "axum-extra" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a93e433be9382c737320af3924f7d5fc6f89c155cf2bf88949d8f5126fab283f" dependencies = [ - "axum", - "axum-core", + "axum 0.6.20", + "axum-core 0.3.4", "bytes", "cookie", "futures-util", @@ -563,7 +648,30 @@ dependencies = [ "pin-project-lite", "serde", "tokio", - "tower", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-extra" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c794b30c904f0a1c2fb7740f7df7f7972dfaa14ef6f57cb6178dc63e5dca2f04" +dependencies = [ + "axum 0.7.9", + "axum-core 0.4.5", + "bytes", + "fastrand 2.1.1", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "multer", + "pin-project-lite", + "serde", + "tower 0.5.1", "tower-layer", "tower-service", ] @@ -625,12 +733,15 @@ dependencies = [ "itertools", "lazy_static", "lazycell", + "log", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.79", + "syn 2.0.87", + "which", ] [[package]] @@ -788,7 +899,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -977,7 +1088,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -995,6 +1106,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "cmake" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +dependencies = [ + "cc", +] + [[package]] name = "cocoa" version = "0.25.0" @@ -1233,7 +1353,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1244,7 +1364,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1261,6 +1381,12 @@ dependencies = [ "serde", ] +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + [[package]] name = "deranged" version = "0.3.11" @@ -1308,7 +1434,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1317,7 +1443,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1426,9 +1552,15 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ecolor" version = "0.25.0" @@ -1563,6 +1695,15 @@ dependencies = [ "serde", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "enum-map" version = "2.7.3" @@ -1580,7 +1721,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1601,7 +1742,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1612,7 +1753,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1827,7 +1968,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1845,6 +1986,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -1861,6 +2008,21 @@ dependencies = [ "new_debug_unreachable", ] +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -1877,6 +2039,17 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + [[package]] name = "futures-io" version = "0.3.31" @@ -1919,7 +2092,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1940,6 +2113,7 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -2131,6 +2305,16 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "byteorder", + "num-traits", +] + [[package]] name = "heapless" version = "0.7.17" @@ -2284,6 +2468,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +[[package]] +name = "http-range-header" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a397c49fec283e3d6211adbe480be95aae5f304cfb923e9970e08956d5168a" + [[package]] name = "httparse" version = "1.9.5" @@ -2337,6 +2527,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -2628,8 +2819,8 @@ dependencies = [ "anyhow", "argon2", "async-trait", - "axum", - "axum-extra", + "axum 0.6.20", + "axum-extra 0.7.7", "chrono", "dashmap", "diesel", @@ -2647,8 +2838,8 @@ dependencies = [ "thiserror", "time", "tokio", - "tower", - "tower-http", + "tower 0.4.13", + "tower-http 0.4.4", "tracing", "tracing-subscriber", "ulid", @@ -2860,6 +3051,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2897,6 +3098,29 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 1.1.0", + "httparse", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + [[package]] name = "mysqlclient-sys" version = "0.4.1" @@ -3044,7 +3268,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3547,7 +3771,7 @@ checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3687,6 +3911,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.87", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -3735,6 +3969,29 @@ dependencies = [ "unarray", ] +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "qoi" version = "0.4.1" @@ -4087,7 +4344,7 @@ dependencies = [ name = "rust_api_profile" version = "0.1.1" dependencies = [ - "axum", + "axum 0.6.20", "diesel", "jedi 0.1.14", "kbve", @@ -4096,8 +4353,8 @@ dependencies = [ "serde_json", "tikv-jemallocator", "tokio", - "tower", - "tower-http", + "tower 0.4.13", + "tower-http 0.4.4", "tracing", "tracing-subscriber", ] @@ -4106,7 +4363,19 @@ dependencies = [ name = "rust_rareicon_gameserver" version = "0.1.0" dependencies = [ + "axum 0.7.9", + "axum-extra 0.9.6", + "futures", + "futures-util", + "prost", + "serde", + "serde_json", "tokio", + "tokio-rustls", + "tower 0.5.1", + "tower-http 0.6.2", + "tracing", + "tracing-subscriber", ] [[package]] @@ -4192,6 +4461,7 @@ version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring 0.17.8", @@ -4235,6 +4505,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", @@ -4389,7 +4660,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4422,7 +4693,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4731,9 +5002,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -4826,7 +5097,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4942,7 +5213,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4982,6 +5253,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + [[package]] name = "tokio-util" version = "0.7.12" @@ -5056,6 +5339,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "hdrhistogram", + "indexmap", + "pin-project-lite", + "slab", + "sync_wrapper 0.1.2", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-http" version = "0.4.4" @@ -5068,12 +5371,37 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "http-range-header", + "http-range-header 0.3.1", "pin-project-lite", "tower-layer", "tower-service", ] +[[package]] +name = "tower-http" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" +dependencies = [ + "bitflags 2.6.0", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "http-range-header 0.4.1", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -5106,7 +5434,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -5160,6 +5488,24 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand", + "sha1", + "thiserror", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" @@ -5206,6 +5552,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e" +[[package]] +name = "unicase" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" + [[package]] name = "unicode-bidi" version = "0.3.17" @@ -5379,7 +5731,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -5413,7 +5765,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5620,6 +5972,18 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.37", +] + [[package]] name = "whoami" version = "1.5.2" @@ -6180,7 +6544,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] diff --git a/apps/rust_rareicon_gameserver/Cargo.toml b/apps/rust_rareicon_gameserver/Cargo.toml index b926dd706..76ae5cf3e 100644 --- a/apps/rust_rareicon_gameserver/Cargo.toml +++ b/apps/rust_rareicon_gameserver/Cargo.toml @@ -7,13 +7,23 @@ publish = false [dependencies] tokio = { version = "1.41.1", features = ["full"] } +tokio-rustls = "0.26.0" axum = { version = "0.7", features = ["ws"] } +axum-extra = "0.9.6" futures = "0.3" futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } tower = { version = "0.5", features = ["full"] } -tower-http = { version = "0.5.1", features = ["cors"] } +tower-http = { version = "0.6.1", features = ["cors", "fs", "trace"] } serde = { version = "1", features = ["derive"] } serde_json = "1.0" prost = "0.13" tracing = "0.1" -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } \ No newline at end of file +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } + + +[profile.release] +opt-level = 3 +lto = true +strip = true +codegen-units = 1 +panic = 'abort' \ No newline at end of file diff --git a/apps/rust_rareicon_gameserver/Dockerfile b/apps/rust_rareicon_gameserver/Dockerfile index 9432706b4..65be0757a 100644 --- a/apps/rust_rareicon_gameserver/Dockerfile +++ b/apps/rust_rareicon_gameserver/Dockerfile @@ -1,15 +1,16 @@ # [STAGE A] - Base Image -FROM rust:1.82 AS base -RUN cargo install cargo-chef --version ^0.1 +FROM --platform=linux/amd64 rust:1.82 AS base +RUN rustup target add x86_64-unknown-linux-gnu \ + && cargo install cargo-chef --version ^0.1 WORKDIR /app # [STAGE B] - Planner -FROM base AS planner +FROM --platform=linux/amd64 base AS planner COPY . . RUN cargo chef prepare --recipe-path recipe.json # [STAGE C] - Builder -FROM base AS builder +FROM --platform=linux/amd64 base AS builder COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json COPY . . @@ -17,7 +18,7 @@ RUN cargo build --release # [STAGE D] - Chisel # Rust Profile Chisel by h0lybyte and special thanks to Fernando Silva for Chisel Go core. -FROM ubuntu:24.04 AS os_builder +FROM --platform=linux/amd64 ubuntu:24.04 AS os_builder RUN apt-get update && apt-get update && apt-get install -y wget @@ -38,7 +39,7 @@ RUN chisel cut --release ubuntu-24.04 --root /rootfs \ openssl_config # [STAGE E] - Jemalloc -FROM ubuntu:24.04 AS jemalloc +FROM --platform=linux/amd64 ubuntu:24.04 AS jemalloc RUN apt-get update \ && apt-get install -y --no-install-recommends libjemalloc-dev \ && apt-get autoremove -y \ @@ -46,11 +47,12 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # [STAGE Z] - Release -FROM scratch +FROM --platform=linux/amd64 scratch COPY --from=os_builder /rootfs / COPY --from=builder /app/target/release/rust_rareicon_gameserver ./rust_rareicon_gameserver #COPY --from=jemalloc /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 #ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 #ENV MALLOC_CONF="background_thread:true,dirty_decay_ms:1000,muzzy_decay_ms:1000,lg_tcache_max:16,narenas:4,oversize_threshold:8388608" +EXPOSE 3000 8081 ENTRYPOINT ["./rust_rareicon_gameserver"] \ No newline at end of file diff --git a/apps/rust_rareicon_gameserver/src/main.rs b/apps/rust_rareicon_gameserver/src/main.rs index bde9a95de..be0fdbf98 100644 --- a/apps/rust_rareicon_gameserver/src/main.rs +++ b/apps/rust_rareicon_gameserver/src/main.rs @@ -1,35 +1,31 @@ use axum::{ extract::ws::{Message, WebSocket, WebSocketUpgrade}, - http::StatusCode, response::IntoResponse, - routing::get, + routing::any, Router, }; + +// use axum_extra::TypedHeader; + use futures::{sink::SinkExt, stream::StreamExt}; -use std::net::SocketAddr; -use tokio::net::UdpSocket; +use std::{net::SocketAddr, path::PathBuf}; +use tokio::net::{ UdpSocket, TcpListener}; use tower_http::services::ServeDir; #[tokio::main] async fn main() { - // Serve static files from the "build" directory - let static_files = Router::new().nest_service("/", ServeDir::new("build")); - - // WebSocket route - let websocket_route = Router::new().route("/ws", get(websocket_handler)); - // Combine static files and WebSocket routes - let app = static_files.merge(websocket_route); + let app = Router::new() + .fallback_service(ServeDir::new("build").append_index_html_on_directories(true)) + .route("/ws", any(websocket_handler)); + + let listener = TcpListener::bind("0.0.0.0:3000").await.unwrap(); + println!("Server running on http://0.0.0.0:3000"); - // Start the UDP server tokio::spawn(run_udp_server()); - // Run the HTTP and WebSocket server - let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); - println!("Server running at http://{}", addr); - axum::Server::bind(&addr) - .serve(app.into_make_service()) + axum::serve(listener, app.into_make_service()) .await .unwrap(); } @@ -41,41 +37,34 @@ async fn websocket_handler(ws: WebSocketUpgrade) -> impl IntoResponse { // Handle WebSocket connections async fn handle_websocket(mut socket: WebSocket) { - println!("WebSocket connection established"); - while let Some(Ok(msg)) = socket.next().await { - if let Message::Text(text) = msg { - println!("Received: {}", text); - - // Echo the message back - if socket.send(Message::Text(format!("Echo: {}", text))).await.is_err() { - println!("WebSocket connection closed"); - break; + match msg { + Message::Text(text) => { + println!("Received text: {}", text); + socket.send(Message::Text(format!("Echo: {}", text))).await.unwrap(); } + Message::Binary(data) => { + println!("Received binary data: {:?}", data); + socket.send(Message::Binary(data)).await.unwrap(); + } + _ => {} } } } // UDP server async fn run_udp_server() { - let socket = UdpSocket::bind("127.0.0.1:8081").await.unwrap(); - println!("UDP server running on 127.0.0.1:8081"); + let socket = tokio::net::UdpSocket::bind("0.0.0.0:8081").await.unwrap(); + println!("UDP server running on 0.0.0.0:8081"); let mut buf = [0; 1024]; - loop { - match socket.recv_from(&mut buf).await { - Ok((size, addr)) => { - println!("Received {} bytes from {}", size, addr); + if let Ok((size, addr)) = socket.recv_from(&mut buf).await { + let data = &buf[..size]; + println!("Received UDP data from {}: {:?}", addr, data); - // Echo the data back - if let Err(e) = socket.send_to(&buf[..size], addr).await { - println!("Failed to send response: {}", e); - } - } - Err(e) => { - println!("UDP error: {}", e); - } + // Echo response + socket.send_to(data, addr).await.unwrap(); } } } \ No newline at end of file diff --git a/migrations/kube/charts/rareicon/.gitkeep b/migrations/kube/charts/rareicon/.gitkeep new file mode 100644 index 000000000..e69de29bb From 13ceb49f7d1937463f94fce7ff4401d192efa162 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:58:02 -0500 Subject: [PATCH 4/4] ci(alpha): added docker image build for rareicongs. --- .github/workflows/ci-alpha.yml | 1022 +++++++++++++++++--------------- 1 file changed, 540 insertions(+), 482 deletions(-) diff --git a/.github/workflows/ci-alpha.yml b/.github/workflows/ci-alpha.yml index 861f8857b..bbe3106b2 100644 --- a/.github/workflows/ci-alpha.yml +++ b/.github/workflows/ci-alpha.yml @@ -1,487 +1,545 @@ name: CI - Alpha on: - push: - branches: - - 'alpha*' + push: + branches: + - 'alpha*' jobs: - - globals: - runs-on: ubuntu-latest - name: Global Variables - outputs: - sha256head: ${{ steps.hash.outputs.sha256head }} - - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Calculate SHA-256 Hash - id: hash - run: | - echo "::set-output name=sha256head::$(echo -n ${{ github.sha }} | sha256sum | awk '{print $1}')" - setup: - name: 'Setup' - runs-on: ubuntu-latest - outputs: - build_unity: ${{ steps.set_output.outputs.build_unity }} - steps: - - id: set_output - shell: bash - run: | - echo "build_unity=true" >> $GITHUB_OUTPUT - - handle: - name: 'Alpha to Beta' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Auto-Pull - id: open-pr - uses: diillson/auto-pull-request@v1.0.1 - with: - destination_branch: 'beta' - pr_title: 'Preparing Beta Branch' - pr_body: | - *An automated PR for Beta* - This PR is for the beta branch - pr_label: 'auto-pr' - - - name: output-url - run: echo ${{steps.open-pr.outputs.pr_url}} - - name: output-number - run: echo ${{steps.open-pr.outputs.pr_number}} - - name: output-created - run: echo ${{steps.open-pr.outputs.pr_created}} - - name: output-has-changed-files - run: echo ${{steps.open-pr.outputs.has_changed_files}} - - alter: - name: 'Alpha Deployment Checks' - runs-on: ubuntu-latest - if: github.repository == 'kbve/kbve' - outputs: - herbmail: ${{ steps.delta.outputs.herbmail_any_changed }} - kbve: ${{ steps.delta.outputs.kbve_any_changed }} - rareicon: ${{ steps.delta.outputs.rareicon_all_changed_files }} - discordsh: ${{ steps.delta.outputs.discordsh_all_changed_files }} - atlas: ${{ steps.delta.outputs.atlas_any_changed }} - rustapiprofile: ${{ steps.delta.outputs.rustapiprofile_any_changed }} - expolcagents: ${{ steps.delta.outputs.expolcagents_any_changed }} - kilonet: ${{ steps.delta.outputs.kilonet_any_changed }} - - steps: - - name: Checkout the repository using git - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: File Changes - id: delta - uses: tj-actions/changed-files@v39 - with: - files_yaml: | - herbmail: - - 'apps/herbmail.com/**' - kbve: - - 'apps/kbve.com/**' - rareicon: - - 'apps/rareicon.com/**' - discordsh: - - 'apps/discord.sh/**' - atlas: - - 'apps/atlas/kbve_atlas/**' - rustapiprofile: - - 'apps/rust_api_profile/**' - expolcagents: - - 'apps/expo-lcagents/**' - kilonet: - - 'packages/kilonet/README.md' - - expo-lcagents-web-build: - needs: ['alter', 'globals'] - name: Expo LC Agents Web Build - runs-on: ubuntu-latest - if: needs.alter.outputs.expolcagents == 'true' - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup NodeJS - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Setup PNPM - uses: pnpm/action-setup@v3 - with: - version: 9 - run_install: false - - - name: Install react-native-cli globally - run: pnpm add -g react-native-cli - - - name: Install dependencies - run: pnpm install - - - name: Setup Watchman (if applicable) - run: | - sudo apt-get update - sudo apt-get install -y watchman - watchman --version - - - name: NX Command - shell: bash - continue-on-error: true - run: | - pnpm nx run expo-lcagents:export --verbose - - - name: NX Command - 2 - shell: bash - continue-on-error: true - run: | - pnpm nx run expo-lcagents:export --verbose - - - name: LCA Expo Build - uses: ./.github/actions/kbve-shell - with: - flag: '-nx expo-lcagents:export' - create_pull_request: false - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Create .nojekyll file - run: | - mkdir -p dist/apps/expo-lcagents/ - touch dist/apps/expo-lcagents/.nojekyll - - - name: Create CNAME file - run: | - mkdir -p dist/apps/expo-lcagents/ - echo "lc-agents.com" > dist/apps/expo-lcagents/CNAME - - - name: LC Agents -> Deployment - uses: dobbelina/copy_file_to_another_repo_action@main - env: - API_TOKEN_GITHUB: ${{ secrets.UNITY_PAT }} - with: - source_file: 'dist/apps/expo-lcagents/' - destination_repo: 'KBVE/lc-agents.com' - destination_folder: '/docs' - destination_branch: 'main' - destination_branch_create: 'patch-kbve-lcagents-deploy-${{ needs.globals.outputs.sha256head }}' - user_email: 'h0lybyte@users.noreply.github.com' - user_name: 'h0lybyte' - commit_message: ${{ github.event.head_commit.message }} - rsync_option: '-avrh --delete' - - kilonet-rareicon-build: - needs: ['alter', 'globals'] - name: Kilonet RareIcon - runs-on: ubuntu-latest - if: needs.alter.outputs.kilonet == 'true' - strategy: - fail-fast: false - matrix: - projectPath: - - azure-rareicon - unityVersion: - - 6000.0.25f1 - targetPlatform: - - StandaloneWindows64 - - WebGL - steps: - # - name: Checkout this repository - # uses: actions/checkout@v4 - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - - - name: Pull RareIcon Kilonet Repo - env: - AZURE_PAT: ${{ secrets.AZURE_NOV2025_TOKEN_SECRET }} - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git clone https://kbve:${AZURE_PAT}@dev.azure.com/kbve/rareicon/_git/rareicon azure-rareicon - - - name: Unity Cache - uses: actions/cache@v4 - with: - path: ${{ matrix.projectPath }}/Library - key: - Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} - restore-keys: | - Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}- - Library-${{ matrix.projectPath }}- - Library- - - - name: Unity Builder - uses: game-ci/unity-builder@v4 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - with: - projectPath: ${{ matrix.projectPath }} - unityVersion: ${{ matrix.unityVersion }} - targetPlatform: ${{ matrix.targetPlatform }} - - - name: Unity Upload - uses: actions/upload-artifact@v4 - with: - name: Build-${{ matrix.targetPlatform }} - path: build/${{ matrix.targetPlatform }} - - kilonet-rareicon-itch-deployment: - needs: ['kilonet-rareicon-build'] - name: Kilonet Rareicon Itch Deployment - runs-on: ubuntu-latest - steps: - - name: Download WebGL Build - uses: actions/download-artifact@v4 - id: download - with: - name: Build-WebGL - path: build/WebGL - - - name: Itch Deploy - uses: KikimoraGames/itch-publish@v0.0.3 - with: - butlerApiKey: ${{ secrets.ITCH_API }} - gameData: ${{steps.download.outputs.download-path}} - itchUsername: kbve - itchGameId: rareicon - buildChannel: webgl - - - # Alpha Builds - - # buildSaber: - # needs: [alter, setup] - # name: 'Saber Alpha Build' - # runs-on: ubuntu-latest - # if: needs.alter.outputs.saber == 'true' && needs.setup.outputs.build_unity == 'true' - # strategy: - # fail-fast: false - # matrix: - # projectPath: - # - apps/saber - # unityVersion: - # - 2022.3.12f1 - # targetPlatform: - # - StandaloneWindows64 - # # - WebGL * Disabled WebGL for DoTs - # steps: - # - uses: actions/checkout@v4 - # with: - # token: ${{ secrets.UNITY_PAT }} - # - uses: actions/cache@v4 - # with: - # path: ${{ matrix.projectPath }}/Library - # key: - # Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{ - # hashFiles(matrix.projectPath) }} - # restore-keys: | - # Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}- - # Library-${{ matrix.projectPath }}- - # Library- - - # - uses: game-ci/unity-builder@v4 - # env: - # UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - # UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - # UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - # with: - # projectPath: ${{ matrix.projectPath }} - # unityVersion: ${{ matrix.unityVersion }} - # targetPlatform: ${{ matrix.targetPlatform }} - - # # WebGL * Disalbed WebGL for DoTs - # # - # #- uses: actions/upload-artifact@v4 - # # with: - # # name: build-WebGL - # # path: build/WebGL - - # - uses: actions/upload-artifact@v4 - # with: - # name: build-StandaloneWindows64 - # path: build/StandaloneWindows64 - - # deploy: - # needs: alter - # name: 'Process Alpha Branch' - # runs-on: ubuntu-latest - # steps: - # - name: Checkout the repository using git - # uses: actions/checkout@v4 - - # - name: Setup Node v20 - # uses: actions/setup-node@v4 - # with: - # node-version: 20 - - # - name: Setup pnpm - # uses: pnpm/action-setup@v3 - # with: - # version: 9 - # run_install: false - - # # @[CACHE]-> [PNPM] -> [START] - - # - name: Get pnpm Store - # shell: bash - # run: | - # echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - # - name: Setup pnpm Cache - # uses: actions/cache@v4 - # with: - # path: ${{ env.STORE_PATH }} - # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - # restore-keys: | - # ${{ runner.os }}-pnpm-store- - - # # @[CACHE] -> [PNPM] -> [END] - - # - name: Install pnpm dependencies - # run: pnpm install - - # # @[REPORT] -> [START] - - # - name: Generate NX Report - # shell: bash - # run: | - # pnpm nx report - - # # @[REPORT] -> [END] - - # # [SABER] -> [UNITY] -> [START] - # - name: Saber Deployment - # if: needs.alter.outputs.saber == 'true' - # shell: bash - # run: | - # echo "Deploying Saber..." - # # [SABER] -> [UNITY] -> [END] - # # - name: Itch Fish Chip Build - # # if: needs.alter.outputs.itchfishchip == 'true' - # # shell: bash - # # run: | - # # pnpm nx build next-itch-fishchip - - # # - name: Itch Fish Chip Upload Deployment - # # if: needs.alter.outputs.itchfishchip == 'true' - # # uses: actions/upload-artifact@v4 - # # with: - # # name: build-WebGL - # # path: apps/next-itch-fishchip/dist - - # # [React] Fish & Chip - - # # [React] Phaser TravelBox - - # # - name: Itch TravelBox Build - # # if: needs.alter.outputs.reacttravelbox == 'true' - # # shell: bash - # # run: | - # # pnpm nx build react-phaser-travelbox - - # # - name: Itch Fish Chip Upload Deployment - # # if: needs.alter.outputs.reacttravelbox == 'true' - # # uses: actions/upload-artifact@v4 - # # with: - # # name: build-WebGL - # # path: apps/kbve.com/public/embed/js/travelbox - - # # [Build Test] - # - name: Build KBVE.com - # if: needs.alter.outputs.kbve == 'true' - # shell: bash - # run: | - # pnpm nx build kbve.com - - # itchdev: - # needs: ['alter', 'buildSaber', 'setup'] - # name: Itch Dev Saber Deployment - # runs-on: ubuntu-latest - # if: needs.alter.outputs.saber == 'true' && needs.setup.outputs.build_unity == 'true' - # steps: - # - name: Checkout repository - # uses: actions/checkout@v4 - - # - name: Download Windows Build - # uses: actions/download-artifact@v4 - # id: download - # with: - # name: build-StandaloneWindows64 - # path: build/StandaloneWindows64 - - # #- name: Download WebGL Build - # # uses: actions/download-artifact@v4 - # # id: download - # # with: - # # name: build-WebGL - # # path: build/WebGL - - # - name: Itch Deploy - # uses: KikimoraGames/itch-publish@v0.0.3 - # with: - # butlerApiKey: ${{ secrets.ITCH_API }} - # gameData: ${{steps.download.outputs.download-path}} - # itchUsername: kbve - # itchGameId: dev-saber - # #buildChannel: webgl - # buildChannel: windows - - # itchfishchipdeploy: - # needs: ['alter', 'deploy'] - # name: Itch Fish Chip Deployment - # runs-on: ubuntu-latest - # if: needs.alter.outputs.itchfishchip == 'true' - # steps: - # - name: Checkout repository - # uses: actions/checkout@v4 - - # - name: Download WebGL Build - # uses: actions/download-artifact@v4 - # id: download - # with: - # name: build-WebGL - # path: apps/next-itch-fishchip/dist - - # - name: Itch Deploy - # uses: KikimoraGames/itch-publish@v0.0.3 - # with: - # butlerApiKey: ${{ secrets.ITCH_API }} - # gameData: ${{steps.download.outputs.download-path}} - # itchUsername: kbve - # itchGameId: fishchip - # buildChannel: webgl - - # itchtravelbox: - # needs: ['alter', 'deploy'] - # name: Itch TravelBox Deployment - # runs-on: ubuntu-latest - # if: needs.alter.outputs.reacttravelbox == 'true' - # steps: - # - name: Checkout repository - # uses: actions/checkout@v4 - - # - name: Download WebGL Build - # uses: actions/download-artifact@v4 - # id: download - # with: - # name: build-WebGL - # path: apps/kbve.com/public/embed/js/phaser - - # - name: Itch Deploy - # uses: KikimoraGames/itch-publish@v0.0.3 - # with: - # butlerApiKey: ${{ secrets.ITCH_API }} - # gameData: ${{steps.download.outputs.download-path}} - # itchUsername: kbve - # itchGameId: travelbox - # buildChannel: webgl + globals: + runs-on: ubuntu-latest + name: Global Variables + outputs: + sha256head: ${{ steps.hash.outputs.sha256head }} + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Calculate SHA-256 Hash + id: hash + run: | + echo "::set-output name=sha256head::$(echo -n ${{ github.sha }} | sha256sum | awk '{print $1}')" + setup: + name: 'Setup' + runs-on: ubuntu-latest + outputs: + build_unity: ${{ steps.set_output.outputs.build_unity }} + steps: + - id: set_output + shell: bash + run: | + echo "build_unity=true" >> $GITHUB_OUTPUT + + handle: + name: 'Alpha to Beta' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Auto-Pull + id: open-pr + uses: diillson/auto-pull-request@v1.0.1 + with: + destination_branch: 'beta' + pr_title: 'Preparing Beta Branch' + pr_body: | + *An automated PR for Beta* + This PR is for the beta branch + pr_label: 'auto-pr' + + - name: output-url + run: echo ${{steps.open-pr.outputs.pr_url}} + - name: output-number + run: echo ${{steps.open-pr.outputs.pr_number}} + - name: output-created + run: echo ${{steps.open-pr.outputs.pr_created}} + - name: output-has-changed-files + run: echo ${{steps.open-pr.outputs.has_changed_files}} + + alter: + name: 'Alpha Deployment Checks' + runs-on: ubuntu-latest + if: github.repository == 'kbve/kbve' + outputs: + herbmail: ${{ steps.delta.outputs.herbmail_any_changed }} + kbve: ${{ steps.delta.outputs.kbve_any_changed }} + rareicon: ${{ steps.delta.outputs.rareicon_all_changed_files }} + discordsh: ${{ steps.delta.outputs.discordsh_all_changed_files }} + atlas: ${{ steps.delta.outputs.atlas_any_changed }} + rustapiprofile: ${{ steps.delta.outputs.rustapiprofile_any_changed }} + expolcagents: ${{ steps.delta.outputs.expolcagents_any_changed }} + kilonet: ${{ steps.delta.outputs.kilonet_any_changed }} + + steps: + - name: Checkout the repository using git + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: File Changes + id: delta + uses: tj-actions/changed-files@v39 + with: + files_yaml: | + herbmail: + - 'apps/herbmail.com/**' + kbve: + - 'apps/kbve.com/**' + rareicon: + - 'apps/rareicon.com/**' + discordsh: + - 'apps/discord.sh/**' + atlas: + - 'apps/atlas/kbve_atlas/**' + rustapiprofile: + - 'apps/rust_api_profile/**' + expolcagents: + - 'apps/expo-lcagents/**' + kilonet: + - 'packages/kilonet/README.md' + + expo-lcagents-web-build: + needs: ['alter', 'globals'] + name: Expo LC Agents Web Build + runs-on: ubuntu-latest + if: needs.alter.outputs.expolcagents == 'true' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Setup PNPM + uses: pnpm/action-setup@v3 + with: + version: 9 + run_install: false + + - name: Install react-native-cli globally + run: pnpm add -g react-native-cli + + - name: Install dependencies + run: pnpm install + + - name: Setup Watchman (if applicable) + run: | + sudo apt-get update + sudo apt-get install -y watchman + watchman --version + + - name: NX Command + shell: bash + continue-on-error: true + run: | + pnpm nx run expo-lcagents:export --verbose + + - name: NX Command - 2 + shell: bash + continue-on-error: true + run: | + pnpm nx run expo-lcagents:export --verbose + + - name: LCA Expo Build + uses: ./.github/actions/kbve-shell + with: + flag: '-nx expo-lcagents:export' + create_pull_request: false + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Create .nojekyll file + run: | + mkdir -p dist/apps/expo-lcagents/ + touch dist/apps/expo-lcagents/.nojekyll + + - name: Create CNAME file + run: | + mkdir -p dist/apps/expo-lcagents/ + echo "lc-agents.com" > dist/apps/expo-lcagents/CNAME + + - name: LC Agents -> Deployment + uses: dobbelina/copy_file_to_another_repo_action@main + env: + API_TOKEN_GITHUB: ${{ secrets.UNITY_PAT }} + with: + source_file: 'dist/apps/expo-lcagents/' + destination_repo: 'KBVE/lc-agents.com' + destination_folder: '/docs' + destination_branch: 'main' + destination_branch_create: 'patch-kbve-lcagents-deploy-${{ needs.globals.outputs.sha256head }}' + user_email: 'h0lybyte@users.noreply.github.com' + user_name: 'h0lybyte' + commit_message: ${{ github.event.head_commit.message }} + rsync_option: '-avrh --delete' + + kilonet-rareicon-build: + needs: ['alter', 'globals'] + name: Kilonet RareIcon + runs-on: ubuntu-latest + if: needs.alter.outputs.kilonet == 'true' + strategy: + fail-fast: false + matrix: + projectPath: + - azure-rareicon + unityVersion: + - 6000.0.25f1 + targetPlatform: + - StandaloneWindows64 + - WebGL + steps: + # - name: Checkout this repository + # uses: actions/checkout@v4 + + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + + - name: Pull RareIcon Kilonet Repo + env: + AZURE_PAT: ${{ secrets.AZURE_NOV2025_TOKEN_SECRET }} + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git clone https://kbve:${AZURE_PAT}@dev.azure.com/kbve/rareicon/_git/rareicon azure-rareicon + + - name: Unity Cache + uses: actions/cache@v4 + with: + path: ${{ matrix.projectPath }}/Library + key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} + restore-keys: | + Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}- + Library-${{ matrix.projectPath }}- + Library- + + - name: Unity Builder + uses: game-ci/unity-builder@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + projectPath: ${{ matrix.projectPath }} + unityVersion: ${{ matrix.unityVersion }} + targetPlatform: ${{ matrix.targetPlatform }} + + - name: Unity Upload + uses: actions/upload-artifact@v4 + with: + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }} + + kilonet-rareicon-itch-deployment: + needs: ['kilonet-rareicon-build'] + name: Kilonet Rareicon Itch Deployment + runs-on: ubuntu-latest + steps: + - name: Download WebGL Build + uses: actions/download-artifact@v4 + id: download + with: + name: Build-WebGL + path: build/WebGL + + - name: Itch Deploy + uses: KikimoraGames/itch-publish@v0.0.3 + with: + butlerApiKey: ${{ secrets.ITCH_API }} + gameData: ${{steps.download.outputs.download-path}} + itchUsername: kbve + itchGameId: rareicon + buildChannel: webgl + + rareicon_gameserver: + needs: ['kilonet-rareicon-build'] + name: RareIcon Game Server + runs-on: 'ubuntu-latest' + permissions: + contents: read + packages: write + # id-token: write + steps: + - name: Checkout the monorepo using git + uses: actions/checkout@v4 + + - name: Setup Node v20 + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Setup pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 + run_install: false + + - name: Get pnpm Store + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm Cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install pnpm dependencies + shell: bash + run: | + pnpm install + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build RareIcon GS container with Nx + env: + INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pnpm nx run rust_rareicon_gameserver:container --configuration=production --push + + + + # Alpha Builds + + # buildSaber: + # needs: [alter, setup] + # name: 'Saber Alpha Build' + # runs-on: ubuntu-latest + # if: needs.alter.outputs.saber == 'true' && needs.setup.outputs.build_unity == 'true' + # strategy: + # fail-fast: false + # matrix: + # projectPath: + # - apps/saber + # unityVersion: + # - 2022.3.12f1 + # targetPlatform: + # - StandaloneWindows64 + # # - WebGL * Disabled WebGL for DoTs + # steps: + # - uses: actions/checkout@v4 + # with: + # token: ${{ secrets.UNITY_PAT }} + # - uses: actions/cache@v4 + # with: + # path: ${{ matrix.projectPath }}/Library + # key: + # Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{ + # hashFiles(matrix.projectPath) }} + # restore-keys: | + # Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}- + # Library-${{ matrix.projectPath }}- + # Library- + + # - uses: game-ci/unity-builder@v4 + # env: + # UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + # UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + # UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + # with: + # projectPath: ${{ matrix.projectPath }} + # unityVersion: ${{ matrix.unityVersion }} + # targetPlatform: ${{ matrix.targetPlatform }} + + # # WebGL * Disalbed WebGL for DoTs + # # + # #- uses: actions/upload-artifact@v4 + # # with: + # # name: build-WebGL + # # path: build/WebGL + + # - uses: actions/upload-artifact@v4 + # with: + # name: build-StandaloneWindows64 + # path: build/StandaloneWindows64 + + # deploy: + # needs: alter + # name: 'Process Alpha Branch' + # runs-on: ubuntu-latest + # steps: + # - name: Checkout the repository using git + # uses: actions/checkout@v4 + + # - name: Setup Node v20 + # uses: actions/setup-node@v4 + # with: + # node-version: 20 + + # - name: Setup pnpm + # uses: pnpm/action-setup@v3 + # with: + # version: 9 + # run_install: false + + # # @[CACHE]-> [PNPM] -> [START] + + # - name: Get pnpm Store + # shell: bash + # run: | + # echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + # - name: Setup pnpm Cache + # uses: actions/cache@v4 + # with: + # path: ${{ env.STORE_PATH }} + # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + # restore-keys: | + # ${{ runner.os }}-pnpm-store- + + # # @[CACHE] -> [PNPM] -> [END] + + # - name: Install pnpm dependencies + # run: pnpm install + + # # @[REPORT] -> [START] + + # - name: Generate NX Report + # shell: bash + # run: | + # pnpm nx report + + # # @[REPORT] -> [END] + + # # [SABER] -> [UNITY] -> [START] + # - name: Saber Deployment + # if: needs.alter.outputs.saber == 'true' + # shell: bash + # run: | + # echo "Deploying Saber..." + # # [SABER] -> [UNITY] -> [END] + # # - name: Itch Fish Chip Build + # # if: needs.alter.outputs.itchfishchip == 'true' + # # shell: bash + # # run: | + # # pnpm nx build next-itch-fishchip + + # # - name: Itch Fish Chip Upload Deployment + # # if: needs.alter.outputs.itchfishchip == 'true' + # # uses: actions/upload-artifact@v4 + # # with: + # # name: build-WebGL + # # path: apps/next-itch-fishchip/dist + + # # [React] Fish & Chip + + # # [React] Phaser TravelBox + + # # - name: Itch TravelBox Build + # # if: needs.alter.outputs.reacttravelbox == 'true' + # # shell: bash + # # run: | + # # pnpm nx build react-phaser-travelbox + + # # - name: Itch Fish Chip Upload Deployment + # # if: needs.alter.outputs.reacttravelbox == 'true' + # # uses: actions/upload-artifact@v4 + # # with: + # # name: build-WebGL + # # path: apps/kbve.com/public/embed/js/travelbox + + # # [Build Test] + # - name: Build KBVE.com + # if: needs.alter.outputs.kbve == 'true' + # shell: bash + # run: | + # pnpm nx build kbve.com + + # itchdev: + # needs: ['alter', 'buildSaber', 'setup'] + # name: Itch Dev Saber Deployment + # runs-on: ubuntu-latest + # if: needs.alter.outputs.saber == 'true' && needs.setup.outputs.build_unity == 'true' + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + + # - name: Download Windows Build + # uses: actions/download-artifact@v4 + # id: download + # with: + # name: build-StandaloneWindows64 + # path: build/StandaloneWindows64 + + # #- name: Download WebGL Build + # # uses: actions/download-artifact@v4 + # # id: download + # # with: + # # name: build-WebGL + # # path: build/WebGL + + # - name: Itch Deploy + # uses: KikimoraGames/itch-publish@v0.0.3 + # with: + # butlerApiKey: ${{ secrets.ITCH_API }} + # gameData: ${{steps.download.outputs.download-path}} + # itchUsername: kbve + # itchGameId: dev-saber + # #buildChannel: webgl + # buildChannel: windows + + # itchfishchipdeploy: + # needs: ['alter', 'deploy'] + # name: Itch Fish Chip Deployment + # runs-on: ubuntu-latest + # if: needs.alter.outputs.itchfishchip == 'true' + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + + # - name: Download WebGL Build + # uses: actions/download-artifact@v4 + # id: download + # with: + # name: build-WebGL + # path: apps/next-itch-fishchip/dist + + # - name: Itch Deploy + # uses: KikimoraGames/itch-publish@v0.0.3 + # with: + # butlerApiKey: ${{ secrets.ITCH_API }} + # gameData: ${{steps.download.outputs.download-path}} + # itchUsername: kbve + # itchGameId: fishchip + # buildChannel: webgl + + # itchtravelbox: + # needs: ['alter', 'deploy'] + # name: Itch TravelBox Deployment + # runs-on: ubuntu-latest + # if: needs.alter.outputs.reacttravelbox == 'true' + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + + # - name: Download WebGL Build + # uses: actions/download-artifact@v4 + # id: download + # with: + # name: build-WebGL + # path: apps/kbve.com/public/embed/js/phaser + + # - name: Itch Deploy + # uses: KikimoraGames/itch-publish@v0.0.3 + # with: + # butlerApiKey: ${{ secrets.ITCH_API }} + # gameData: ${{steps.download.outputs.download-path}} + # itchUsername: kbve + # itchGameId: travelbox + # buildChannel: webgl