Aqua: remove -> () + CI: add automatic releases (#92)

This commit is contained in:
folex
2021-06-09 23:21:08 +03:00
committed by GitHub
parent 17eedfd525
commit 56a53d3b08
11 changed files with 147 additions and 68 deletions

79
.github/workflows/publish_release.yml vendored Normal file
View File

@ -0,0 +1,79 @@
name: "publish-release"
on:
push:
branches:
- "master"
- "main"
jobs:
npm-publish:
name: "Publish release"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v2
### Prepare cargo & toolchains
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: update
args: --aggressive
- name: Install cargo-workspaces
run: cargo install cargo-workspaces || true
### === Rust package release ===
- name: Login to crates.io
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Save crate version to env
run: |
set -x
PKG_NAME=marine
# substr(x, 2) removes first character from x. In case of version it's 'v' in 'v0.0.0'
VERSION=$(cargo ws list -l | grep "$PKG_NAME " | head -n1 | awk '{ print substr($2, 2) }')
echo "VERSION=$VERSION" | tee -a $GITHUB_ENV
echo "PKG_NAME=$PKG_NAME" | tee -a $GITHUB_ENV
# - name: Publish to crates.io
# run: cargo ws publish --no-git-commit --from-git --skip-published --yes
- name: Build release binaries of marine & mrepl
run: cargo build --release -p marine -p mrepl
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Marine WASM Runtime ${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
body: |
- [${{ env.VERSION }} @ crates.io](https://crates.io/crates/${{ env.PKG_NAME }}/${{ env.VERSION }})
files: |
target/release/marine
target/release/mrepl
draft: false
prerelease: false
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

90
Cargo.lock generated
View File

@ -737,9 +737,9 @@ dependencies = [
[[package]]
name = "fluence-app-service"
version = "0.7.3"
version = "0.7.4"
dependencies = [
"fluence-faas 0.7.3",
"fluence-faas 0.7.4",
"log",
"maplit",
"serde",
@ -760,7 +760,7 @@ dependencies = [
"fluence-sdk-main",
"itertools 0.9.0",
"log",
"marine-runtime 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-runtime 0.5.0",
"marine-utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-transmute",
"serde",
@ -776,7 +776,7 @@ dependencies = [
[[package]]
name = "fluence-faas"
version = "0.7.3"
version = "0.7.4"
dependencies = [
"cmd_lib",
"env_logger 0.7.1",
@ -785,7 +785,7 @@ dependencies = [
"itertools 0.9.0",
"log",
"marine-module-interface",
"marine-runtime 0.5.0",
"marine-runtime 0.5.1",
"marine-utils 0.2.0",
"once_cell",
"pretty_assertions",
@ -1456,7 +1456,7 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
[[package]]
name = "marine"
version = "0.6.6"
version = "0.6.7"
dependencies = [
"Inflector",
"anyhow",
@ -1464,8 +1464,8 @@ dependencies = [
"check-latest",
"clap",
"exitfailure",
"marine-it-generator 0.5.2",
"marine-it-parser 0.6.3",
"marine-it-generator 0.5.3",
"marine-it-parser 0.6.4",
"marine-module-info-parser 0.1.0",
"semver 0.11.0",
"serde",
@ -1495,11 +1495,11 @@ dependencies = [
[[package]]
name = "marine-it-generator"
version = "0.5.2"
version = "0.5.3"
dependencies = [
"cargo_toml",
"it-lilo",
"marine-it-parser 0.6.3",
"marine-it-parser 0.6.4",
"marine-macro-impl",
"once_cell",
"serde",
@ -1546,7 +1546,7 @@ dependencies = [
[[package]]
name = "marine-it-parser"
version = "0.6.3"
version = "0.6.4"
dependencies = [
"anyhow",
"itertools 0.10.0",
@ -1616,7 +1616,7 @@ dependencies = [
[[package]]
name = "marine-module-interface"
version = "0.1.2"
version = "0.1.3"
dependencies = [
"anyhow",
"itertools 0.10.0",
@ -1630,37 +1630,6 @@ dependencies = [
"wasmer-runtime-core-fl",
]
[[package]]
name = "marine-runtime"
version = "0.5.0"
dependencies = [
"anyhow",
"boolinator",
"bytes 0.5.6",
"it-lilo",
"log",
"marine-it-generator 0.5.2",
"marine-it-interfaces 0.4.0",
"marine-it-parser 0.6.3",
"marine-module-info-parser 0.1.0",
"marine-module-interface",
"marine-utils 0.2.0",
"multimap",
"once_cell",
"parity-wasm",
"paste",
"pwasm-utils",
"reqwest 0.10.10",
"semver 0.11.0",
"serde",
"thiserror",
"tokio 0.2.25",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
]
[[package]]
name = "marine-runtime"
version = "0.5.0"
@ -1690,6 +1659,37 @@ dependencies = [
"wasmer-wasi-fl",
]
[[package]]
name = "marine-runtime"
version = "0.5.1"
dependencies = [
"anyhow",
"boolinator",
"bytes 0.5.6",
"it-lilo",
"log",
"marine-it-generator 0.5.3",
"marine-it-interfaces 0.4.0",
"marine-it-parser 0.6.4",
"marine-module-info-parser 0.1.0",
"marine-module-interface",
"marine-utils 0.2.0",
"multimap",
"once_cell",
"parity-wasm",
"paste",
"pwasm-utils",
"reqwest 0.10.10",
"semver 0.11.0",
"serde",
"thiserror",
"tokio 0.2.25",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
]
[[package]]
name = "marine-sqlite-connector"
version = "0.4.1"
@ -1860,13 +1860,13 @@ dependencies = [
[[package]]
name = "mrepl"
version = "0.7.3"
version = "0.7.4"
dependencies = [
"anyhow",
"check-latest",
"clap",
"env_logger 0.7.1",
"fluence-app-service 0.7.3",
"fluence-app-service 0.7.4",
"fluence-sdk-main",
"itertools 0.9.0",
"log",

View File

@ -1,7 +1,7 @@
[package]
name = "marine-it-generator"
description = "Fluence Marine interface types generator"
version = "0.5.2"
version = "0.5.3"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"
@ -11,7 +11,7 @@ name = "marine_it_generator"
path = "src/lib.rs"
[dependencies]
marine-it-parser = { path = "../it-parser", version = "0.6.0"}
marine-it-parser = { path = "../it-parser", version = "0.6.4"}
marine-macro-impl = "0.6.9"
wasmer-it = { package = "wasmer-interface-types-fl", version = "0.20.0" }

View File

@ -1,7 +1,7 @@
[package]
name = "marine-it-parser"
description = "Fluence Marine interface types parser"
version = "0.6.3"
version = "0.6.4"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"
@ -12,7 +12,7 @@ path = "src/lib.rs"
[dependencies]
marine-it-interfaces = { path = "../it-interfaces", version = "0.4.0" }
marine-module-interface = { path = "../module-interface", version = "0.1.2" }
marine-module-interface = { path = "../module-interface", version = "0.1.3" }
anyhow = "1.0.31"
walrus = "0.18.0"

View File

@ -1,7 +1,7 @@
[package]
name = "marine-module-interface"
description = "Fluence Marine module interface"
version = "0.1.2"
version = "0.1.3"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"

View File

@ -69,9 +69,9 @@ impl fmt::Display for FunctionSignature {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
use itertools::Itertools;
let output = match self.output_types.len() {
0 => "()",
1 => &self.output_types[0],
let (designator, output) = match self.output_types.len() {
0 => ("", ""),
1 => ("->", self.output_types[0].as_str()),
_ => unimplemented!("more than 1 output type is unsupported"),
};
@ -80,7 +80,7 @@ impl fmt::Display for FunctionSignature {
.iter()
.map(|(name, ty)| format!("{}: {}", name, ty))
.format(", ");
writeln!(f, "{}({}) -> {}", self.name, args, output)
writeln!(f, "{}({}) {} {}", self.name, args, designator, output)
}
}

View File

@ -1,13 +1,13 @@
[package]
name = "fluence-app-service"
description = "Fluence Application Service"
version = "0.7.3"
version = "0.7.4"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"
[dependencies]
fluence-faas = { path = "../fluence-faas", version = "0.7.3" }
fluence-faas = { path = "../fluence-faas", version = "0.7.4" }
maplit = "1.0.2"
log = "0.4.8"

View File

@ -1,14 +1,14 @@
[package]
name = "fluence-faas"
description = "Fluence FaaS"
version = "0.7.3"
version = "0.7.4"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"
[dependencies]
marine-runtime = { path = "../runtime", version = "0.5.0" }
marine-module-interface = { path = "../crates/module-interface", version = "0.1.1" }
marine-runtime = { path = "../runtime", version = "0.5.1" }
marine-module-interface = { path = "../crates/module-interface", version = "0.1.3" }
marine-utils = { path = "../crates/utils", version = "0.2.0" }
fluence-sdk-main = { version = "0.6.9", features = ["logger"] }
fluence = { version = "0.6.3", features = ["logger"] }

View File

@ -1,7 +1,7 @@
[package]
name = "marine-runtime"
description = "Marine is the Fluence Compute Runtime"
version = "0.5.0"
version = "0.5.1"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"
@ -13,9 +13,9 @@ path = "src/lib.rs"
[dependencies]
marine-module-info-parser = { path = "../crates/module-info-parser", version = "0.1.0" }
marine-it-interfaces = { path = "../crates/it-interfaces", version = "0.4.0" }
marine-it-parser = { path = "../crates/it-parser", version = "0.6.0" }
marine-it-generator = { path = "../crates/it-generator", version = "0.5.0" }
marine-module-interface = { path = "../crates/module-interface", version = "0.1.1" }
marine-it-parser = { path = "../crates/it-parser", version = "0.6.4" }
marine-it-generator = { path = "../crates/it-generator", version = "0.5.3" }
marine-module-interface = { path = "../crates/module-interface", version = "0.1.3" }
marine-utils = { path = "../crates/utils", version = "0.2.0" }
wasmer-runtime = { package = "wasmer-runtime-fl", version = "0.17.0" }

View File

@ -1,7 +1,7 @@
[package]
name = "marine"
description = "Fluence Marine command line tool"
version = "0.6.6"
version = "0.6.7"
authors = ["Fluence Labs"]
repository = "https://github.com/fluencelabs/marine/tools/cli"
license = "Apache-2.0"
@ -12,8 +12,8 @@ name = "marine"
path = "src/main.rs"
[dependencies]
marine-it-generator = { path = "../../crates/it-generator", version = "0.5.1" }
marine-it-parser = { path = "../../crates/it-parser", version = "0.6.3" }
marine-it-generator = { path = "../../crates/it-generator", version = "0.5.3" }
marine-it-parser = { path = "../../crates/it-parser", version = "0.6.4" }
marine-module-info-parser = { path = "../../crates/module-info-parser", version = "0.1.0" }
semver = "0.11.0"

View File

@ -1,7 +1,7 @@
[package]
name = "mrepl"
description = "Fluence Marine REPL intended for testing purposes"
version = "0.7.3"
version = "0.7.4"
authors = ["Fluence Labs"]
repository = "https://github.com/fluencelabs/marine/tools/repl"
license = "Apache-2.0"
@ -12,7 +12,7 @@ name = "mrepl"
path = "src/main.rs"
[dependencies]
fluence-app-service = { path = "../../fluence-app-service", version = "0.7.2", features = ["raw-module-api"] }
fluence-app-service = { path = "../../fluence-app-service", version = "0.7.4", features = ["raw-module-api"] }
fluence-sdk-main = { version = "0.6.9", features = ["logger"] }
anyhow = "1.0.31"