From 9b28e65f5f8a1081512284c1a0458bf5ff1338a2 Mon Sep 17 00:00:00 2001 From: Nick Garfield Date: Mon, 15 Aug 2022 12:06:43 -0600 Subject: [PATCH] Bump from 1.0.1 to 1.0.2 --- .github/workflows/release.yaml | 1 - Cargo.lock | 22 ++++++++--------- Dockerfile | 2 +- VERSION | 2 +- cli/Cargo.toml | 4 ++-- cli/src/errors.rs | 4 ++-- cli/src/processor/localnet.rs | 4 ++-- client/Cargo.toml | 12 +++++----- cron/Cargo.toml | 2 +- metrics/Cargo.toml | 4 ++-- plugin/Cargo.toml | 4 ++-- programs/health/Cargo.toml | 2 +- programs/http/Cargo.toml | 4 ++-- programs/network/Cargo.toml | 6 ++--- programs/pool/Cargo.toml | 2 +- programs/scheduler/Cargo.toml | 6 ++--- scripts/build-all.sh | 44 +++++++++++++++++++--------------- scripts/ci/create-tarball.sh | 9 ++++--- stress/Cargo.toml | 6 ++--- 19 files changed, 74 insertions(+), 66 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f2050b819..f155a651f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,7 +33,6 @@ jobs: run: | echo "CI_TAG=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV" echo "CI_OS_NAME=linux" >> "$GITHUB_ENV" - SOLANA_VERSION="$(./scripts/ci/solana-version.sh)" SOLANA_VERSION="v${SOLANA_VERSION#=}" echo "SOLANA_VERSION=$SOLANA_VERSION" >> "$GITHUB_ENV" diff --git a/Cargo.lock b/Cargo.lock index 881b2d2f0..fb67869a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "clockwork-cli" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "clap 3.2.16", @@ -873,7 +873,7 @@ dependencies = [ [[package]] name = "clockwork-client" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anchor-lang", "anchor-spl", @@ -891,7 +891,7 @@ dependencies = [ [[package]] name = "clockwork-cron" -version = "1.0.1" +version = "1.0.2" dependencies = [ "chrono", "chrono-tz", @@ -901,14 +901,14 @@ dependencies = [ [[package]] name = "clockwork-health" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anchor-lang", ] [[package]] name = "clockwork-http" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anchor-lang", "clockwork-pool", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "clockwork-metrics" -version = "1.0.1" +version = "1.0.2" dependencies = [ "chrono", "clockwork-client", @@ -929,7 +929,7 @@ dependencies = [ [[package]] name = "clockwork-network" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anchor-lang", "anchor-spl", @@ -939,14 +939,14 @@ dependencies = [ [[package]] name = "clockwork-pool" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anchor-lang", ] [[package]] name = "clockwork-scheduler" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anchor-lang", "chrono", @@ -956,7 +956,7 @@ dependencies = [ [[package]] name = "clockwork-stress" -version = "1.0.1" +version = "1.0.2" dependencies = [ "base64 0.13.0", "chrono", @@ -975,7 +975,7 @@ dependencies = [ [[package]] name = "clockwork_plugin" -version = "1.0.1" +version = "1.0.2" dependencies = [ "bincode", "bs58 0.4.0", diff --git a/Dockerfile b/Dockerfile index 40fed159c..293095d12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ # Note: When building Docker images on an M1 Mac, you should use the `--platform linux/amd64` flag. # -FROM ubuntu:18.04 +FROM projectserum/build # Set dependency versions. ENV SOLANA_VERSION=v1.10.34 diff --git a/VERSION b/VERSION index 7dea76edb..6d7de6e6a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.0.2 diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c7f40862c..1b1632891 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-cli" -version = "1.0.1" +version = "1.0.2" description = "Command line instruction scheduler for Solana" edition = "2021" license = "AGPL-3.0-or-later" @@ -15,7 +15,7 @@ keywords = ["solana"] [dependencies] anyhow = "1.0.61" clap = { version = "3.1.2", features = ["derive"] } -clockwork-client = { path = "../client", version = "1.0.1" } +clockwork-client = { path = "../client", version = "1.0.2" } dirs-next = "2.0.0" serde = { version = "1.0.136", features = ["derive"] } serde_json = "1.0.79" diff --git a/cli/src/errors.rs b/cli/src/errors.rs index 8d017c77b..8d0c38b68 100644 --- a/cli/src/errors.rs +++ b/cli/src/errors.rs @@ -16,6 +16,6 @@ pub enum CliError { CommandNotRecognized(String), #[error("Transaction failed with error: {0}")] FailedTransaction(String), - #[error("Failed to start localnet")] - FailedLocalnet, + #[error("Failed to start localnet with error: {0}")] + FailedLocalnet(String), } diff --git a/cli/src/processor/localnet.rs b/cli/src/processor/localnet.rs index c71be3e57..488ebd90b 100644 --- a/cli/src/processor/localnet.rs +++ b/cli/src/processor/localnet.rs @@ -20,8 +20,8 @@ use { pub fn start(client: &Client) -> Result<(), CliError> { // Start the validator - let validator_process = - &mut start_test_validator(client).map_err(|_| CliError::FailedLocalnet)?; + let validator_process = &mut start_test_validator(client) + .map_err(|err| CliError::FailedLocalnet(err.to_string()))?; // Initialize Clockwork let mint_pubkey = diff --git a/client/Cargo.toml b/client/Cargo.toml index 9b622995f..532d7e322 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-client" -version = "1.0.1" +version = "1.0.2" edition = "2021" description = "Clockwork client" license = "AGPL-3.0-or-later" @@ -19,11 +19,11 @@ anchor-lang = "0.25.0" anchor-spl = { features = ["mint", "token"], version = "0.25.0" } bincode = "1.3.3" borsh = "0.9.3" -clockwork-health = { path = "../programs/health", features = ["no-entrypoint"], version = "1.0.1" } -clockwork-http = { path = "../programs/http", features = ["no-entrypoint"], version = "1.0.1" } -clockwork-network = { path = "../programs/network", features = ["no-entrypoint"], version = "1.0.1" } -clockwork-pool = { path = "../programs/pool", features = ["no-entrypoint"], version = "1.0.1" } -clockwork-scheduler = { path = "../programs/scheduler", features = ["no-entrypoint"], version = "1.0.1" } +clockwork-health = { path = "../programs/health", features = ["no-entrypoint"], version = "1.0.2" } +clockwork-http = { path = "../programs/http", features = ["no-entrypoint"], version = "1.0.2" } +clockwork-network = { path = "../programs/network", features = ["no-entrypoint"], version = "1.0.2" } +clockwork-pool = { path = "../programs/pool", features = ["no-entrypoint"], version = "1.0.2" } +clockwork-scheduler = { path = "../programs/scheduler", features = ["no-entrypoint"], version = "1.0.2" } solana-client = "1.10.34" solana-sdk = "1.10.34" thiserror = "1.0.31" diff --git a/cron/Cargo.toml b/cron/Cargo.toml index e71593a22..c867b53f1 100644 --- a/cron/Cargo.toml +++ b/cron/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-cron" -version = "1.0.1" +version = "1.0.2" description = "A cron expression parser that's safe to use in the Solana runtime" edition = "2021" license = "AGPL-3.0-or-later" diff --git a/metrics/Cargo.toml b/metrics/Cargo.toml index 4bfb8dc5d..4d149f45c 100644 --- a/metrics/Cargo.toml +++ b/metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-metrics" -version = "1.0.1" +version = "1.0.2" description = "Performance monitoring for Clockwork clusters" edition = "2021" license = "AGPL-3.0-or-later" @@ -12,7 +12,7 @@ keywords = ["solana"] [dependencies] chrono = "0.4.19" -clockwork-client = { path = "../client", version = "1.0.1" } +clockwork-client = { path = "../client", version = "1.0.2" } dotenv = "0.15.0" elasticsearch = "7.14.0-alpha.1" serde_json = "~1" diff --git a/plugin/Cargo.toml b/plugin/Cargo.toml index 3963fda99..2538b60d2 100644 --- a/plugin/Cargo.toml +++ b/plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork_plugin" -version = "1.0.1" +version = "1.0.2" edition = "2021" description = "Clockwork plugin for Solana validators" license = "AGPL-3.0-or-later" @@ -18,7 +18,7 @@ bincode = "1.3.3" bs58 = "0.4.0" bugsnag = "0.2.1" cached = "0.34.1" -clockwork-client = { path = "../client", version = "1.0.1" } +clockwork-client = { path = "../client", version = "1.0.2" } dashmap = "5.3.3" log = "0.4" prost = "0.10.0" diff --git a/programs/health/Cargo.toml b/programs/health/Cargo.toml index 0acfe7cf3..63894f418 100644 --- a/programs/health/Cargo.toml +++ b/programs/health/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-health" -version = "1.0.1" +version = "1.0.2" description = "Clockwork health protocol" edition = "2021" license = "AGPL-3.0-or-later" diff --git a/programs/http/Cargo.toml b/programs/http/Cargo.toml index 2462eb5f8..440adb258 100644 --- a/programs/http/Cargo.toml +++ b/programs/http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-http" -version = "1.0.1" +version = "1.0.2" description = "Clockwork http protocol" edition = "2021" license = "AGPL-3.0-or-later" @@ -23,4 +23,4 @@ default = [] [dependencies] anchor-lang = { features = ["init-if-needed"], version = "0.25.0" } -clockwork-pool = { path = "../pool", features = ["cpi"], version = "1.0.1" } \ No newline at end of file +clockwork-pool = { path = "../pool", features = ["cpi"], version = "1.0.2" } \ No newline at end of file diff --git a/programs/network/Cargo.toml b/programs/network/Cargo.toml index 2bfa45721..daa8fbb65 100644 --- a/programs/network/Cargo.toml +++ b/programs/network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-network" -version = "1.0.1" +version = "1.0.2" description = "Clockwork networking protocol" edition = "2021" license = "AGPL-3.0-or-later" @@ -24,5 +24,5 @@ default = [] [dependencies] anchor-lang = "0.25.0" anchor-spl = { features = ["mint", "token"], version = "0.25.0" } -clockwork-pool = { path = "../pool", features = ["cpi"], version = "1.0.1" } -clockwork-scheduler = { path = "../scheduler", features = ["cpi"], version = "1.0.1" } +clockwork-pool = { path = "../pool", features = ["cpi"], version = "1.0.2" } +clockwork-scheduler = { path = "../scheduler", features = ["cpi"], version = "1.0.2" } diff --git a/programs/pool/Cargo.toml b/programs/pool/Cargo.toml index a5cdff50e..be81463d4 100644 --- a/programs/pool/Cargo.toml +++ b/programs/pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-pool" -version = "1.0.1" +version = "1.0.2" description = "Clockwork pool protocol" edition = "2021" license = "AGPL-3.0-or-later" diff --git a/programs/scheduler/Cargo.toml b/programs/scheduler/Cargo.toml index c7468a646..7b1bb6037 100644 --- a/programs/scheduler/Cargo.toml +++ b/programs/scheduler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-scheduler" -version = "1.0.1" +version = "1.0.2" description = "Clockwork scheduling protocol" edition = "2021" license = "AGPL-3.0-or-later" @@ -24,5 +24,5 @@ default = [] [dependencies] anchor-lang = { features = ["init-if-needed"], version = "0.25.0" } chrono = { version = "0.4.19", default-features = false, features = ["alloc"] } -clockwork-cron = { path = "../../cron", version = "1.0.1" } -clockwork-pool = { path = "../pool", features = ["cpi"], version = "1.0.1" } +clockwork-cron = { path = "../../cron", version = "1.0.2" } +clockwork-pool = { path = "../pool", features = ["cpi"], version = "1.0.2" } diff --git a/scripts/build-all.sh b/scripts/build-all.sh index a4dd40d7c..a3c57e740 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -76,9 +76,28 @@ done ( set -x cargo $maybeRustVersion build $maybeReleaseFlag "${binArgs[@]}" --lib - anchor build ) +# Copy binaries +cp -fv "target/$buildVariant/libclockwork_plugin.$libExt" "$installDir"/lib +for bin in "${BINS}"; do + cp -fv "target/$buildVariant/$bin" "$installDir"/bin +done + + +# Build programs +if command -v anchor &> /dev/null; then + set -x + anchor build + + # Copy program binaries into lib folder + cp -fv "target/deploy/clockwork_health.so" "$installDir"/lib + cp -fv "target/deploy/clockwork_http.so" "$installDir"/lib + cp -fv "target/deploy/clockwork_network.so" "$installDir"/lib + cp -fv "target/deploy/clockwork_pool.so" "$installDir"/lib + cp -fv "target/deploy/clockwork_scheduler.so" "$installDir"/lib +fi + # Create new Geyser plugin config touch "$installDir"/lib/geyser-plugin-config.json echo "{ @@ -89,24 +108,11 @@ echo "{ }" > "$installDir"/lib/geyser-plugin-config.json # Create a worker keypair -echo -solana-keygen new -f -s --no-bip39-passphrase -o $installDir/lib/clockwork-worker-keypair.json -echo - -# Copy bins -for bin in "${BINS}"; do - cp -fv "target/$buildVariant/$bin" "$installDir"/bin -done - -# Copy program binaries into lib folder -cp -fv "target/deploy/clockwork_health.so" "$installDir"/lib -cp -fv "target/deploy/clockwork_http.so" "$installDir"/lib -cp -fv "target/deploy/clockwork_network.so" "$installDir"/lib -cp -fv "target/deploy/clockwork_pool.so" "$installDir"/lib -cp -fv "target/deploy/clockwork_scheduler.so" "$installDir"/lib - -# Copy plugin -cp -fv "target/$buildVariant/libclockwork_plugin.$libExt" "$installDir"/lib +if command -v solana-keygen &> /dev/null; then + echo + solana-keygen new -f -s --no-bip39-passphrase -o $installDir/lib/clockwork-worker-keypair.json + echo +fi # Success message echo "Done after $SECONDS seconds" diff --git a/scripts/ci/create-tarball.sh b/scripts/ci/create-tarball.sh index 333f44bd0..e975f35d3 100755 --- a/scripts/ci/create-tarball.sh +++ b/scripts/ci/create-tarball.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -cd "$(dirname "$0")/../.." +# cd "$(dirname "$0")/../.." case "$CI_OS_NAME" in osx) @@ -25,15 +25,18 @@ TARBALL_BASENAME="${TARBALL_BASENAME:="$RELEASE_BASENAME"}" echo --- Creating release tarball ( + var=$(pwd) + echo "The current working directory $var." + set -x rm -rf "${RELEASE_BASENAME:?}"/ mkdir "${RELEASE_BASENAME}"/ - COMMIT="$(git rev-parse HEAD)" + # COMMIT="$(git rev-parse HEAD)" ( echo "channel: $CI_TAG" - echo "commit: $COMMIT" + # echo "commit: $COMMIT" echo "target: $TARGET" ) > "${RELEASE_BASENAME}"/version.yml diff --git a/stress/Cargo.toml b/stress/Cargo.toml index a75951531..f8ca1b853 100644 --- a/stress/Cargo.toml +++ b/stress/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clockwork-stress" -version = "1.0.1" +version = "1.0.2" description = "A stress testing tool for Clockwork" edition = "2021" license = "AGPL-3.0-or-later" @@ -14,8 +14,8 @@ keywords = ["solana"] base64 = "0.13.0" chrono = { version = "0.4.19", default-features = false, features = ["alloc"] } clap = { version = "3.1.2", features = ["derive"] } -clockwork-client = { path = "../client", version = "1.0.1" } -clockwork-cron = { path = "../cron", version = "1.0.1" } +clockwork-client = { path = "../client", version = "1.0.2" } +clockwork-cron = { path = "../cron", version = "1.0.2" } serde_json = "1.0.79" serde = { version = "1.0.136", features = ["derive"] } solana-clap-utils = "1.10.34"