Skip to content

Commit 039efac

Browse files
committed
cargo-deny addition + various chores (changelog, CI semicolons, .gitignore)
1 parent 376ef8c commit 039efac

File tree

5 files changed

+49
-34
lines changed

5 files changed

+49
-34
lines changed

.github/workflows/full-ci.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
components: rustfmt
5757
- name: "Check rustfmt"
58-
run: cargo fmt --all -- --check;
58+
run: cargo fmt --all -- --check
5959

6060
clippy:
6161
name: clippy${{ matrix.rust.postfix }}
@@ -77,7 +77,7 @@ jobs:
7777
rust: ${{ matrix.rust.toolchain }}
7878
components: clippy
7979
- name: "Check clippy"
80-
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;
80+
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
8181

8282
cargo-deny:
8383
runs-on: ubuntu-latest
@@ -134,9 +134,9 @@ jobs:
134134
uses: ./.github/composite/llvm
135135
if: ${{ matrix.os.id == 'windows-latest' }}
136136
- name: "Compile tests"
137-
run: cargo test --workspace --features ${GDRUST_FEATURES} --no-run;
137+
run: cargo test --workspace --features ${GDRUST_FEATURES} --no-run
138138
- name: "Test"
139-
run: cargo test --workspace --features ${GDRUST_FEATURES} ${{ matrix.testflags }};
139+
run: cargo test --workspace --features ${GDRUST_FEATURES} ${{ matrix.testflags }}
140140

141141
build-release:
142142
name: build-release-${{ matrix.os.name }}
@@ -162,7 +162,7 @@ jobs:
162162
uses: ./.github/composite/llvm
163163
if: ${{ matrix.os.id == 'windows-latest' }}
164164
- name: "Release build (check only)"
165-
run: cargo check --release;
165+
run: cargo check --release
166166

167167
build-ios:
168168
needs: rustfmt
@@ -179,21 +179,21 @@ jobs:
179179
# rust: ${{ matrix.rust.toolchain }}
180180
- name: "Install cargo-dinghy"
181181
run: |
182-
rustup target add x86_64-apple-ios;
183-
curl -L https://github.com/sonos/dinghy/releases/download/0.4.62/cargo-dinghy-macos-0.4.62.tgz -o cargo-dinghy-macos.tar.gz;
184-
tar -zxvf cargo-dinghy-macos.tar.gz;
185-
mkdir -p $HOME/.cargo/bin;
186-
cp cargo-dinghy-0.4.62/cargo-dinghy $HOME/.cargo/bin;
182+
rustup target add x86_64-apple-ios
183+
curl -L https://github.com/sonos/dinghy/releases/download/0.4.62/cargo-dinghy-macos-0.4.62.tgz -o cargo-dinghy-macos.tar.gz
184+
tar -zxvf cargo-dinghy-macos.tar.gz
185+
mkdir -p $HOME/.cargo/bin
186+
cp cargo-dinghy-0.4.62/cargo-dinghy $HOME/.cargo/bin
187187
- name: "Cross-compile to iOS"
188188
run: |
189-
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1);
190-
export SIM_ID=$(xcrun simctl create My-iphone11 com.apple.CoreSimulator.SimDeviceType.iPhone-11 $RUNTIME_ID);
191-
xcrun simctl boot $SIM_ID;
192-
cd gdnative-core;
193-
cargo dinghy --platform auto-ios-x86_64 test;
194-
cd ..;
195-
cd gdnative-sys;
196-
cargo dinghy --platform auto-ios-x86_64 test;
189+
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
190+
export SIM_ID=$(xcrun simctl create My-iphone11 com.apple.CoreSimulator.SimDeviceType.iPhone-11 $RUNTIME_ID)
191+
xcrun simctl boot $SIM_ID
192+
cd gdnative-core
193+
cargo dinghy --platform auto-ios-x86_64 test
194+
cd ..
195+
cd gdnative-sys
196+
cargo dinghy --platform auto-ios-x86_64 test
197197
198198
build-android:
199199
# Note: even though Android builds for another architecture than Linux, it can reuse downloaded crates (source code, maybe 'cargo check').
@@ -211,16 +211,16 @@ jobs:
211211
# rust: ${{ matrix.rust.toolchain }}
212212
- name: "Install Java + NDK"
213213
run: |
214-
# aarch64 and armv7 cover most Android phones & tablets.;
215-
rustup target add aarch64-linux-android armv7-linux-androideabi;
216-
sudo apt-get update;
217-
sudo apt-get install llvm-dev libclang-dev clang g++-multilib gcc-multilib libc6-dev libc6-dev-arm64-cross;
214+
# aarch64 and armv7 cover most Android phones & tablets.
215+
rustup target add aarch64-linux-android armv7-linux-androideabi
216+
sudo apt-get update
217+
sudo apt-get install llvm-dev libclang-dev clang g++-multilib gcc-multilib libc6-dev libc6-dev-arm64-cross
218218
- name: "Build Rust for targets: aarch64-linux-android, armv7-linux-androideabi"
219219
run: |
220220
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++
221221
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=$ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++
222-
cargo build --target aarch64-linux-android --release;
223-
cargo build --target armv7-linux-androideabi --release;
222+
cargo build --target aarch64-linux-android --release
223+
cargo build --target armv7-linux-androideabi --release
224224
env:
225225
ANDROID_NDK_VERSION: 21.4.7075529
226226

