-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use edgee-component toml to build (#4)
* feat: use edgee-component toml to build * feat: change workflow to have a normal build * feat: update wit version * feat: harmonize component output path * feat(): update toml for new format
- Loading branch information
1 parent
901b574
commit 4323ae7
Showing
4 changed files
with
74 additions
and
54 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,58 +1,58 @@ | ||
name: Check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
name: cargo check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
target: wasm32-wasip2 # WebAssembly target | ||
components: rustfmt | ||
- run: cargo check | ||
fmt: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- uses: actions-rust-lang/rustfmt@v1 | ||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy | ||
- uses: wearerequired/lint-action@master | ||
with: | ||
clippy: true | ||
build: | ||
name: cargo build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
target: wasm32-wasip2 # WebAssembly target | ||
- run: make build | ||
check: | ||
name: cargo check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
target: wasm32-wasip2 # WebAssembly target | ||
components: rustfmt | ||
- run: cargo check | ||
fmt: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- uses: actions-rust-lang/rustfmt@v1 | ||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy | ||
- uses: wearerequired/lint-action@master | ||
with: | ||
clippy: true | ||
build: | ||
name: cargo build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
target: wasm32-wasip2 # WebAssembly target | ||
- run: make build-no-edgee | ||
|
||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- run: make test.coverage | ||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- run: make test.coverage |
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,16 @@ | ||
manifest_version = 1 | ||
|
||
[package] | ||
name = "example-rust-component" | ||
version = "1.0.0" | ||
|
||
category = "data-collection" | ||
subcategory = "analytics" | ||
description = "Example Rust component for data collection" | ||
documentation = "https://github.com/edgee-cloud/example-rust-component" | ||
repository = "https://github.com/edgee-cloud/example-rust-component" | ||
wit-world-version = "0.4.0" | ||
|
||
[package.build] | ||
command = "cargo build --target wasm32-wasip2 --release --target-dir ./target && mv ./target/wasm32-wasip2/release/example_rust_component.wasm ./dc_component.wasm" | ||
output_path = "dc_component.wasm" |