From c43547314a54a23eb4f27915ee4678671ac51ec5 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 19 Oct 2024 21:10:14 +0100 Subject: [PATCH] add CI workflows --- .github/dependabot.yml | 45 ++++++++++++ .github/workflows/ci.yml | 55 +++++++++++++++ .gitignore | 1 - Cargo.lock | 147 +++++++++++++++++++++++++++++++++++++++ Cargo.toml | 5 +- 5 files changed, 248 insertions(+), 5 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 Cargo.lock diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6faeb4f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,45 @@ + +version: 2 +updates: + # bump major and minor updates as soon as available + - package-ecosystem: cargo + target-branch: main # see https://github.com/dependabot/dependabot-core/issues/1778#issuecomment-1988140219 + directory: / + schedule: + interval: daily + commit-message: + prefix: chore + include: scope + ignore: + - dependency-name: "*" + update-types: + - "version-update:semver-patch" + + # bundle patch updates together on a monthly basis + - package-ecosystem: cargo + directory: / + schedule: + interval: monthly + commit-message: + prefix: chore + include: scope + groups: + patch-updates: + update-types: + - patch + ignore: + - dependency-name: "*" + update-types: + - "version-update:semver-minor" + - "version-update:semver-major" + + # bump actions as soon as available + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + commit-message: + prefix: chore + include: scope + ignore: + - dependency-name: dtolnay/rust-toolchain diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6a0bf89 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +on: + push: + branches: [master] + pull_request: + +name: Continuous integration + +jobs: + test: + name: test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + features: ["--features glam", ""] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo test ${{ matrix.features }} + + fmt: + name: format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - run: cargo fmt --all --check + + clippy: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: clippy + - uses: actions-rs-plus/clippy-check@v2 + with: + args: --all --all-features --all-targets + + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Get MSRV from Cargo.toml + run: | + MSRV=$(grep 'rust-version' Cargo.toml | sed 's/.*= *"\(.*\)".*/\1/') + echo "MSRV=$MSRV" >> $GITHUB_ENV + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.MSRV }} + - uses: taiki-e/install-action@cargo-no-dev-deps + - run: cargo no-dev-deps check --all --all-features diff --git a/.gitignore b/.gitignore index 126aea3..9b31305 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /target /.vscode -Cargo.lock *.svg *.data* diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..0ed5e69 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,147 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "dubins_paths" +version = "2.4.1" +dependencies = [ + "glam", + "rand", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "glam" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28091a37a5d09b555cb6628fd954da299b536433834f5b8e59eba78e0cbbf8a" + +[[package]] +name = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "syn" +version = "2.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e185e337f816bc8da115b8afcb3324006ccc82eeaddf35113888d3bd8e44ac" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[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", +] diff --git a/Cargo.toml b/Cargo.toml index 5a260c9..2c92ab0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/VirxEC/dubins_paths" license = "MIT" keywords = ["rocket-league", "rlbot", "physics", "simulation", "dubin"] categories = ["science", "simulation", "algorithms"] -rust-version = "1.62.1" +rust-version = "1.68.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,9 +19,6 @@ rand = "0.8.5" [dependencies] glam = { version = "0.29.0", optional = true } -[features] -glam = ["dep:glam"] - [profile.release] codegen-units = 1 lto = true