From 01d2188604c2baa287b5568157a63ce65756bb23 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 14 Jun 2023 20:38:50 -0700 Subject: [PATCH 01/18] Experiment with fixing windows builds --- .github/workflows/rust.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 556c5e8c83..813c0ce372 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,7 @@ jobs: cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml done publish-dry-run: - if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') + # if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') strategy: fail-fast: false matrix: @@ -84,9 +84,10 @@ jobs: target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin -# - os: windows-latest -# target: x86_64-pc-windows-msvc + - os: windows-latest + target: x86_64-pc-windows-msvc uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main with: runs-on: ${{ matrix.os }} target: ${{ matrix.target }} + cargo-hack-feature-options: --clean-per-run From 2b55368fd30796ebffc3c5d038a081604b8b9044 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:46:17 -0700 Subject: [PATCH 02/18] add featureset back --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 813c0ce372..5ab9a36690 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,4 +90,4 @@ jobs: with: runs-on: ${{ matrix.os }} target: ${{ matrix.target }} - cargo-hack-feature-options: --clean-per-run + cargo-hack-feature-options: --feature-powerset --clean-per-run From b1d22aaf7ed6fdeefcd4beae93949ff2af0bba75 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:17:48 -0700 Subject: [PATCH 03/18] Revert "add featureset back" This reverts commit 2b55368fd30796ebffc3c5d038a081604b8b9044. --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5ab9a36690..813c0ce372 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,4 +90,4 @@ jobs: with: runs-on: ${{ matrix.os }} target: ${{ matrix.target }} - cargo-hack-feature-options: --feature-powerset --clean-per-run + cargo-hack-feature-options: --clean-per-run From 448e0b408a182070c954ff8c48425bf14e045a91 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:18:19 -0700 Subject: [PATCH 04/18] Revert "Experiment with fixing windows builds" This reverts commit 01d2188604c2baa287b5568157a63ce65756bb23. --- .github/workflows/rust.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 813c0ce372..556c5e8c83 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,7 @@ jobs: cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml done publish-dry-run: - # if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') + if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') strategy: fail-fast: false matrix: @@ -84,10 +84,9 @@ jobs: target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin - - os: windows-latest - target: x86_64-pc-windows-msvc +# - os: windows-latest +# target: x86_64-pc-windows-msvc uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main with: runs-on: ${{ matrix.os }} target: ${{ matrix.target }} - cargo-hack-feature-options: --clean-per-run From 047d30c8d78d586f8c8322070a1f12a0c0695c21 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:42:16 -0700 Subject: [PATCH 05/18] Reenable windows builds with fix --- .github/workflows/publish.yml | 6 +++--- .github/workflows/rust.yml | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6b02c088e5..2d279de05b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,9 +28,9 @@ jobs: target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin -# - os: windows-latest -# target: x86_64-pc-windows-msvc -# ext: .exe + - os: windows-latest + target: x86_64-pc-windows-msvc + ext: .exe runs-on: ${{ matrix.os }} env: VERSION: '${{ github.event.release.name }}' diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 556c5e8c83..b2a7bc37e2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -84,9 +84,14 @@ jobs: target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin -# - os: windows-latest -# target: x86_64-pc-windows-msvc + - os: windows-latest-8-cores + target: x86_64-pc-windows-msvc + cargo-hack-feature-options: --features default + - os: windows-latest-8-cores + target: x86_64-pc-windows-msvc + cargo-hack-feature-options: --features opt uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main with: runs-on: ${{ matrix.os }} target: ${{ matrix.target }} + cargo-hack-feature-options: ${{ matrix.cargo-hack-feature-options | '--feature-powerset' }} From 6d8d95e27bbabeac6a446555530fb3b206315bde Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:46:28 -0700 Subject: [PATCH 06/18] test --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b2a7bc37e2..e28ee7090c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,7 @@ jobs: cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml done publish-dry-run: - if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') + # if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') strategy: fail-fast: false matrix: From 73fef784bd71355cf6554272b6cbdc59046594c1 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:50:14 -0700 Subject: [PATCH 07/18] fix --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e28ee7090c..1fea80ddfe 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,12 +78,16 @@ jobs: include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu + cargo-hack-feature-options: --feature-powerset - os: ubuntu-latest target: aarch64-unknown-linux-gnu + cargo-hack-feature-options: --feature-powerset - os: macos-latest target: x86_64-apple-darwin + cargo-hack-feature-options: --feature-powerset - os: macos-latest target: aarch64-apple-darwin + cargo-hack-feature-options: --feature-powerset - os: windows-latest-8-cores target: x86_64-pc-windows-msvc cargo-hack-feature-options: --features default @@ -94,4 +98,4 @@ jobs: with: runs-on: ${{ matrix.os }} target: ${{ matrix.target }} - cargo-hack-feature-options: ${{ matrix.cargo-hack-feature-options | '--feature-powerset' }} + cargo-hack-feature-options: ${{ matrix.cargo-hack-feature-options }} From c75181079c0cf5df2736fc40f0e2fa3227de7984 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:06:45 -0700 Subject: [PATCH 08/18] fix --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1fea80ddfe..0ea5080460 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -93,7 +93,7 @@ jobs: cargo-hack-feature-options: --features default - os: windows-latest-8-cores target: x86_64-pc-windows-msvc - cargo-hack-feature-options: --features opt + cargo-hack-feature-options: --features opt --ignore-unknown-features uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main with: runs-on: ${{ matrix.os }} From 6dd73fce38e14dbc97f7f91073b224e66ac04544 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:15:40 -0700 Subject: [PATCH 09/18] fix --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0ea5080460..a072603a3b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,7 +90,7 @@ jobs: cargo-hack-feature-options: --feature-powerset - os: windows-latest-8-cores target: x86_64-pc-windows-msvc - cargo-hack-feature-options: --features default + cargo-hack-feature-options: - os: windows-latest-8-cores target: x86_64-pc-windows-msvc cargo-hack-feature-options: --features opt --ignore-unknown-features From efd351469486fe611220949a90c4920228f97b5a Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:15:46 -0700 Subject: [PATCH 10/18] fix --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a072603a3b..ea3857b0ba 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,7 +90,7 @@ jobs: cargo-hack-feature-options: --feature-powerset - os: windows-latest-8-cores target: x86_64-pc-windows-msvc - cargo-hack-feature-options: + cargo-hack-feature-options: '' - os: windows-latest-8-cores target: x86_64-pc-windows-msvc cargo-hack-feature-options: --features opt --ignore-unknown-features From 84eb653af585fbd873b60cb4cc6e0bee96df5563 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:07:11 -0700 Subject: [PATCH 11/18] weird trick --- .cargo-husky/hooks/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo-husky/hooks/pre-push b/.cargo-husky/hooks/pre-push index 53c84b203c..cebc788c39 100755 --- a/.cargo-husky/hooks/pre-push +++ b/.cargo-husky/hooks/pre-push @@ -10,7 +10,7 @@ echo 'git diff-index --quiet HEAD --' git diff-index --quiet HEAD -- echo '+cargo clippy -- -Dwarnings -Dclippy::all -Dclippy::pedantic' -cargo clippy -- -Dwarnings -Dclippy::all -Dclippy::pedantic +cargo clippy -- -Dwarnings -Dclippy::all -Dclippy::pedantic echo '+cargo test' cargo test From 9f6d3b2db6663ef29ad5b9774a533fe86decbc16 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:08:49 -0700 Subject: [PATCH 12/18] add notes --- .github/workflows/rust.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ea3857b0ba..90a43cb0fb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -88,6 +88,27 @@ jobs: - os: macos-latest target: aarch64-apple-darwin cargo-hack-feature-options: --feature-powerset + # Windows builds notes: + # + # Recently the publish-dry-run for windows started failing. This has + # actually been a long running issue + # https://github.com/brson/wasm-opt-rs/issues/116 where repeated builds + # can't remove a file on windows between each build. + # + # This only recently became an issue for us because in + # https://github.com/stellar/soroban-tools/pull/672 we made wasm-opt + # part of an optional feature, and that was the first time we ever had a + # windows build (the publish-dry-run job) where multiple builds occurred + # on the same instance. It was our first feature in soroban-cli leading + # to the first multi-build run. + # + # A fix has been merged to cargo in + # https://github.com/rust-lang/cargo/pull/11442. + # + # In 2-3 months a version of cargo should ship that has the fix. + # + # Until then we can simply run our windows builds with each feature set + # getting its own isolated and fresh instance. - os: windows-latest-8-cores target: x86_64-pc-windows-msvc cargo-hack-feature-options: '' From e7d4906a3c178b92bdb080657fc8e19116260a39 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:11:41 -0700 Subject: [PATCH 13/18] notes --- .github/workflows/rust.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 90a43cb0fb..00e2541092 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,25 +90,15 @@ jobs: cargo-hack-feature-options: --feature-powerset # Windows builds notes: # - # Recently the publish-dry-run for windows started failing. This has - # actually been a long running issue - # https://github.com/brson/wasm-opt-rs/issues/116 where repeated builds - # can't remove a file on windows between each build. + # The different features that need testing are split over unique + # isolated builds for Windows, because there's a bug in Cargo [1] that + # causes builds of wasm-opt [2] to fail when run one after the other and + # attempting to clean up artifacts in between. The bug has been fixed, + # but will not make it into a stable release of Cargo until ~August + # 2023. # - # This only recently became an issue for us because in - # https://github.com/stellar/soroban-tools/pull/672 we made wasm-opt - # part of an optional feature, and that was the first time we ever had a - # windows build (the publish-dry-run job) where multiple builds occurred - # on the same instance. It was our first feature in soroban-cli leading - # to the first multi-build run. - # - # A fix has been merged to cargo in - # https://github.com/rust-lang/cargo/pull/11442. - # - # In 2-3 months a version of cargo should ship that has the fix. - # - # Until then we can simply run our windows builds with each feature set - # getting its own isolated and fresh instance. + # [1]: https://github.com/rust-lang/cargo/pull/11442 + # [2]: https://github.com/brson/wasm-opt-rs/issues/116 - os: windows-latest-8-cores target: x86_64-pc-windows-msvc cargo-hack-feature-options: '' From 2846eab9c111a0b5ee32aed3da0fa86e8aeb7b4f Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:21:58 -0700 Subject: [PATCH 14/18] empty From 873d5f545d247afba0d300ead7303ca480034c69 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:23:30 -0700 Subject: [PATCH 15/18] empty From f130df1ef4780f29ceec450941e58c577d178a5e Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:23:37 -0700 Subject: [PATCH 16/18] push --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 00e2541092..d63b42896d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,7 +2,7 @@ name: Rust on: push: - branches: [main, release/**] + #branches: [main, release/**] pull_request: env: From ed1514f3c04b5c05660dbcaff3424c79af352ed0 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:13:25 -0700 Subject: [PATCH 17/18] Update rust.yml --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2922c874a5..8f7670e683 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,7 +2,7 @@ name: Rust on: push: - #branches: [main, release/**] + branches: [main, release/**] pull_request: env: From d3b01b8848887e436aa642fe8e0c761232de0008 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Sat, 17 Jun 2023 09:04:15 -0700 Subject: [PATCH 18/18] merge --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8f7670e683..ba794fa076 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,7 @@ jobs: cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml done publish-dry-run: - # if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') + if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') strategy: fail-fast: false matrix: