-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: implemented native + wrapped functions calling
- Loading branch information
1 parent
bb1f2ef
commit 1ce20b7
Showing
104 changed files
with
11,702 additions
and
149 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_test_crate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: GROQ_API_KEY=${{ secrets.GROQ_API_TOKEN}} cargo test --verbose | ||
|
||
# reference : https://github.com/azriel91/peace/blob/main/.github/workflows/publish.yml | ||
crates_io_publish: | ||
name: Publish (crates.io) | ||
needs: | ||
- build_and_test_crate | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: cargo-release Cache | ||
id: cargo_release_cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo/bin/cargo-release | ||
key: ${{ runner.os }}-cargo-release | ||
|
||
- run: cargo install cargo-release | ||
if: steps.cargo_release_cache.outputs.cache-hit != 'true' | ||
|
||
- name: cargo login | ||
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }} | ||
|
||
# allow-branch HEAD is because GitHub actions switches | ||
# to the tag while building, which is a detached head | ||
|
||
# Publishing is currently messy, because: | ||
# | ||
# * `peace_rt_model_core` exports `NativeError` or `WebError` depending on the target. | ||
# * `peace_rt_model_web` fails to build when publishing the workspace for a native target. | ||
# * `peace_rt_model_web` still needs its dependencies to be published before it can be | ||
# published. | ||
# * `peace_rt_model_hack` needs `peace_rt_model_web` to be published before it can be | ||
# published. | ||
# | ||
# We *could* pass through `--no-verify` so `cargo` doesn't build the crate before publishing, | ||
# which is reasonable, since this job only runs after the Linux, Windows, and WASM builds | ||
# have passed. | ||
- name: "cargo release publish" | ||
run: |- | ||
cargo release \ | ||
publish \ | ||
--workspace \ | ||
--all-features \ | ||
--allow-branch HEAD \ | ||
--no-confirm \ | ||
--execute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/target | ||
**/.env | ||
**/.env.** | ||
**/.cargo | ||
**/.DS_Store |
Oops, something went wrong.