-
Notifications
You must be signed in to change notification settings - Fork 0
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 (#3)
* feat: use edgee-component toml to build * feat: add no edgee build for ci * feat: fix makefile * feat: update wit version * feat(): update toml for new format * use one-line command in Edgee manifest --------- Co-authored-by: Alex Casalboni <alex@edgee.cloud>
- Loading branch information
1 parent
dd3d530
commit 4224f73
Showing
4 changed files
with
46 additions
and
27 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,35 +1,35 @@ | ||
name: Check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/webassembly/wasi-sdk:latest | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/webassembly/wasi-sdk:latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Set up C component build system" | ||
run: | | ||
apt-get update | ||
apt install curl clang build-essential -y | ||
- name: "Set up C component build system" | ||
run: | | ||
apt-get update | ||
apt install curl clang build-essential -y | ||
- name: Set up minimal stable Rust toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Set up minimal stable Rust toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Install wasm tooling | ||
run: CC=clang cargo install wit-bindgen-cli wasm-tools --locked | ||
- name: Install wasm tooling | ||
run: CC=clang cargo install wit-bindgen-cli wasm-tools --locked | ||
|
||
- name: Build component | ||
run: | | ||
make setup | ||
make build | ||
- name: Build component | ||
run: | | ||
make setup | ||
make build-no-edgee |
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,15 @@ | ||
manifest_version = 1 | ||
|
||
[package] | ||
name = "example-c-component" | ||
version = "1.0.0" | ||
category = "data-collection" | ||
subcategory = "analytics" | ||
description = "Example C component for data collection" | ||
documentation = "https://github.com/edgee-cloud/example-c-component" | ||
repository = "https://github.com/edgee-cloud/example-c-component" | ||
wit-world-version = "0.4.0" | ||
|
||
[package.build] | ||
command = "$(CC) dc_component.c internal/data_collection.c internal/data_collection_component_type.o -o /dev/stdout -mexec-model=reactor -Os | wasm-tools component new -o dc_component.wasm" | ||
output_path = "./dc_component.wasm" |