From 63f7405b1d597b9df524483681abce73bf7025e7 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 8 Sep 2022 23:34:24 -0700 Subject: [PATCH] Separate the publish workflows and use new versions (#578) --- .github/workflows/publish.yml | 12 ++++++++++++ .github/workflows/rust.yml | 36 +++++++++++++++++------------------ Cargo.lock | 20 +++++++++---------- Cargo.toml | 10 +++++----- soroban-sdk-macros/Cargo.toml | 2 +- soroban-sdk/Cargo.toml | 4 ++-- soroban-spec/Cargo.toml | 2 +- 7 files changed, 48 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..6a132a098 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,12 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + + publish: + uses: stellar/actions/.github/workflows/rust-publish.yml@main + secrets: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 29c14a16c..c39c4acc9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,8 +4,6 @@ on: push: branches: [main] pull_request: - release: - types: [published] env: RUSTFLAGS: -D warnings @@ -14,7 +12,7 @@ jobs: complete: if: always() - needs: [fmt, rust-analyzer-compat, build-and-test, docs] + needs: [fmt, rust-analyzer-compat, build-and-test, docs, publish-dry-run] runs-on: ubuntu-latest steps: - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') @@ -53,10 +51,6 @@ jobs: - run: cargo hack build --target wasm32-unknown-unknown --profile release - run: cargo hack --feature-powerset --exclude-features docs build --target ${{ matrix.sys.target }} - run: cargo hack --feature-powerset --exclude-features docs test --target ${{ matrix.sys.target }} - - if: startsWith(github.head_ref, 'release/') - uses: stellar/actions/rust-workspace-publish-dry-run@main - with: - cargo-package-options: --target ${{ matrix.sys.target }} docs: runs-on: ubuntu-latest @@ -66,15 +60,19 @@ jobs: - run: rustup install nightly - run: make doc - publish: - if: github.event_name == 'release' - needs: [complete] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: stellar/actions/rust-cache@main - - run: rustup update - - run: cargo install --target-dir ~/.cargo/target --locked --version 0.2.35 cargo-workspaces - - run: make publish - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + publish-dry-run: + if: startsWith(github.head_ref, 'release/') + strategy: + matrix: + sys: + - os: ubuntu-latest + target: wasm32-unknown-unknown + cargo-hack-feature-options: '' + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + cargo-hack-feature-options: '--feature-powerset --exclude-features docs' + uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main + with: + runs-on: ${{ matrix.sys.os }} + cargo-hack-feature-options: ${{ matrix.sys.cargo-hack-feature-options }} + cargo-package-options: --target ${{ matrix.sys.target }} diff --git a/Cargo.lock b/Cargo.lock index 0c9160075..af87c5049 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -907,8 +907,8 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "0.0.4" -source = "git+https://github.com/stellar/rs-soroban-env?rev=bd3dc8d2#bd3dc8d2efb042022c598eec0e63bd88deb9f65d" +version = "0.0.5" +source = "git+https://github.com/stellar/rs-soroban-env?rev=b08a54a7#b08a54a764eaa7b931503dd1a46ad72c1bcf7a2e" dependencies = [ "soroban-env-macros", "soroban-wasmi", @@ -918,8 +918,8 @@ dependencies = [ [[package]] name = "soroban-env-guest" -version = "0.0.4" -source = "git+https://github.com/stellar/rs-soroban-env?rev=bd3dc8d2#bd3dc8d2efb042022c598eec0e63bd88deb9f65d" +version = "0.0.5" +source = "git+https://github.com/stellar/rs-soroban-env?rev=b08a54a7#b08a54a764eaa7b931503dd1a46ad72c1bcf7a2e" dependencies = [ "soroban-env-common", "static_assertions", @@ -927,8 +927,8 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "0.0.4" -source = "git+https://github.com/stellar/rs-soroban-env?rev=bd3dc8d2#bd3dc8d2efb042022c598eec0e63bd88deb9f65d" +version = "0.0.5" +source = "git+https://github.com/stellar/rs-soroban-env?rev=b08a54a7#b08a54a764eaa7b931503dd1a46ad72c1bcf7a2e" dependencies = [ "backtrace", "dyn-fmt", @@ -950,8 +950,8 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "0.0.4" -source = "git+https://github.com/stellar/rs-soroban-env?rev=bd3dc8d2#bd3dc8d2efb042022c598eec0e63bd88deb9f65d" +version = "0.0.5" +source = "git+https://github.com/stellar/rs-soroban-env?rev=b08a54a7#b08a54a764eaa7b931503dd1a46ad72c1bcf7a2e" dependencies = [ "itertools", "proc-macro2", @@ -962,8 +962,8 @@ dependencies = [ [[package]] name = "soroban-native-sdk-macros" -version = "0.0.4" -source = "git+https://github.com/stellar/rs-soroban-env?rev=bd3dc8d2#bd3dc8d2efb042022c598eec0e63bd88deb9f65d" +version = "0.0.5" +source = "git+https://github.com/stellar/rs-soroban-env?rev=b08a54a7#b08a54a764eaa7b931503dd1a46ad72c1bcf7a2e" dependencies = [ "itertools", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 90d2bc352..646bf8aa0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,11 +26,11 @@ soroban-sdk = { path = "soroban-sdk" } soroban-auth = { path = "soroban-auth" } soroban-spec = { path = "soroban-spec" } soroban-sdk-macros = { path = "soroban-sdk-macros" } -soroban-env-common = { git = "https://github.com/stellar/rs-soroban-env", rev = "bd3dc8d2" } -soroban-env-guest = { git = "https://github.com/stellar/rs-soroban-env", rev = "bd3dc8d2" } -soroban-env-host = { git = "https://github.com/stellar/rs-soroban-env", rev = "bd3dc8d2" } -soroban-env-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "bd3dc8d2" } -soroban-native-sdk-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "bd3dc8d2" } +soroban-env-common = { git = "https://github.com/stellar/rs-soroban-env", rev = "b08a54a7" } +soroban-env-guest = { git = "https://github.com/stellar/rs-soroban-env", rev = "b08a54a7" } +soroban-env-host = { git = "https://github.com/stellar/rs-soroban-env", rev = "b08a54a7" } +soroban-env-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "b08a54a7" } +soroban-native-sdk-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "b08a54a7" } stellar-xdr = { git = "https://github.com/stellar/rs-stellar-xdr", rev = "fee9a43" } # soroban-env-common = { path = "../rs-soroban-env/soroban-env-common" } diff --git a/soroban-sdk-macros/Cargo.toml b/soroban-sdk-macros/Cargo.toml index bdaee19e3..7f16e2699 100644 --- a/soroban-sdk-macros/Cargo.toml +++ b/soroban-sdk-macros/Cargo.toml @@ -16,7 +16,7 @@ doctest = false [dependencies] soroban-spec = "0.0.4" -soroban-env-common = "0.0.4" +soroban-env-common = "0.0.5" stellar-xdr = { version = "0.0.2", features = ["next", "std"] } syn = {version="1.0",features=["full"]} quote = "1.0" diff --git a/soroban-sdk/Cargo.toml b/soroban-sdk/Cargo.toml index fb41c294f..7405bd601 100644 --- a/soroban-sdk/Cargo.toml +++ b/soroban-sdk/Cargo.toml @@ -19,10 +19,10 @@ bytes-lit = "0.0.3" ed25519-dalek = { version = "1.0.1", optional = true } [target.'cfg(target_family="wasm")'.dependencies] -soroban-env-guest = { version = "0.0.4" } +soroban-env-guest = { version = "0.0.5" } [target.'cfg(not(target_family="wasm"))'.dependencies] -soroban-env-host = { version = "0.0.4", features = ["vm"] } +soroban-env-host = { version = "0.0.5", features = ["vm"] } [dev-dependencies] stellar-xdr = { version = "0.0.2", features = ["next", "std"] } diff --git a/soroban-spec/Cargo.toml b/soroban-spec/Cargo.toml index 2a5663d66..4f62b400a 100644 --- a/soroban-spec/Cargo.toml +++ b/soroban-spec/Cargo.toml @@ -12,7 +12,7 @@ rust-version = "1.63" [dependencies] stellar-xdr = { version = "0.0.2", features = ["next", "std"] } -soroban-env-host = { version = "0.0.4", features = ["vm", "serde"] } +soroban-env-host = { version = "0.0.5", features = ["vm", "serde"] } base64 = "0.13.0" thiserror = "1.0.32" syn = {version="1.0",features=["full"]}