Skip to content

Commit

Permalink
Merge pull request #1074 from godot-rust/qol/tools
Browse files Browse the repository at this point in the history
Tooling updates
  • Loading branch information
Bromeon authored Apr 6, 2024
2 parents 7e55836 + 8516ff0 commit 0763d73
Show file tree
Hide file tree
Showing 40 changed files with 108 additions and 164 deletions.
4 changes: 2 additions & 2 deletions .github/composite/godot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: ./.github/composite/rust
with:
rust: ${{ inputs.rust_toolchain }}
- name: "Check cache for installed Godot version"
id: "cache-godot"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/godot_bin
key: godot-${{ runner.os }}-v${{ inputs.godot_ver }}
Expand Down
2 changes: 1 addition & 1 deletion .github/composite/llvm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
id: cache-llvm
# Note: conditionals not yet supported; see https://github.com/actions/runner/issues/834
# if: ${{ inputs.llvm == 'true' }}
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/llvm
key: llvm-10.0
Expand Down
2 changes: 1 addition & 1 deletion .github/external-config/public-docs-token.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MTFBQUZNN0NBMHVoSTJTeUk2OEptdl9Ea1pzdTlEbWZtUHRTdldzVnJDT0dibnA2Z2FZNk9OaHoxeEdObnpMMGx6UTVVRTJNM0Ezdjk3RXJjTAo=
MTFBQUZNN0NBMGZzSGFaOVJFSmRtdV9IYnJXVEFZVEoxNDJ3N3VPTG1UY3UyTnlQM1h2RXNoMjZTMmNtdEhLa2hOQlFOVllWTVlhSTE1bk1JUwo=
43 changes: 19 additions & 24 deletions .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ env:
# Local variables
# Note: using variables is limited at the moment, see https://github.com/actions/runner/issues/480
GDRUST_FEATURES: "gdnative/async,gdnative/serde,gdnative_bindings_generator/debug"
CARGO_DENY_VERSION: "0.11.4"
CARGO_DINGHY_VERSION: "0.6.4"
CARGO_MACHETE_VERSION: "0.3"
CARGO_DENY_VERSION: "0.14.20"
CARGO_DINGHY_VERSION: "0.6.8"
CARGO_MACHETE_VERSION: "0.6.2"

