Skip to content

Commit

Permalink
Merge pull request #142 from luojia65/luojia65/patch-1
Browse files Browse the repository at this point in the history
[ci] more proper name for check types, small fix
  • Loading branch information
luojia65 authored Oct 8, 2024
2 parents 0045805 + 4a13553 commit d5a1dc9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/Cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2024-10-01
toolchain: nightly
- name: Setup env
run: |
rustup component add llvm-tools-preview
rustup target add riscv64imac-unknown-none-elf
cargo install cargo-binutils
- name: Cargo Make
run: |
rustc -vV
cargo make --release
cargo make --release
7 changes: 5 additions & 2 deletions .github/workflows/Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
check:
name: Determine Rust or C check
runs-on: ubuntu-latest

outputs:
Expand All @@ -30,12 +31,14 @@ jobs:
echo "::set-output name=is_rust::false"
fi
cargo_check:
rust_check:
name: Rust
needs: check
if: ${{ needs.check.outputs.is_rust == 'true' }}
uses: ./.github/workflows/Cargo.yml

cmake_check:
name: CMake
needs: check
if: ${{ needs.check.outputs.is_rust == 'false' }}
uses: ./.github/workflows/CMake.yml
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions rust/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ fn find_binutils_prefix() -> Option<&'static str> {
let mut command = Command::new(format!("{}objcopy", prefix));
command.arg("--version");
command.stdout(Stdio::null());
let status = command.status().unwrap();
if status.success() {
return Some(prefix);
let status = command.status();
if let Ok(status) = status {
if status.success() {
return Some(prefix);
}
}
}
None
Expand Down

0 comments on commit d5a1dc9

Please sign in to comment.