Skip to content

Commit

Permalink
Merge branch 'release/0.17' of github.com:golemfactory/yagna into rel…
Browse files Browse the repository at this point in the history
…ease/0.17
  • Loading branch information
prekucki committed Nov 8, 2024
2 parents f05ce7b + 9b78125 commit 6cc5a0e
Show file tree
Hide file tree
Showing 46 changed files with 1,529 additions and 104 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Build binaries
run: |
cargo build --features static-openssl --target x86_64-unknown-linux-musl -p yagna -p ya-exe-unit -p gftp -p golemsp -p ya-provider -p erc20_processor
cargo build --features require-consent,static-openssl --target x86_64-unknown-linux-musl -p yagna -p ya-exe-unit -p gftp -p golemsp -p ya-provider -p erc20_processor
- name: Move target binaries
run: |
Expand Down Expand Up @@ -133,6 +133,7 @@ jobs:
- name: Check installed binaries
run: |
yagna --version
yagna consent allow-all
erc20_processor --version
- name: Run test
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,17 @@ jobs:
build:
name: Build Release
needs: create-release
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu
- windows
- macos
include:
- os: ubuntu
image: ubuntu-22.04
- os: windows
image: windows-latest
- os: macos
image: macos-latest

env:
X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR: c:/vcpkg/installed/x64-windows-static
Expand Down Expand Up @@ -205,9 +208,9 @@ jobs:
- name: Build macos
if: matrix.os == 'macos'
run: |
cargo build --release --features static-openssl
cargo build --release --features require-consent,static-openssl
cargo build --bin gftp -p gftp --release
cargo build --bin golemsp -p golemsp --release
cargo build --bin golemsp --features require-consent -p golemsp --release
cargo build --bin ya-provider -p ya-provider --release
cargo build --bin exe-unit -p ya-exe-unit --release --features openssl/vendored
- name: Build windows
Expand All @@ -216,18 +219,18 @@ jobs:
vcpkg install openssl:x64-windows-static
vcpkg integrate install
cargo build --release
cargo build --release --features require-consent
cargo build --bin gftp -p gftp --release
cargo build --bin golemsp -p golemsp --release
cargo build --bin golemsp --features require-consent -p golemsp --release
cargo build --bin ya-provider -p ya-provider --release
cargo build --bin exe-unit -p ya-exe-unit --release
- name: Build linux
if: matrix.os == 'ubuntu'
run: |
cargo build --release --features static-openssl --target x86_64-unknown-linux-musl
cargo build --release --features require-consent,static-openssl --target x86_64-unknown-linux-musl
(cd core/gftp && cargo build --bin gftp -p gftp --features bin --release --target x86_64-unknown-linux-musl)
(cd golem_cli && cargo build --bin golemsp -p golemsp --release --features openssl/vendored --target x86_64-unknown-linux-musl)
(cd golem_cli && cargo build --bin golemsp -p golemsp --release --features require-consent,openssl/vendored --target x86_64-unknown-linux-musl)
(cd agent/provider && cargo build --bin ya-provider -p ya-provider --release --features openssl/vendored --target x86_64-unknown-linux-musl)
(cd exe-unit && cargo build --bin exe-unit -p ya-exe-unit --release --features openssl/vendored --target x86_64-unknown-linux-musl)
- name: Pack
Expand Down Expand Up @@ -310,7 +313,7 @@ jobs:
-p golemsp
-p gftp
--release
--features static-openssl
--features require-consent,static-openssl
--target aarch64-unknown-linux-musl
- name: Pack
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/unit-test-sgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ jobs:

- name: Unit tests for SGX
working-directory: exe-unit
run: cargo test --features sgx
run: |
echo "TODO: fix sgx tests"
# cargo test --features sgx
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --exclude=["./agent/provider/src/market"] --locked
args: --workspace --features require-consent --exclude=["./agent/provider/src/market"] --locked
50 changes: 50 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 23 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ default = ['erc20-driver', 'gftp/bin']
dashboard = ['rust-embed', 'mime_guess']
dummy-driver = ['ya-dummy-driver']
erc20-driver = ['ya-erc20-driver']
require-consent = ['ya-utils-consent/require-consent']
static-openssl = ["openssl/vendored", "openssl-probe"]
tos = []
framework-test = [
'ya-exe-unit/framework-test',
'ya-payment/framework-test',
'ya-identity/framework-test',
'ya-exe-unit/framework-test',
'ya-payment/framework-test',
'ya-identity/framework-test',
]
# Temporary to make goth integration tests work
central-net = ['ya-net/central-net']
Expand Down Expand Up @@ -56,18 +57,20 @@ ya-service-api-interfaces.workspace = true
ya-service-api-web.workspace = true
ya-service-bus = { workspace = true }
ya-sgx.path = "core/sgx"
ya-utils-consent.workspace = true
ya-utils-path.workspace = true
ya-utils-futures.workspace = true
ya-utils-process = { workspace = true, features = ["lock"] }
ya-utils-networking.workspace = true
ya-fd-metrics = { path = "utils/fd-metrics" }
ya-healthcheck = { path = "core/healthcheck" }
ya-version = { path = "core/version" }
ya-vpn.workspace = true
ya-client.workspace = true
ya-client-model.workspace = true
gftp = { workspace = true, optional = true }
# just to enable gftp build for cargo-deb
ya-provider = { path = "agent/provider", optional = true } # just to enable conditionally running some tests
ya-provider = { path = "agent/provider", optional = true } # just to enable conditionally running some tests
ya-exe-unit = { version = "0.4", optional = true, path = "exe-unit" } # just to enable conditionally running some tests

