diff --git a/.all-contributorsrc b/.all-contributorsrc index 7f2f4585..f79de7ec 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "mbround18", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": true, "commitConvention": "eslint", @@ -15,140 +13,105 @@ "name": "Mark", "avatar_url": "https://avatars.githubusercontent.com/u/3298808?v=4", "profile": "http://arneman.me/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "mbround18", "name": "Michael", "avatar_url": "https://avatars.githubusercontent.com/u/12646562?v=4", "profile": "https://m.bruno.fyi/", - "contributions": [ - "infra", - "code", - "doc" - ] + "contributions": ["infra", "code", "doc"] }, { "login": "imgbot[bot]", "name": "imgbot[bot]", "avatar_url": "https://avatars.githubusercontent.com/in/4706?v=4", "profile": "https://github.com/apps/imgbot", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "AGhost-7", "name": "Jonathan Boudreau", "avatar_url": "https://avatars.githubusercontent.com/u/6957411?v=4", "profile": "https://github.com/AGhost-7", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "Kellei2983", "name": "Lukáš Hruška", "avatar_url": "https://avatars.githubusercontent.com/u/32897629?v=4", "profile": "https://github.com/Kellei2983", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "JulianVallee", "name": "Julian Vallée", "avatar_url": "https://avatars.githubusercontent.com/u/6720458?v=4", "profile": "http://vallee-design.de/", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "Finomnis", "name": "Finomnis", "avatar_url": "https://avatars.githubusercontent.com/u/3129043?v=4", "profile": "https://github.com/Finomnis", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "JustinByrne", "name": "Justin Byrne", "avatar_url": "https://avatars.githubusercontent.com/u/14056930?v=4", "profile": "https://tech.jrlbyrne.com/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "apeabody", "name": "Andrew Peabody", "avatar_url": "https://avatars.githubusercontent.com/u/14035345?v=4", "profile": "http://blog.andrewpeabody.com/", - "contributions": [ - "doc", - "code" - ] + "contributions": ["doc", "code"] }, { "login": "morales2k", "name": "Jorge Morales", "avatar_url": "https://avatars.githubusercontent.com/u/1074855?v=4", "profile": "https://github.com/morales2k", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "spannerman79", "name": "Spanner_Man", "avatar_url": "https://avatars.githubusercontent.com/u/7542384?v=4", "profile": "https://github.com/spannerman79", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "cameronwp", "name": "Cameron Pittman", "avatar_url": "https://avatars.githubusercontent.com/u/5186335?v=4", "profile": "https://hurtlingthrough.space/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "kodiakhq[bot]", "name": "kodiakhq[bot]", "avatar_url": "https://avatars.githubusercontent.com/in/29196?v=4", "profile": "https://github.com/apps/kodiakhq", - "contributions": [ - "infra", - "doc", - "code" - ] + "contributions": ["infra", "doc", "code"] }, { "login": "andjo", "name": "Anders Johansson", "avatar_url": "https://avatars.githubusercontent.com/u/665563?v=4", "profile": "https://github.com/andjo", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "ImgBotApp", "name": "Imgbot", "avatar_url": "https://avatars.githubusercontent.com/u/31427850?v=4", "profile": "https://imgbot.net/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] } ], "contributorsPerLine": 7 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index f505e184..cc45ae15 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -24,9 +24,10 @@ jobs: steps: - uses: actions/setup-node@v4 - uses: actions/checkout@v4 - - run: | - npx -y prettier --check ./ - # npx -y shellcheck ./.github/scripts/*.sh ./src/scripts/*.sh + - run: npx -y prettier --check ./ + # Uncomment the line below to include shell script linting + # - run: npx -y shellcheck ./.github/scripts/*.sh ./src/scripts/*.sh + step_summary_meta: runs-on: ubuntu-latest steps: @@ -38,8 +39,6 @@ jobs: echo "> These are development images, expect bugs!!" fi - # Run tests. - # See also https://docs.docker.com/docker-hub/builds/automated-testing/ build: runs-on: ubuntu-latest strategy: @@ -53,7 +52,7 @@ jobs: - image: valheim push: ${{ contains(github.event.pull_request.labels.*.name, 'canary') }} steps: - - uses: actions/checkout@v4 # v4 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -68,11 +67,8 @@ jobs: id: meta uses: crazy-max/ghaction-docker-meta@v5 with: - # list of Docker images to use as base name for tags images: | mbround18/${{ matrix.image }} - - # generate Docker tags based on the following events/attributes tags: | type=sha diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index acef1c27..2dc3ba1b 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -18,18 +18,17 @@ jobs: image: [odin, valheim] steps: - - uses: actions/checkout@v4 # v4 + # Check out the repository + - uses: actions/checkout@v4 + # Generate Docker metadata - name: Docker meta id: meta uses: crazy-max/ghaction-docker-meta@v5 with: - # list of Docker images to use as base name for tags images: | mbround18/${{ matrix.image }} ghcr.io/mbround18/${{ matrix.image }} - - # generate Docker tags based on the following events/attributes tags: | type=schedule type=ref,event=branch @@ -39,15 +38,18 @@ jobs: type=semver,pattern={{major}} type=sha + # Set up Docker Buildx - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + # Log in to DockerHub - name: Login to DockerHub uses: docker/login-action@v3 with: username: mbround18 password: ${{ secrets.DOCKER_TOKEN }} + # Log in to GitHub Container Registry - name: Login to GitHub Container Registry if: github.event_name != 'pull_request' uses: docker/login-action@v3 @@ -56,15 +58,11 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GHCR_TOKEN }} + # Install jq for JSON parsing - name: "JQ: Install" - run: | - sudo apt-get install -y jq - - - name: "Cargo Make: Get Latest Version" - id: cargo-make - run: | - echo "version=$(curl -s https://api.github.com/repos/sagiegurari/cargo-make/releases/latest | jq -r '.tag_name')" >> $GITHUB_OUTPUT + run: sudo apt-get install -y jq + # Build and push Docker images - name: Build and push uses: docker/build-push-action@v6 with: @@ -79,4 +77,3 @@ jobs: "GITHUB_SHA=${GITHUB_SHA}" "GITHUB_REF=${GITHUB_REF}" "GITHUB_REPOSITORY=${GITHUB_REPOSITORY}" - "CARGO_MAKE_VERSION=${{ steps.cargo-make.outputs.version }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67198970..3764b9e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,17 +15,19 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" steps: - - uses: actions/checkout@v4 # v4 + # Check out the repository + - uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.GH_TOKEN }} - - name: Setup | Rust | Nightly + # Set up Rust with the stable toolchain + - name: Setup | Rust | Stable uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable components: clippy rustfmt + # Cache Cargo build files to speed up builds - uses: actions/cache@v4 name: Cache Cargo Files with: @@ -34,14 +36,17 @@ jobs: target/debug key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} + # Build the project with the release profile - name: Build Release run: make release PROFILE=production + # Create a ZIP archive of the release binaries - uses: vimtor/action-zip@v1 with: files: target/release/odin target/release/huginn dest: tmp/bundle.zip + # Use the Auto Release Tool by Intuit - name: Auto Release Tool by Intuit uses: mbround18/auto@v1.5.0 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2f60061c..fd88d490 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,17 +15,21 @@ env: CARGO_TERM_COLOR: always jobs: - build-nd-test: + build-and-test: name: Build & Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 # v4 - - name: Setup | Rust | Nightly + # Check out the repository + - uses: actions/checkout@v4 + + # Set up Rust with the stable toolchain + - name: Setup | Rust | Stable uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable components: clippy rustfmt + # Cache Cargo build files to speed up builds - uses: actions/cache@v4 name: Cache Cargo Files with: @@ -34,9 +38,14 @@ jobs: target/debug key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} + # Build the Rust project - name: Build run: cargo build --verbose + + # Run tests - name: Run tests run: cargo test --verbose + + # Check formatting - name: Lint run: cargo fmt -- --check diff --git a/Cargo.lock b/Cargo.lock index 088eec80..233b16b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -66,9 +66,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -81,33 +81,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -140,9 +140,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -173,9 +173,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -206,9 +206,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "bzip2" @@ -239,13 +239,12 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" [[package]] name = "cc" -version = "1.0.98" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -266,7 +265,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -315,15 +314,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -425,9 +424,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -435,9 +434,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", @@ -449,9 +448,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", @@ -504,9 +503,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", @@ -521,9 +520,9 @@ checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" @@ -852,9 +851,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http 1.1.0", @@ -862,22 +861,22 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -890,6 +889,7 @@ name = "huginn" version = "0.1.1" dependencies = [ "cargo-husky", + "cc", "log", "odin", "tokio", @@ -898,9 +898,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -922,15 +922,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "itoa", "pin-project-lite", @@ -947,7 +947,7 @@ checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "rustls", "rustls-pki-types", @@ -959,16 +959,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2", "tokio", @@ -1081,9 +1081,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" @@ -1093,9 +1093,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1187,9 +1187,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1199,9 +1199,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1209,9 +1209,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -1249,7 +1249,7 @@ dependencies = [ "assert-json-diff", "colored", "futures-core", - "hyper 0.14.28", + "hyper 0.14.30", "log", "rand", "regex", @@ -1283,7 +1283,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -1322,9 +1322,9 @@ dependencies = [ [[package]] name = "object" -version = "0.35.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "memchr", ] @@ -1335,6 +1335,7 @@ version = "2.1.0" dependencies = [ "a2s", "cargo-husky", + "cc", "chrono", "clap", "daemonize", @@ -1389,9 +1390,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1412,9 +1413,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -1423,9 +1424,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -1433,9 +1434,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", @@ -1446,9 +1447,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -1501,15 +1502,19 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "2288c0e17cc8d342c712bb43a257a80ebffce59cdb33d5000d8348f3ec02528b" +dependencies = [ + "zerocopy", + "zerocopy-derive", +] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1550,14 +1555,13 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" dependencies = [ "libc", "once_cell", "socket2", - "tracing", "windows-sys 0.52.0", ] @@ -1611,11 +1615,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -1632,9 +1636,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -1643,9 +1647,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -1659,9 +1663,9 @@ dependencies = [ "futures-core", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-rustls", "hyper-util", "ipnet", @@ -1723,7 +1727,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -1732,9 +1736,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "once_cell", "ring", @@ -1762,9 +1766,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring", "rustls-pki-types", @@ -1788,9 +1792,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.1.1" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +checksum = "05ccfb12511cdb770157ace92d7dda771e498445b78f9886e8cdbc5140a4eced" dependencies = [ "sdd", ] @@ -1809,9 +1813,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sdd" -version = "0.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" +checksum = "177258b64c0faaa9ffd3c65cd3262c2bc7e2588dbbd9c1641d0346145c1bbda8" [[package]] name = "serde" @@ -1951,9 +1955,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "similar" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "slab" @@ -1994,15 +1998,15 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.66" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2075,18 +2079,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -2126,9 +2130,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2338,9 +2342,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2355,15 +2359,15 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -2395,7 +2399,7 @@ dependencies = [ "futures-util", "headers", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.30", "log", "mime", "mime_guess", @@ -2497,9 +2501,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" dependencies = [ "rustls-pki-types", ] @@ -2554,7 +2558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2563,7 +2567,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2581,7 +2585,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2601,18 +2605,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2623,9 +2627,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2635,9 +2639,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2647,15 +2651,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2665,9 +2669,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2677,9 +2681,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2689,9 +2693,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2701,9 +2705,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -2732,6 +2736,27 @@ dependencies = [ "rustix", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -2797,27 +2822,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.12+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index b8237881..2360e1c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,6 @@ members = [ ] resolver = "2" - - [profile.dev] opt-level = 0 diff --git a/Dockerfile.odin b/Dockerfile.odin index 0ccdcc2b..c9e49fda 100644 --- a/Dockerfile.odin +++ b/Dockerfile.odin @@ -1,10 +1,22 @@ ARG DEBIAN_VERSION=12 ARG RUST_VERSION=1.80 +FROM rust:${RUST_VERSION} AS base + +RUN --mount=type=cache,target=/var/cache/apt \ + --mount=type=cache,target=/var/lib/apt \ + apt-get update && apt-get install -y cmake + + +FROM base AS chef + +RUN cargo install cargo-chef + + # ------------------ # # -- Odin Planner -- # # ------------------ # -FROM lukemathwalker/cargo-chef:latest-rust-${RUST_VERSION} as planner +FROM chef AS planner WORKDIR /data/odin COPY . . RUN cargo chef prepare --recipe-path recipe.json @@ -12,9 +24,10 @@ RUN cargo chef prepare --recipe-path recipe.json # ------------------ # # -- Odin Cacher -- # # ------------------ # -FROM lukemathwalker/cargo-chef:latest-rust-${RUST_VERSION} as cacher +FROM chef AS cacher + WORKDIR /data/odin -RUN apt-get update && apt-get install -y cmake + COPY --from=planner /data/odin/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json @@ -22,11 +35,11 @@ RUN cargo chef cook --release --recipe-path recipe.json # ------------------ # # -- Odin Builder -- # # ------------------ # -FROM rust:${RUST_VERSION} as builder +FROM base AS builder WORKDIR /data/odin -RUN apt-get update && apt-get install -y cmake + COPY . . -# Copy over the cached dependencies + COPY --from=cacher /data/odin/target target COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/ RUN make release PROFILE=production @@ -34,7 +47,7 @@ RUN make release PROFILE=production # ------------------ # # -- Odin Runtime -- # # ------------------ # -FROM debian:${DEBIAN_VERSION}-slim as runtime +FROM debian:${DEBIAN_VERSION}-slim AS runtime WORKDIR /apps COPY --from=builder /data/odin/target/release/odin /data/odin/target/release/huginn ./ ENTRYPOINT ["/apps/odin"] diff --git a/Dockerfile.valheim b/Dockerfile.valheim index a98f0d3d..abae9269 100644 --- a/Dockerfile.valheim +++ b/Dockerfile.valheim @@ -4,12 +4,12 @@ ARG ODIN_IMAGE_VERSION=latest # ------------------ # # -- Odin Builder -- # # ------------------ # -FROM --platform=linux/amd64 mbround18/odin:${ODIN_IMAGE_VERSION} as runtime +FROM --platform=linux/amd64 mbround18/odin:${ODIN_IMAGE_VERSION} AS runtime # ------------------ # # -- Steam Setup -- # # ------------------ # -FROM steamcmd/steamcmd:ubuntu-${UBUNTU_VERSION} as root +FROM steamcmd/steamcmd:ubuntu-${UBUNTU_VERSION} AS root USER root @@ -19,7 +19,9 @@ ENV TZ=America/Los_Angeles \ PGID=1000 # Set timezone and install necessary packages -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ +RUN --mount=type=cache,target=/var/cache/apt \ + --mount=type=cache,target=/var/lib/apt \ + ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ apt-get update && \ apt-get upgrade -y && \ apt-get install -y -qq \ @@ -54,7 +56,7 @@ RUN printf "${GITHUB_SHA}\n${GITHUB_REF}\n${GITHUB_REPOSITORY}\n" >/home/steam/. # --------------- # # -- Steam CMD -- # # --------------- # -FROM root as steamcmd +FROM root AS steamcmd USER steam ENV HOME /home/steam @@ -75,7 +77,7 @@ RUN mkdir -p /home/steam/.local/share/Steam/steamcmd && \ # --------------- # # -- Valheim -- # # --------------- # -FROM steamcmd as valheim +FROM steamcmd AS valheim USER steam ENV HOME /home/steam diff --git a/README.md b/README.md index e23b70b7..901869d8 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ + [![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-) + ## Table of Contents diff --git a/docker-compose.yml b/docker-compose.yml index 2821c7d1..ffb50975 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3" services: odin: image: mbround18/odin:latest diff --git a/docs/tutorials/group-file-system-access.md b/docs/tutorials/group-file-system-access.md new file mode 100644 index 00000000..e5b2b536 --- /dev/null +++ b/docs/tutorials/group-file-system-access.md @@ -0,0 +1,64 @@ +1. **Create a new group named `valheim`:** + +```bash +sudo groupadd valheim +``` + +2. **Add your current user to the `valheim` group:** + +```bash +sudo usermod -a -G valheim $USER +``` + +3. **Verify that the group was created and your user was added successfully:** + +```bash +groups $USER +``` + +4. **Find the group ID (GID) of the `valheim` group:** + +```bash +getent group valheim +``` + +This command will output something like `valheim:x:1001:`, where `1001` is the GID. + +5. **Set the permissions for the directories to be group writable, readable, and executable:** + +```bash +sudo chown -R :valheim ./saves ./server ./backups +sudo chmod -R 775 ./saves ./server ./backups +``` + +6. **Update your `docker-compose.yml` file to set the PGID:** + +Open your `docker-compose.yml` file in a text editor and modify it as follows: + +```yaml +version: "3" +services: + valheim: + image: mbround18/valheim:latest + container_name: valheim + environment: + - PGID=1001 # Replace with the actual GID from step 4 + volumes: + - ./saves:/home/steam/.config/unity3d/IronGate/Valheim + - ./server:/home/steam/valheim + - ./backups:/home/steam/backups + ports: + - "2456-2458:2456-2458/udp" + restart: unless-stopped +``` + +Replace `1001` with the actual GID you found in step 4. You can also dynamically set the PUID using the `id -u` command to get your current user ID. + +7. **Restart your Docker Compose services to apply the changes:** + +```bash +docker-compose down +docker-compose up -d +``` + +This will recreate the container with the new PGID settings. diff --git a/src/huginn/Cargo.toml b/src/huginn/Cargo.toml index b763f1fc..f54787cf 100644 --- a/src/huginn/Cargo.toml +++ b/src/huginn/Cargo.toml @@ -18,6 +18,9 @@ include = [ name = "huginn" path = "main.rs" +[build-dependencies] +cc = "1" + [dependencies] log = "0.4.21" tokio = { version = "1", features = ["full"] } diff --git a/src/odin/Cargo.toml b/src/odin/Cargo.toml index 39284eda..bf5b8448 100644 --- a/src/odin/Cargo.toml +++ b/src/odin/Cargo.toml @@ -25,6 +25,8 @@ path = "main.rs" name = "odin" path = "lib.rs" +[build-dependencies] +cc = "1" [dependencies] handlebars = "6.0.0" @@ -32,15 +34,15 @@ dotenv = "0.15" log = "0.4.21" clap = { version = "4.5.4", features = [ "derive", "env" ] } which = "*" -serde = { version = "1.0.200", features = ["derive"], default_features = false } -sysinfo = { version = "0.30.11", default_features = false } +serde = { version = "1.0.200", features = ["derive"], default-features = false } +sysinfo = { version = "0.30.11", default-features = false } serde_json = "1.0.116" daemonize = "0.5.0" tar = "0.4.40" flate2 = "1.0.30" inflections = "1.1.1" md5 = "0.7" -reqwest = { version = "0.12.4", default_features = false, features = ["blocking", "json", "rustls-tls"] } +reqwest = { version = "0.12.4", default-features = false, features = ["blocking", "json", "rustls-tls"] } chrono = "0.4.38" zip = { version = "2.1.1" } fs_extra = "1.3"