CI: check Aqua compilation (#7)

This commit is contained in:
folex 2021-07-05 15:26:22 +03:00 committed by GitHub
parent 15953e92eb
commit 47875e6465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 14 deletions

34
.github/workflows/check.yml vendored Normal file
View 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

View File

@ -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

View File

@ -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