actix-rt.workspace = true
Expand All @@ -80,25 +83,25 @@ directories = "2.0.2"
dotenv = "0.15.0"
futures = "0.3"
lazy_static = "1.4"
libsqlite3-sys = {workspace = true}
libsqlite3-sys = { workspace = true }
log = "0.4"
metrics = "0.12"
mime_guess = { version = "2.0", optional = true }
num_cpus = "1"
openssl-probe = {version = "0.1", optional = true}
openssl-probe = { version = "0.1", optional = true }
openssl.workspace = true
rust-embed = { version = "8.5", optional = true }
serde = "1.0"
serde_json = "1.0"
structopt = "0.3"
tokio = {version = "1", features = ["net"]}
tokio-stream = {version = "0.1.8", features = ["io-util"]}
tokio-util = {version = "0.7", features = ["codec"]}
tokio = { version = "1", features = ["net"] }
tokio-stream = { version = "0.1.8", features = ["io-util"] }
tokio-util = { version = "0.7", features = ["codec"] }
url = "2.1.1"

[dev-dependencies]
erc20_processor = { workspace = true }
ya-test-framework.path= "test-utils/test-framework"
ya-test-framework.path = "test-utils/test-framework"

ya-exe-unit = { version = "0.4", path = "exe-unit" }

Expand Down Expand Up @@ -239,6 +242,7 @@ members = [
"test-utils/test-framework/framework-macro",
"test-utils/test-framework/framework-basic",
"test-utils/test-framework/framework-mocks",
"core/healthcheck",
]

[workspace.dependencies]
Expand All @@ -251,19 +255,20 @@ actix-web = "4"
actix = { version = "0.13", default-features = false }

derive_more = "0.99.11"
erc20_payment_lib = {git = "https://github.com/golemfactory/erc20_payment_lib", rev = "4200567b931af64f4fb1f6b756dd6d051576b64f"}
erc20_processor = {git = "https://github.com/golemfactory/erc20_payment_lib", rev = "4200567b931af64f4fb1f6b756dd6d051576b64f"}
erc20_payment_lib = { git = "https://github.com/golemfactory/erc20_payment_lib", rev = "4200567b931af64f4fb1f6b756dd6d051576b64f" }
erc20_processor = { git = "https://github.com/golemfactory/erc20_payment_lib", rev = "4200567b931af64f4fb1f6b756dd6d051576b64f" }
#erc20_payment_lib = { path = "../../payments/erc20_payment_lib/crates/erc20_payment_lib" }
#erc20_processor = { path = "../../payments/erc20_payment_lib" }
#erc20_payment_lib = { version = "0.4.7" }
#erc20_processor = { version = "0.4.7" }
gftp = {version = "0.4.1", path = "core/gftp"}
gftp = { version = "0.4.1", path = "core/gftp" }
hex = "0.4.3"
libsqlite3-sys = {version = "0.26.0", features = ["bundled"]}
libsqlite3-sys = { version = "0.26.0", features = ["bundled"] }
openssl = "0.10"
promptly = "0.3.0"
rand = "0.8.5"
regex = "1.10.4"
strum = {version = "0.24", features = ["derive"]}
strum = { version = "0.24", features = ["derive"] }
trust-dns-resolver = "0.22"
url = "2.3.1"

Expand Down Expand Up @@ -291,11 +296,12 @@ ya-std-utils = { path = "utils/std-utils" }
ya-diesel-utils.path = "utils/diesel-utils"
ya-utils-actix.path = "utils/actix_utils"
ya-core-model = { path = "core/model" }
ya-utils-consent.path = "utils/consent"
ya-utils-path.path = "utils/path"
ya-utils-process.path = "utils/process"

ya-identity.path = "core/identity"
ya-market.path="core/market"
ya-market.path = "core/market"
ya-activity.path = "core/activity"
ya-net.path = "core/net"
ya-persistence.path = "core/persistence"
Expand All @@ -306,7 +312,7 @@ ya-vpn.path = "core/vpn"
ya-gsb-api.path = "core/gsb-api"

ya-payment-driver.path = "core/payment-driver/base"
ya-dummy-driver.path= "core/payment-driver/dummy"
ya-dummy-driver.path = "core/payment-driver/dummy"
ya-erc20-driver.path = "core/payment-driver/erc20"

ya-service-api.path = "core/serv-api"
Expand Down
25 changes: 25 additions & 0 deletions core/healthcheck/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "ya-healthcheck"
version = "0.1.0"
description = "Node health monitoring"
authors = ["Golem Factory <contact@golem.network>"]
edition = "2021"

[dependencies]
ya-service-api-web.workspace = true
ya-client.workspace = true
ya-core-model = { workspace = true, features = ["version"] }
ya-net = { workspace = true, features = ["service"] }
ya-service-api.workspace = true
ya-service-api-interfaces.workspace = true
ya-service-bus = { workspace = true }

actix-web = "4"
anyhow = "1.0"
chrono = { version = "0.4", features = ["serde"] }
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["time", "sync"] }
problem_details = "0.6.0"
http = "1.1.0"
3 changes: 3 additions & 0 deletions core/healthcheck/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod service;

pub use service::HealthcheckService;
15 changes: 15 additions & 0 deletions core/healthcheck/src/service.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use ya_service_api_interfaces::Service;

mod rest;

pub struct HealthcheckService;

impl Service for HealthcheckService {
type Cli = ();
}

impl HealthcheckService {
pub fn rest<C>(_ctx: &C) -> actix_web::Scope {
rest::web_scope()
}
}
Loading

0 comments on commit 6cc5a0e

Please sign in to comment.