on:
merge_group:
Expand All @@ -43,7 +43,7 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
with:
Expand All @@ -64,7 +64,7 @@ jobs:
- toolchain: nightly
postfix: ' (nightly)'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
with:
Expand All @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
needs: rustfmt
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Deny
# Note: manually downloading is ~30s faster than https://github.com/EmbarkStudios/cargo-deny-action
Expand Down Expand Up @@ -127,22 +127,17 @@ jobs:
- rust: { toolchain: 'nightly' }
testflags: '-- --skip ui_tests'
- os: { id: ubuntu-latest, name: linux }
rust: { toolchain: '1.67', postfix: ' (msrv 1.67)' }
rust: { toolchain: '1.70', postfix: ' (msrv 1.70)' }
testflags: '-- --skip ui_tests'
- os: { id: ubuntu-latest, name: linux }
rust: { toolchain: 'stable', postfix: ' (minimal-deps)', special: 'minimal-deps' }
testflags: '-- --skip ui_tests'
runs-on: ${{ matrix.os.id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install nightly Rust (minimal-deps only)"
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: false # use selected toolchain for remainder of this step
components: cargo
if: ${{ matrix.rust.special == 'minimal-deps' }}
run: rustup toolchain install nightly --profile minimal --component cargo
- name: "Install minimal dependency versions from Cargo"
run: cargo +nightly update -Z minimal-versions
if: ${{ matrix.rust.special == 'minimal-deps' }}
Expand Down Expand Up @@ -174,7 +169,7 @@ jobs:
name: linux
runs-on: ${{ matrix.os.id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
with:
Expand All @@ -193,7 +188,7 @@ jobs:
# rust: [stable]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
#with:
Expand Down Expand Up @@ -225,7 +220,7 @@ jobs:
# rust: [stable]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
#with:
Expand Down Expand Up @@ -295,16 +290,16 @@ jobs:
godot: "3.5.1-stable"
postfix: ' (nightly, inventory)'
build_args: '--features inventory'
- rust: '1.67'
- rust: '1.70'
godot: "3.5.1-stable"
postfix: ' (msrv 1.67)'
- rust: '1.67'
postfix: ' (msrv 1.70)'
- rust: '1.70'
godot: "3.5.1-stable"
postfix: ' (msrv 1.67, ptrcall)'
postfix: ' (msrv 1.70, ptrcall)'
build_args: '--features ptrcall'
- rust: '1.67'
- rust: '1.70'
godot: "3.5.1-stable"
postfix: ' (msrv 1.67, inventory)'
postfix: ' (msrv 1.70, inventory)'
build_args: '--features inventory'

# Test with oldest supported engine version
Expand All @@ -318,7 +313,7 @@ jobs:
build_args: '--features custom-godot,ptrcall'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Run Godot integration test"
uses: ./.github/composite/godot
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/minimal-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
with:
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.rust == 'nightly' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
with:
Expand All @@ -57,7 +57,7 @@ jobs:
check-todo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install ripgrep"
run: |
cd /tmp
Expand All @@ -70,7 +70,7 @@ jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install Rust"
uses: ./.github/composite/rust
- name: "Compile tests"
Expand All @@ -81,7 +81,7 @@ jobs:
integration-test-godot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Run Godot integration test"
uses: ./.github/composite/godot
with:
Expand Down
39 changes: 17 additions & 22 deletions .github/workflows/release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# sed: https://unix.stackexchange.com/a/589584
- name: "Interpret tag version"
Expand Down Expand Up @@ -73,12 +73,11 @@ jobs:
runs-on: ubuntu-latest
needs: validation
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v4
- name: "Install Rust toolchain"
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: "Compile tests"
run: cargo test --workspace --features ${GDRUST_FEATURES} --no-run
- name: "Test"
Expand All @@ -88,27 +87,23 @@ jobs:
runs-on: ubuntu-latest
needs: validation
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions/checkout@v4
- name: "Install Rust toolchain"
run: |
rustup toolchain install stable --profile minimal --component clippy
rustup default stable
- name: "Check clippy"
run: cargo clippy --workspace --features ${GDRUST_FEATURES} -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented

rustfmt:
runs-on: ubuntu-latest
needs: validation
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions/checkout@v4
- name: "Install Rust toolchain"
run: |
rustup toolchain install stable --profile minimal --component rustfmt
rustup default stable
- name: "Check rustfmt"
run: cargo fmt --all -- --check

Expand All @@ -119,7 +114,7 @@ jobs:
steps:
# Note: we cannot dry-run the publishing, since crates depend on each other, and dry-run will fail if they aren't yet on crates.io.
# Sleep to leave crates.io and docs.rs some time to index the dependencies, before releasing dependents.
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Execute crates.io publishing"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
# Checkout is always needed, for the notify step
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

# This is just a sanity check to make sure that the follow-up docs generation doesn't break.
# So we use the Rust version provided by the GitHub runners, which hopefully is >= MSRV.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you are looking to contribute, but are not sure if what you want to do falls

## Toolchain compatibility

`gdnative` currently has a minimum supported Rust version (MSRV) of **1.67**. We use the Rust 2021 Edition.
`gdnative` currently has a minimum supported Rust version (MSRV) of **1.70**. We use the Rust 2021 Edition.

> **Warning**: **Linux users: Be aware of the source of your Godot binary!** Binary distributions of Godot using a container-based format may ship versions of dependencies that may not be compatible with GDNative libraries built directly from your base system. Examples of such formats include **Flatpak**, **Snap**, and **AppImage**.
>
Expand Down
4 changes: 2 additions & 2 deletions bindings-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
version = "0.11.3"
workspace = ".."
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"

[features]
debug = []
Expand All @@ -23,6 +23,6 @@ proc-macro2 = "1"
quote = "1"
regex = { version = "1.5.5", default-features = false, features = ["std", "unicode-perl"] } # for security: https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html
roxmltree = "0.19"
syn = { version = "1", features = ["full", "extra-traits", "visit"] }
syn = { version = "1.0.84", features = ["full", "extra-traits", "visit"] }
unindent = "0.2.0"
which = { optional = true, version = "5" }
1 change: 1 addition & 0 deletions bindings-generator/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ pub fn generate_method_table(api: &Api, class: &GodotClass) -> TokenStream {
#(#impl_methods),*
};

#[allow(static_mut_refs)]
&mut TABLE
}

Expand Down
2 changes: 1 addition & 1 deletion examples/builder-export/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "builder-export"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/dodge-the-creeps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/godot_tps_controller_port/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
authors = ["The godot-rust developers"]
publish = false
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/native-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "native-plugin"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/property-export/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "property-export"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/resource/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/scene-create/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"
license = "MIT"

[lib]
Expand Down
Loading

0 comments on commit 0763d73

Please sign in to comment.