Skip to content

Commit

Permalink
ci: release darwin-arm64 tarball
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Jul 17, 2024
1 parent 07fc4ab commit f03c4e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-test-macos-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ jobs:
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make test-grammar-evaluator
shell: bash

- name: Release
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make release
shell: bash

- uses: actions/upload-artifact@v4
if: "contains(matrix.os, 'macos-13-xlarge')"
with:
name: kcl-darwin-arm64
if-no-files-found: error
path: _build/dist/Darwin/kclvm
path: _build/kclvm-Darwin-latest.tar.gz
18 changes: 11 additions & 7 deletions kclvm/api/src/service/service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ impl KclvmServiceImpl {
});
}

/// Execute KCL file with args. **Note that it is not thread safe.**
/// Execute KCL file with arguments and return the JSON/YAML result.
///
/// **Note that it is not thread safe when the llvm feature is enabled.**
///
/// # Examples
///
Expand Down Expand Up @@ -517,7 +519,9 @@ impl KclvmServiceImpl {
})
}

/// Execute the KCL artifact with args. **Note that it is not thread safe.**
/// Execute the KCL artifact with arguments and return the JSON/YAML result.
///
/// ***Note that it is not thread safe when the llvm feature is enabled.*
///
/// # Examples
///
Expand Down Expand Up @@ -584,17 +588,17 @@ impl KclvmServiceImpl {
/// age = 18
/// }
/// ```
pub fn override_file(&self, args: &OverrideFileArgs) -> Result<OverrideFileResult, String> {
override_file(&args.file, &args.specs, &args.import_paths)
.map_err(|err| err.to_string())
.map(|result| OverrideFileResult {
pub fn override_file(&self, args: &OverrideFileArgs) -> anyhow::Result<OverrideFileResult> {
override_file(&args.file, &args.specs, &args.import_paths).map(|result| {
OverrideFileResult {
result: result.result,
parse_errors: result
.parse_errors
.into_iter()
.map(|e| e.into_error())
.collect(),
})
}
})
}

/// Service for getting the schema mapping.
Expand Down

0 comments on commit f03c4e7

Please sign in to comment.