Skip to content

Commit

Permalink
Try some CI fixes after Cargo.toml changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-h-chamberlain committed May 6, 2024
1 parent 0336a18 commit 971cba3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,11 @@ jobs:
- name: Check formatting
run: cargo fmt --all --verbose -- --check

# We always run the next two steps, so that even if formatting fails we
# We always run the next step, so that even if formatting fails we
# still get compilation errors for the same run (mainly for matchers).

- name: Cargo check ctru-sys (without tests)
run: cargo 3ds clippy --package ctru-sys --color=always --verbose
if: success() || failure()

- name: Cargo check ctru-rs (including tests)
run: cargo 3ds clippy --package ctru-rs --color=always --verbose --all-targets
- name: Cargo check workspace (including tests / examples)
run: cargo 3ds clippy --workspace --color=always --verbose --all-targets
if: success() || failure()

test:
Expand Down Expand Up @@ -80,17 +76,21 @@ jobs:
# unless cargo-3ds actually runs them as separate commands. See
# https://github.com/rust3ds/cargo-3ds/issues/44 for more details
- name: Build lib and integration tests
run: cargo 3ds test --no-run --tests --all-features
# Hmm, I guess we really do need to build each target separately due to the above issue:
run: |
cargo 3ds test --no-run --lib --all-features --package ctru-sys
cargo 3ds test --no-run --test layout_test --all-features --package ctru-sys
cargo 3ds test --no-run --lib --all-features --package ctru-rs
- name: Run lib and integration tests
uses: rust3ds/test-runner/run-tests@v1
with:
args: --tests --all-features
args: --tests --all-features --workspace

- name: Build and run doc tests
uses: rust3ds/test-runner/run-tests@v1
with:
args: --doc
args: --doc --workspace

- name: Upload citra logs and capture videos
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion ctru-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ctru-sys = { path = "../ctru-sys", version = "0.5.0" }
const-zero = "0.1.0"
shim-3ds = { workspace = true }
pthread-3ds = { workspace = true }
libc = { workspace = true }
libc = { workspace = true, default-features = true }
bitflags = "2.3.3"
macaddr = "1.0.1"
widestring = "1.0.2"
Expand Down
1 change: 1 addition & 0 deletions ctru-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn main() {
let romfs_path = PathBuf::from(format!("{manifest_dir}/{romfs_dir_setting}"));

// Check if the romfs path exists so we can compile the module
println!("cargo:rustc-check-cfg=cfg(romfs_exists)");
if romfs_path.exists() {
println!("cargo:rustc-cfg=romfs_exists");
}
Expand Down
1 change: 0 additions & 1 deletion ctru-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ layout-tests = [
]

[[test]]
path = "tests/layout_test.rs"
name = "layout_test"
required-features = ["layout-tests"]

Expand Down
1 change: 0 additions & 1 deletion ctru-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ fn main() {
.blocklist_type("MiiData.*")
.blocklist_type("ExHeader_(System|Arm11).*")
.blocklist_type("FS_((Ext|System)SaveData|Program)Info")
.blocklist_type("FS_ProgramInfo")
.blocklist_type("Y2RU_ConversionParams")
.blocklist_field("romfs_(dir|file)", "name")
// Bindgen generated types have no c++ equivalent:
Expand Down
1 change: 0 additions & 1 deletion ctru-sys/build/test_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use bindgen::callbacks::{
use bindgen::FieldVisibilityKind;
use proc_macro2::TokenStream;
use quote::{format_ident, quote, TokenStreamExt};

use regex::Regex;
use rust_format::{Formatter, RustFmt};

Expand Down

0 comments on commit 971cba3

Please sign in to comment.