Skip to content

Commit

Permalink
Skip rust-cache step from GitHub Action Swift pipeline (#305)
Browse files Browse the repository at this point in the history
* Call lipo via xcrun

* Print lipo command's stdout and stderr

* Remove rust-cache action

* Skip rust-cache for swift
  • Loading branch information
crazytonyli authored Sep 12, 2024
1 parent 831c714 commit febe123
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
# queries: security-extended,security-and-quality

- name: Restore Rust Cache
if: matrix.language != 'swift'
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.language }}"
Expand Down
7 changes: 5 additions & 2 deletions xcframework/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ impl LibraryGroup {
recreate_directory(&dir)?;

let dest = dir.join(LIBRARY_FILENAME);
Command::new("lipo")
Command::new("xcrun")
.arg("lipo")
.arg("-create")
.args(libraries)
.arg("-output")
Expand Down Expand Up @@ -352,8 +353,10 @@ impl ExecuteCommand for Command {
Ok(output)
} else {
anyhow::bail!(
"Command failed with exit code: {}\n$ {:?}",
"Command failed with exit code: {}\nstdout: {:?}\nstderr: {:?}\n$ {:?}",
output.status,
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr),
self
)
}
Expand Down

0 comments on commit febe123

Please sign in to comment.