Skip to content

Commit

Permalink
Take trustwallet#4242 from upstream (fix CI). Check Kotlin CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Jan 28, 2025
1 parent 6bef5a6 commit c5e7a60
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
build:
runs-on: macos-latest-large
if: github.event.pull_request.draft == false
if: false
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
build:
runs-on: macos-latest-xlarge
if: github.event.pull_request.draft == false
if: false
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kotlin-sample-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
build:
runs-on: macos-latest-xlarge
if: github.event.pull_request.draft == false
if: false
steps:
- uses: actions/checkout@v3

Expand Down
21 changes: 17 additions & 4 deletions rust/tw_macros/src/tw_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,23 @@ pub fn tw_ffi(attr: TokenStream2, item: TokenStream2) -> Result<TokenStream2> {
let yaml_file_path = bindings_dir.join(format!("{}.yaml", class));

let mut config = if yaml_file_path.exists() {
serde_yaml::from_str(
&fs::read_to_string(&yaml_file_path).expect("Failed to read existing YAML file"),
)
.expect("Failed to parse YAML file")
match fs::read_to_string(&yaml_file_path) {
Ok(contents) => match serde_yaml::from_str(&contents) {
Ok(config) => config,
Err(_) => {
fs::remove_file(&yaml_file_path)
.expect("Failed to delete invalid YAML file");
TWConfig {
class,
static_functions: vec![],
}
},
},
Err(_) => TWConfig {
class,
static_functions: vec![],
},
}
} else {
TWConfig {
class,
Expand Down

0 comments on commit c5e7a60

Please sign in to comment.