From 1c968844cff21966782fd8c25cac2517ff6a0d18 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 12 Sep 2024 10:56:32 +1200 Subject: [PATCH 1/4] Call lipo via xcrun --- xcframework/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xcframework/src/main.rs b/xcframework/src/main.rs index 6dd763b3a..d0a6dc094 100644 --- a/xcframework/src/main.rs +++ b/xcframework/src/main.rs @@ -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") From 3024320ff3fd3830341e0893511bc7edb23be183 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 12 Sep 2024 11:41:32 +1200 Subject: [PATCH 2/4] Print lipo command's stdout and stderr --- xcframework/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xcframework/src/main.rs b/xcframework/src/main.rs index d0a6dc094..f84b6fef4 100644 --- a/xcframework/src/main.rs +++ b/xcframework/src/main.rs @@ -353,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 ) } From e7cad05b4372ef5bc862452a393ce87de6e95319 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 12 Sep 2024 12:13:34 +1200 Subject: [PATCH 3/4] Remove rust-cache action --- .github/workflows/codeql.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a6885dccb..75ca5e127 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -69,11 +69,6 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - - name: Restore Rust Cache - uses: Swatinem/rust-cache@v2 - with: - key: "${{ matrix.language }}" - - name: Prepare Kotlin Project if: matrix.language == 'java-kotlin' shell: bash From 9c40832999d968cb53f2a5bf3cf01021706e5c53 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 12 Sep 2024 13:10:29 +1200 Subject: [PATCH 4/4] Skip rust-cache for swift --- .github/workflows/codeql.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 75ca5e127..64883664c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -69,6 +69,12 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality + - name: Restore Rust Cache + if: matrix.language != 'swift' + uses: Swatinem/rust-cache@v2 + with: + key: "${{ matrix.language }}" + - name: Prepare Kotlin Project if: matrix.language == 'java-kotlin' shell: bash