.github/workflows/minimal-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
rust: stable
4141
components: rustfmt
4242
- name: "Check rustfmt"
43-
run: cargo fmt --all -- --check;
43+
run: cargo fmt --all -- --check
4444

4545
clippy:
4646
runs-on: ubuntu-latest
@@ -53,7 +53,7 @@ jobs:
5353
rust: stable
5454
components: clippy
5555
- name: "Check clippy"
56-
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;
56+
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
5757

5858
unit-test:
5959
runs-on: ubuntu-latest
@@ -62,9 +62,9 @@ jobs:
6262
- name: "Install Rust"
6363
uses: ./.github/composite/rust
6464
- name: "Compile tests"
65-
run: cargo test --workspace --features ${GDRUST_FEATURES} --no-run;
65+
run: cargo test --workspace --features ${GDRUST_FEATURES} --no-run
6666
- name: "Test"
67-
run: cargo test --workspace --features ${GDRUST_FEATURES};
67+
run: cargo test --workspace --features ${GDRUST_FEATURES}
6868

6969
integration-test-godot:
7070
runs-on: ubuntu-latest

.gitignore

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
*/target
1+
# IDEs
2+
.vscode
3+
.idea
4+
5+
# Build and package artifacts
26
target
7+
*/target
38
*.rlib
49
**/Cargo.lock
5-
.vscode
6-
.idea
710

11+
# Godot
812
# ignore all files in test/project/lib/, except the .gitkeep as the directory should still be there
913
test/project/lib/*
1014
!test/project/lib/.gitkeep
11-
1215
**/.import/*
16+
/logs
1317

14-
#os specific
18+
# OS-specific
1519
.DS_Store
20+
21+
# User stuff
22+
/ignore

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8383
(Renames listed under _Changed_, safety removals under _Fixed_)
8484

8585
- Crate features
86-
- `nativescript` ([#812](https://github.com/godot-rust/godot-rust/pull/812))
86+
- `nativescript` ([#811](https://github.com/godot-rust/godot-rust/pull/811))
8787
- `bindings` ([#833](https://github.com/godot-rust/godot-rust/pull/833))
8888
- All redundant or unnecessarily nested modules (see _Changed_)
8989
- Deprecated symbols ([#828](https://github.com/godot-rust/godot-rust/pull/828))
@@ -134,6 +134,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
134134
- Automatic publishing of `master` docs ([#786](https://github.com/godot-rust/godot-rust/pull/786))
135135
- Issue templates ([#807](https://github.com/godot-rust/godot-rust/pull/807))
136136
- Add `cargo-deny` to CI ([#849](https://github.com/godot-rust/godot-rust/pull/849))
137+
- Add CI job which tests minimal dependencies ([#856](https://github.com/godot-rust/godot-rust/pull/856))
137138

138139

139140
## [0.9.3] - 2021-02-02

tools/deny.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,16 @@ allow = [
172172
# Wrapper crates can optionally be specified to allow the crate when it
173173
# is a direct dependency of the otherwise banned crate
174174
#{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
175+
#
176+
# See also: https://togithub.com/RustSec/advisory-db/issues/173
175177
deny = [
176178
# unmaintained since Feb 20 + https://github.com/noamtashma/owning-ref-unsoundness
177179
{ name = "owning_ref" },
180+
181+
# unmaintained since Jul 20, RustSec refuses to acknowledge "because author says maintained"
182+
# https://togithub.com/rustsec/advisory-db/pull/891
183+
{ name = "im" },
184+
{ name = "im-rc" },
178185
]
179186
# Certain crates/versions that will be skipped when doing duplicate detection.
180187
skip = [

0 commit comments

Comments
 (0)