mirror of
https://github.com/fluencelabs/aqua-lib
synced 2024-12-04 15:20:23 +00:00
CI: check Aqua compilation (#7)
This commit is contained in:
parent
15953e92eb
commit
47875e6465
34
.github/workflows/check.yml
vendored
Normal file
34
.github/workflows/check.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: "check-compilation"
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
check-compiles:
|
||||
name: "Check Aqua compiles"
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-v1-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-v1-node
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
|
||||
- name: Install aqua compiler
|
||||
run: npm install -g @fluencelabs/aqua-cli
|
||||
|
||||
- name: Check compilation
|
||||
run: aqua-cli -i . -o /tmp
|
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@ -17,6 +17,24 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-v1-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-v1-node
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
|
||||
- name: Install aqua compiler
|
||||
run: npm install -g @fluencelabs/aqua-cli
|
||||
|
||||
- name: Check compilation
|
||||
run: aqua-cli -i . -o /tmp
|
||||
|
||||
### Calculate FINAL_VERSION
|
||||
- name: Install jq
|
||||
run: sudo apt-get update && sudo apt-get --yes --force-yes install jq
|
||||
|
27
builtin.aqua
27
builtin.aqua
@ -44,14 +44,14 @@ data Module:
|
||||
hash: string
|
||||
config: ModuleConfig
|
||||
|
||||
data Blueprint:
|
||||
data AddBlueprint:
|
||||
name: string
|
||||
dependencies: []Dependency
|
||||
|
||||
data Blueprint:
|
||||
id: string
|
||||
name: string
|
||||
dependencies: []string
|
||||
dependencies: []Dependency
|
||||
|
||||
data ScriptInfo:
|
||||
id: string
|
||||
@ -160,13 +160,6 @@ service Srv("srv"):
|
||||
get_interface(service_id: string) -> Interface
|
||||
|
||||
service Dist("dist"):
|
||||
-- Used to add modules to the node specified in the service call
|
||||
-- Arguments:
|
||||
-- bytes – a base64 string containing the .wasm module to add.
|
||||
-- config – module info
|
||||
-- Returns: blake3 hash of the module
|
||||
add_module(wasm_b56_content: Bytes, conf: ModuleConfig) -> string
|
||||
|
||||
-- Constructs a ModuleConfig structure
|
||||
-- Arguments:
|
||||
-- module_name - import name of the module
|
||||
@ -182,7 +175,14 @@ service Dist("dist"):
|
||||
-- logging_mask - Binary mask to enable & disable logging targets. Targets are
|
||||
-- configured in WasmLoggerBuilder::with_target_map
|
||||
-- mem_pages_count - Maximum memory size accessible by a module in Wasm pages (64 Kb)
|
||||
make_module_config(name: string, mem_pages_count: ?u32, logger_enabled: ?bool, preopened_files: ?[]string, envs: ?Pairs, mapped_dirs: ?Pairs, mounted_binaries: ?Pairs, logging_mask: ?s32) -> ModuleConfig
|
||||
make_module_config(name: string, mem_pages_count: ?u32, logger_enabled: ?bool, preopened_files: ?[]string, envs: ?Pairs, mapped_dirs: ?Pairs, mounted_binaries: ?Pairs, logging_mask: ?i32) -> ModuleConfig
|
||||
|
||||
-- Used to add modules to the node specified in the service call
|
||||
-- Arguments:
|
||||
-- bytes – a base64 string containing the .wasm module to add.
|
||||
-- config – module info
|
||||
-- Returns: blake3 hash of the module
|
||||
add_module(wasm_b56_content: Bytes, conf: ModuleConfig) -> string
|
||||
|
||||
-- Get a list of modules available on the node
|
||||
list_modules() -> []Module
|
||||
@ -190,10 +190,10 @@ service Dist("dist"):
|
||||
-- Get the interface of a module
|
||||
get_interface(module_id: string) -> Interface
|
||||
|
||||
-- Add a blueprint to the node
|
||||
add_blueprint(blueprint: Blueprint) -> string
|
||||
-- Creates Blueprint structure from from blueprint name and dependencies (modules)
|
||||
make_blueprint(name: string, dependencies: []Dependency) -> Blueprint
|
||||
make_blueprint(name: string, dependencies: []Dependency) -> AddBlueprint
|
||||
-- Add a blueprint to the node
|
||||
add_blueprint(blueprint: AddBlueprint) -> string
|
||||
|
||||
-- Used to get the blueprints available on the node specified in the service call.
|
||||
-- A blueprint is an object of the following structure
|
||||
@ -206,7 +206,6 @@ service Script("script"):
|
||||
-- interval - if not set, script will be ran only once
|
||||
-- if set, script will be ran once in the interval
|
||||
-- (NOTE: actual interval may vary by up to 3 seconds)
|
||||
--
|
||||
-- TODO: change interval to ?u64 when node API is updated
|
||||
add(air_script: string, interval: ?string) -> string
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user