From ad2d398a2119d5b34a871f6ad931659286b3b766 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 11:42:41 -0800 Subject: [PATCH 01/38] Run ts tests on win/mac --- .github/workflows/bindings-ts.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 957661c4c..ceb090907 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -8,7 +8,11 @@ on: jobs: test: name: test generated libraries - runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest-16-cores, macos-latest, windows-latest-8-cores] + runs-on: ${{ matrix.os }} services: rpc: image: stellar/quickstart:testing From b1c8af482c9f72e53de8ed31ad97f097f3f3aebf Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 11:57:11 -0800 Subject: [PATCH 02/38] docker test --- .github/workflows/bindings-ts.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index ceb090907..f5ce998df 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -13,20 +13,20 @@ jobs: matrix: os: [ubuntu-latest-16-cores, macos-latest, windows-latest-8-cores] runs-on: ${{ matrix.os }} - services: - rpc: - image: stellar/quickstart:testing - ports: - - 8000:8000 - env: - ENABLE_LOGS: true - NETWORK: local - ENABLE_SOROBAN_RPC: true - options: >- - --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" - --health-interval 10s - --health-timeout 5s - --health-retries 50 +# services: +# rpc: +# image: stellar/quickstart:testing +# ports: +# - 8000:8000 +# env: +# ENABLE_LOGS: true +# NETWORK: local +# ENABLE_SOROBAN_RPC: true +# options: >- +# --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" +# --health-interval 10s +# --health-timeout 5s +# --health-retries 50 steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -38,6 +38,7 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - run: docker --version - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From d2b2c6eadd71b89e28c0e74213011b8b218393ae Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 11:58:08 -0800 Subject: [PATCH 03/38] docker macos --- .github/workflows/bindings-ts.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index f5ce998df..9e46c07f5 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -38,6 +38,11 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Setup docker (missing on MacOS) + if: runner.os == 'macos' + run: | + brew install docker + colima start - run: docker --version - run: rustup update - run: cargo build From 1fc00fed2b9f47d9cc2994d46c33e1641a88f5d9 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:17:10 -0800 Subject: [PATCH 04/38] quickstart in docker --- .github/workflows/bindings-ts.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 9e46c07f5..4d730582e 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -43,7 +43,16 @@ jobs: run: | brew install docker colima start - - run: docker --version + - name: Run quickstart + run: | + container=`docker run stellar/quickstart:testing \ + -d -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ + --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" + --health-interval 10s + --health-timeout 5s + --health-retries 50` + echo "CONTAINER=${container}" >> $GITHUB_ENV + - run: echo $CONTAINER - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From 8b74c49aeb87b5b8980f4de4b558223dabc6853d Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:21:27 -0800 Subject: [PATCH 05/38] Fix typo --- .github/workflows/bindings-ts.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 4d730582e..885512edd 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -47,9 +47,9 @@ jobs: run: | container=`docker run stellar/quickstart:testing \ -d -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ - --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" - --health-interval 10s - --health-timeout 5s + --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" \ + --health-interval 10s \ + --health-timeout 5s \ --health-retries 50` echo "CONTAINER=${container}" >> $GITHUB_ENV - run: echo $CONTAINER From 0423e6c3ff42a3782b6ff593548949e9a8cdefba Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:23:32 -0800 Subject: [PATCH 06/38] Fix typo --- .github/workflows/bindings-ts.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 885512edd..eea85a6ac 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -45,8 +45,8 @@ jobs: colima start - name: Run quickstart run: | - container=`docker run stellar/quickstart:testing \ - -d -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ + container=`docker run -d stellar/quickstart:testing \ + -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" \ --health-interval 10s \ --health-timeout 5s \ From c5ca55b3a32cb950682fb2175ac34e03431e8656 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:27:01 -0800 Subject: [PATCH 07/38] fixes --- .github/workflows/bindings-ts.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index eea85a6ac..22f318809 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -42,17 +42,16 @@ jobs: if: runner.os == 'macos' run: | brew install docker - colima start +# colima start - name: Run quickstart run: | - container=`docker run -d stellar/quickstart:testing \ + docker run -d --name quickstart stellar/quickstart:testing \ -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" \ --health-interval 10s \ --health-timeout 5s \ - --health-retries 50` - echo "CONTAINER=${container}" >> $GITHUB_ENV - - run: echo $CONTAINER + --health-retries 50 + - run: docker wait quickstart - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From 7be111a44eb8ee43f27f0f435afe2bd45bb9d315 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:31:16 -0800 Subject: [PATCH 08/38] inspect --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 22f318809..5576e6e2a 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -51,7 +51,7 @@ jobs: --health-interval 10s \ --health-timeout 5s \ --health-retries 50 - - run: docker wait quickstart + - run: docker inspect -f {{.State.Running}} quickstart - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From 9aab5ce1944aca7dde5b6c9897fe6422ab699e66 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:34:56 -0800 Subject: [PATCH 09/38] fixes --- .github/workflows/bindings-ts.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 5576e6e2a..240365264 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -42,7 +42,8 @@ jobs: if: runner.os == 'macos' run: | brew install docker -# colima start + brew install colima + colima start - name: Run quickstart run: | docker run -d --name quickstart stellar/quickstart:testing \ @@ -51,7 +52,7 @@ jobs: --health-interval 10s \ --health-timeout 5s \ --health-retries 50 - - run: docker inspect -f {{.State.Running}} quickstart + - run: docker inspect -f {{.State.Health.Status}} quickstart - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From d1da37257ec5cd21be671372d4fac32c971760db Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:36:59 -0800 Subject: [PATCH 10/38] fixes --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 240365264..e39ca35b3 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -52,7 +52,7 @@ jobs: --health-interval 10s \ --health-timeout 5s \ --health-retries 50 - - run: docker inspect -f {{.State.Health.Status}} quickstart + - run: docker inspect quickstart - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From 2888a09a9b70c9fe05d4a897c5527fa00f6b2ebb Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:44:04 -0800 Subject: [PATCH 11/38] wait for qs --- .github/workflows/bindings-ts.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index e39ca35b3..f84019bcc 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -46,13 +46,16 @@ jobs: colima start - name: Run quickstart run: | - docker run -d --name quickstart stellar/quickstart:testing \ + docker run -d --name quickstart \ -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" \ --health-interval 10s \ --health-timeout 5s \ - --health-retries 50 - - run: docker inspect quickstart + --health-retries 50 \ + stellar/quickstart:testing + until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do + sleep 0.1; + done; - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From a5770408aa7e59dd58d1c49c0393c1172a38df69 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 12:48:20 -0800 Subject: [PATCH 12/38] add docker logs and downgrade mac version --- .github/workflows/bindings-ts.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index f84019bcc..56b4eddd8 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -11,22 +11,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest-16-cores, macos-latest, windows-latest-8-cores] + os: [ubuntu-latest-16-cores, macos-13, windows-latest-8-cores] runs-on: ${{ matrix.os }} -# services: -# rpc: -# image: stellar/quickstart:testing -# ports: -# - 8000:8000 -# env: -# ENABLE_LOGS: true -# NETWORK: local -# ENABLE_SOROBAN_RPC: true -# options: >- -# --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" -# --health-interval 10s -# --health-timeout 5s -# --health-retries 50 steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -62,3 +48,6 @@ jobs: - run: make build-test-wasms - run: npm ci && npm run test working-directory: cmd/crates/soroban-spec-typescript/ts-tests + - name: quickstart logs + if: always() + run: docker logs quickstart From 90db73b67482a4dabd350334babd69957bcfc8d4 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 13:05:15 -0800 Subject: [PATCH 13/38] powershell... --- .github/workflows/bindings-ts.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 56b4eddd8..7fef8f31c 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -32,13 +32,8 @@ jobs: colima start - name: Run quickstart run: | - docker run -d --name quickstart \ - -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true \ - --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" \ - --health-interval 10s \ - --health-timeout 5s \ - --health-retries 50 \ - stellar/quickstart:testing + docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing + - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; done; From cfaffdf21321f39d3b2a637bbb34688e9fc3ec02 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 5 Dec 2024 14:16:47 -0800 Subject: [PATCH 14/38] tmp: remove health checks --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 7fef8f31c..f4f13679c 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -32,7 +32,7 @@ jobs: colima start - name: Run quickstart run: | - docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing + docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; From e95f8408f47127cad11b8ac250337c1dacd83488 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 10 Dec 2024 11:42:47 -0800 Subject: [PATCH 15/38] add WSL --- .github/workflows/bindings-ts.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index f4f13679c..d57b45a7f 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -30,13 +30,20 @@ jobs: brew install docker brew install colima colima start + - name: Configure WSL + if: runner.os == 'windows' + run: | + wsl --update + wsl --install -d Ubuntu-24.04 - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing + shell: bash - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; done; + shell: bash - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From 4a992e5719184270fe6247c0e87c1d655fe6a003 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 10 Dec 2024 11:53:51 -0800 Subject: [PATCH 16/38] i love windows --- .github/workflows/bindings-ts.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index d57b45a7f..3338fa66b 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -33,8 +33,8 @@ jobs: - name: Configure WSL if: runner.os == 'windows' run: | - wsl --update - wsl --install -d Ubuntu-24.04 + wsl --update --web-download + wsl --install --web-download -d Ubuntu-24.04 - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing From 8381dfa3dea6620ace660f3ae066ec0bcd694241 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 10 Dec 2024 12:08:50 -0800 Subject: [PATCH 17/38] trying ubuntu 22 --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 3338fa66b..28f09e69f 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -34,7 +34,7 @@ jobs: if: runner.os == 'windows' run: | wsl --update --web-download - wsl --install --web-download -d Ubuntu-24.04 + wsl --install --web-download -d Ubuntu-22.04 - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing From c9876a7fe34b7d56eacaee25ff5c5c32f9433654 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:01:23 -0800 Subject: [PATCH 18/38] Ubuntu WSL action --- .github/workflows/bindings-ts.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 28f09e69f..0efa0d30c 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -30,11 +30,11 @@ jobs: brew install docker brew install colima colima start - - name: Configure WSL + - name: Install or update WSL if: runner.os == 'windows' - run: | - wsl --update --web-download - wsl --install --web-download -d Ubuntu-22.04 + uses: Ubuntu/WSL/.github/actions/wsl-install@main + with: + distro: Ubuntu - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing From c832c2a3513ab946c7f813c0c16efbe2026bb268 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:05:03 -0800 Subject: [PATCH 19/38] winget --- .github/workflows/bindings-ts.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 0efa0d30c..8a64657a7 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -30,9 +30,11 @@ jobs: brew install docker brew install colima colima start + - name: Install winget + uses: Cyberboss/install-winget@1c6f189175e9f015bf1aa113cd1cc6c73efb9d47 - name: Install or update WSL if: runner.os == 'windows' - uses: Ubuntu/WSL/.github/actions/wsl-install@main + uses: Ubuntu/WSL/.github/actions/wsl-install@7ebeb4e1dabf44381674461f8c4da4dc8cd99b33 with: distro: Ubuntu - name: Run quickstart From a05dd0775e0f9fa5526556c88f030409b5ff3441 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:35:07 -0800 Subject: [PATCH 20/38] trying setup-wsl --- .github/workflows/bindings-ts.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 8a64657a7..f4b3381a3 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -30,13 +30,17 @@ jobs: brew install docker brew install colima colima start - - name: Install winget - uses: Cyberboss/install-winget@1c6f189175e9f015bf1aa113cd1cc6c73efb9d47 - - name: Install or update WSL + - name: Install wsl if: runner.os == 'windows' - uses: Ubuntu/WSL/.github/actions/wsl-install@7ebeb4e1dabf44381674461f8c4da4dc8cd99b33 - with: - distro: Ubuntu + uses: vedantmgoyal9/setup-wsl2@main + - run: apt update && apt upgrade -y + if: runner.os == 'windows' + shell: wsl-run {0} # add this to run the commands inside linux + - run: ls -la + if: runner.os == 'windows' + shell: wsl-run {0} + - run: ls -la + shell: bash - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing From 2bd979f05558c71725490d10e440269e69e6d0f2 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:39:33 -0800 Subject: [PATCH 21/38] try wsl shell --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index f4b3381a3..d7ad8b687 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -44,7 +44,7 @@ jobs: - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing - shell: bash + shell: wsl-run {0} - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; From fd6b0b83b987fb5d342859a5bc53a3224c1ede07 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:46:15 -0800 Subject: [PATCH 22/38] Win docker --- .github/workflows/bindings-ts.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index d7ad8b687..f55ee7832 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -33,7 +33,22 @@ jobs: - name: Install wsl if: runner.os == 'windows' uses: vedantmgoyal9/setup-wsl2@main - - run: apt update && apt upgrade -y + - run: | + # Add Docker's official GPG key: + sudo apt-get update + sudo apt-get install ca-certificates curl + sudo install -m 0755 -d /etc/apt/keyrings + sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc + sudo chmod a+r /etc/apt/keyrings/docker.asc + + # Add the repository to Apt sources: + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update + sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + sudo docker run hello-world if: runner.os == 'windows' shell: wsl-run {0} # add this to run the commands inside linux - run: ls -la From a61d36c07e671694797ea7d6851b2e52def06b66 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:50:41 -0800 Subject: [PATCH 23/38] --yes --- .github/workflows/bindings-ts.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index f55ee7832..c29f453a0 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -36,7 +36,7 @@ jobs: - run: | # Add Docker's official GPG key: sudo apt-get update - sudo apt-get install ca-certificates curl + sudo apt-get install --yes ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc @@ -47,7 +47,7 @@ jobs: $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update - sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + sudo apt-get install --yes docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo docker run hello-world if: runner.os == 'windows' shell: wsl-run {0} # add this to run the commands inside linux From 89154d07266cebe381fd95668b29f49513006a2f Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 11:57:03 -0800 Subject: [PATCH 24/38] systemctl --- .github/workflows/bindings-ts.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index c29f453a0..c54ae5b66 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -48,6 +48,9 @@ jobs: sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install --yes docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + sudo systemctl start docker.socket + sudo systemctl start docker.service + sudo systemctl status docker.service sudo docker run hello-world if: runner.os == 'windows' shell: wsl-run {0} # add this to run the commands inside linux From df5d4d8a7cd9ed735d86948e29289df88b831bd2 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 12:05:03 -0800 Subject: [PATCH 25/38] repairing systemd --- .github/workflows/bindings-ts.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index c54ae5b66..da3f63da4 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -33,7 +33,23 @@ jobs: - name: Install wsl if: runner.os == 'windows' uses: vedantmgoyal9/setup-wsl2@main + - name: Enable systemd + if: runner.os == 'windows' + run: | + echo "[boot] + systemd=true" > /etc/wsl.conf + shell: wsl-run {0} + - name: Restart WSL + if: runner.os == 'windows' + run: | + Write-Output 'Restarting WSL...' + wsl --shutdown + # https://learn.microsoft.com/en-us/windows/wsl/wsl-config#the-8-second-rule-for-configuration-changes + # although the documentation says 8 seconds, we wait for 10 seconds to be safe + Start-Sleep -Seconds 10 - run: | + systemctl list-unit-files --type=service + # Add Docker's official GPG key: sudo apt-get update sudo apt-get install --yes ca-certificates curl From 4161abb35715367ace834297d69cb8849630a4f2 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 13:43:44 -0800 Subject: [PATCH 26/38] cleanup --- .github/workflows/bindings-ts.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index da3f63da4..eda474f3f 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -30,9 +30,10 @@ jobs: brew install docker brew install colima colima start + - name: Install wsl if: runner.os == 'windows' - uses: vedantmgoyal9/setup-wsl2@main + uses: vedantmgoyal9/setup-wsl2@4edf825c69cdaad7d6a852f57c9446f83fea8b91 - name: Enable systemd if: runner.os == 'windows' run: | @@ -69,16 +70,11 @@ jobs: sudo systemctl status docker.service sudo docker run hello-world if: runner.os == 'windows' - shell: wsl-run {0} # add this to run the commands inside linux - - run: ls -la - if: runner.os == 'windows' shell: wsl-run {0} - - run: ls -la - shell: bash - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing - shell: wsl-run {0} + shell: bash - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; From cbd26c681279865a41502b7364fffaa5081e6a09 Mon Sep 17 00:00:00 2001 From: Gleb Date: Thu, 12 Dec 2024 13:49:00 -0800 Subject: [PATCH 27/38] Bring back the health check --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index eda474f3f..5762bfa5c 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -73,7 +73,7 @@ jobs: shell: wsl-run {0} - name: Run quickstart run: | - docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true stellar/quickstart:testing + docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing shell: bash - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do From c04c0f5553006a21141671b2ed56671d32394a4a Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:11:04 -0800 Subject: [PATCH 28/38] windows tests --- .github/workflows/bindings-ts.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 5762bfa5c..b5bd1f891 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -84,7 +84,21 @@ jobs: - run: cargo build - run: rustup target add wasm32-unknown-unknown - run: make build-test-wasms - - run: npm ci && npm run test + - run: npm ci + if: runner.os != 'windows' + working-directory: cmd/crates/soroban-spec-typescript/ts-tests + - run: | + npm ci --ignore-scripts + cargo run --quiet -p stellar-cli -- "keys generate root" + cargo run --quiet -p stellar-cli -- "keys fund root" + $contract_id=(cargo run --quiet -p stellar-cli -- "contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-checks") + cargo run --quiet -p stellar-cli -- contract bindings typescript --contract-id $contract_id --output-dir ./node_modules/test-custom-types --overwrite + cd ./node_modules/test-custom-types + npm install + npm run build + if: runner.os == 'windows' + working-directory: cmd/crates/soroban-spec-typescript/ts-tests + - run: npm run test working-directory: cmd/crates/soroban-spec-typescript/ts-tests - name: quickstart logs if: always() From c9890cba188cabf2914fd0f975d53f1e58ec0636 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:22:37 -0800 Subject: [PATCH 29/38] Fixes --- .github/workflows/bindings-ts.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index b5bd1f891..29b7e7c36 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -11,8 +11,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest-16-cores, macos-13, windows-latest-8-cores] - runs-on: ${{ matrix.os }} + sys: + - os: ubuntu-latest-16-cores + shell: bash + - os: macos-13 + shell: bash + - os: windows-latest-8-cores + shell: 'wsl-run {0}' + runs-on: ${{ matrix.sys.os }} steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -30,10 +36,10 @@ jobs: brew install docker brew install colima colima start - - name: Install wsl if: runner.os == 'windows' uses: vedantmgoyal9/setup-wsl2@4edf825c69cdaad7d6a852f57c9446f83fea8b91 + # https://github.com/vedantmgoyal9/setup-wsl2/issues/3 - name: Enable systemd if: runner.os == 'windows' run: | @@ -70,16 +76,16 @@ jobs: sudo systemctl status docker.service sudo docker run hello-world if: runner.os == 'windows' - shell: wsl-run {0} + shell: ${{ matrix.sys.shell }} - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing - shell: bash + shell: ${{ matrix.sys.shell }} - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; done; - shell: bash + shell: ${{ matrix.sys.shell }} - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From afbf34ca0600ea81f525623bf09121084fcf2de5 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:28:35 -0800 Subject: [PATCH 30/38] small fix --- .github/workflows/bindings-ts.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 29b7e7c36..87e340486 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -75,8 +75,8 @@ jobs: sudo systemctl start docker.service sudo systemctl status docker.service sudo docker run hello-world - if: runner.os == 'windows' - shell: ${{ matrix.sys.shell }} + if: runner.os == 'windows' + shell: wsl-run {0} - name: Run quickstart run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing From 465275a917a9834c81a4bd4847e649808d1593c8 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:32:30 -0800 Subject: [PATCH 31/38] refactoring --- .github/workflows/bindings-ts.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 87e340486..fd8b6d747 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -54,7 +54,9 @@ jobs: # https://learn.microsoft.com/en-us/windows/wsl/wsl-config#the-8-second-rule-for-configuration-changes # although the documentation says 8 seconds, we wait for 10 seconds to be safe Start-Sleep -Seconds 10 - - run: | + - name: Install Docker + if: runner.os == 'windows' + run: | systemctl list-unit-files --type=service # Add Docker's official GPG key: @@ -75,7 +77,6 @@ jobs: sudo systemctl start docker.service sudo systemctl status docker.service sudo docker run hello-world - if: runner.os == 'windows' shell: wsl-run {0} - name: Run quickstart run: | From c35329d21007358e16d7b332507f7bb6a1a93f5c Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:37:43 -0800 Subject: [PATCH 32/38] windows... --- .github/workflows/bindings-ts.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index fd8b6d747..e7cbe0359 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -78,15 +78,26 @@ jobs: sudo systemctl status docker.service sudo docker run hello-world shell: wsl-run {0} - - name: Run quickstart - run: | + - run: | + docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing + if: runner.os != 'windows' + shell: bash + - run: | + until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do + sleep 0.1; + done; + if: runner.os != 'windows' + shell: bash + - run: | docker run -d --name quickstart -p 8000:8000 -e ENABLE_LOGS=true -e NETWORK=local -e ENABLE_SOROBAN_RPC=true --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout 5s --health-retries 50 stellar/quickstart:testing - shell: ${{ matrix.sys.shell }} + if: runner.os == 'windows' + shell: wsl-run {0} - run: | until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; done; - shell: ${{ matrix.sys.shell }} + if: runner.os == 'windows' + shell: wsl-run {0} - run: rustup update - run: cargo build - run: rustup target add wasm32-unknown-unknown From 20f0326c9f50e1b7851f8ee584c6a2be39d4860e Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:51:36 -0800 Subject: [PATCH 33/38] fixes --- .github/workflows/bindings-ts.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index e7cbe0359..e2347bfe6 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -11,14 +11,8 @@ jobs: strategy: fail-fast: false matrix: - sys: - - os: ubuntu-latest-16-cores - shell: bash - - os: macos-13 - shell: bash - - os: windows-latest-8-cores - shell: 'wsl-run {0}' - runs-on: ${{ matrix.sys.os }} + os: [ubuntu-latest-16-cores, macos-13, windows-latest-8-cores] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -107,9 +101,9 @@ jobs: working-directory: cmd/crates/soroban-spec-typescript/ts-tests - run: | npm ci --ignore-scripts - cargo run --quiet -p stellar-cli -- "keys generate root" - cargo run --quiet -p stellar-cli -- "keys fund root" - $contract_id=(cargo run --quiet -p stellar-cli -- "contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-checks") + cargo run --quiet -p stellar-cli -- keys generate root + cargo run --quiet -p stellar-cli -- keys fund root + $contract_id=(cargo run --quiet -p stellar-cli -- contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-check cargo run --quiet -p stellar-cli -- contract bindings typescript --contract-id $contract_id --output-dir ./node_modules/test-custom-types --overwrite cd ./node_modules/test-custom-types npm install From a8775f27a41d407918d319840ec27c25f3a71391 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 15:59:24 -0800 Subject: [PATCH 34/38] logs --- .github/workflows/bindings-ts.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index e2347bfe6..2dc310e16 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -97,7 +97,7 @@ jobs: - run: rustup target add wasm32-unknown-unknown - run: make build-test-wasms - run: npm ci - if: runner.os != 'windows' + if: runner.os != 'windows' working-directory: cmd/crates/soroban-spec-typescript/ts-tests - run: | npm ci --ignore-scripts @@ -113,5 +113,9 @@ jobs: - run: npm run test working-directory: cmd/crates/soroban-spec-typescript/ts-tests - name: quickstart logs - if: always() + if: always() && runner.os != 'windows' + run: docker logs quickstart + - name: quickstart logs + if: always() && runner.os == 'windows' run: docker logs quickstart + shell: wsl-run {0} From 8ddb1e669f82c2198515c76b20298012cd2b5533 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 16:14:28 -0800 Subject: [PATCH 35/38] fix --- .github/workflows/bindings-ts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 2dc310e16..cc92ede8a 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -103,7 +103,7 @@ jobs: npm ci --ignore-scripts cargo run --quiet -p stellar-cli -- keys generate root cargo run --quiet -p stellar-cli -- keys fund root - $contract_id=(cargo run --quiet -p stellar-cli -- contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-check + $contract_id=(cargo run --quiet -p stellar-cli -- contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-check) cargo run --quiet -p stellar-cli -- contract bindings typescript --contract-id $contract_id --output-dir ./node_modules/test-custom-types --overwrite cd ./node_modules/test-custom-types npm install From ef440327ffecef4d6deb63dc0f3e8018610fd98f Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 16:25:21 -0800 Subject: [PATCH 36/38] Small fixes --- .github/workflows/bindings-ts.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index cc92ede8a..47790fadf 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -77,6 +77,7 @@ jobs: if: runner.os != 'windows' shell: bash - run: | + docker inspect -f {{.State.Health.Status}} quickstart until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; done; @@ -103,7 +104,7 @@ jobs: npm ci --ignore-scripts cargo run --quiet -p stellar-cli -- keys generate root cargo run --quiet -p stellar-cli -- keys fund root - $contract_id=(cargo run --quiet -p stellar-cli -- contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-check) + $contract_id=(cargo run --quiet -p stellar-cli -- contract deploy --quiet --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-checks) cargo run --quiet -p stellar-cli -- contract bindings typescript --contract-id $contract_id --output-dir ./node_modules/test-custom-types --overwrite cd ./node_modules/test-custom-types npm install From 70ec6734542f6d52a10cd275b54c8521a76f5a13 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 16:32:24 -0800 Subject: [PATCH 37/38] win print health --- .github/workflows/bindings-ts.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 47790fadf..69ec960b4 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -88,6 +88,7 @@ jobs: if: runner.os == 'windows' shell: wsl-run {0} - run: | + docker inspect -f {{.State.Health.Status}} quickstart until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do sleep 0.1; done; From b11293b41d7072c660e0085fdf5277ee42689e92 Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 13 Dec 2024 16:36:44 -0800 Subject: [PATCH 38/38] adjust sleep scripts --- .github/workflows/bindings-ts.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bindings-ts.yml b/.github/workflows/bindings-ts.yml index 69ec960b4..7061501e3 100644 --- a/.github/workflows/bindings-ts.yml +++ b/.github/workflows/bindings-ts.yml @@ -77,9 +77,13 @@ jobs: if: runner.os != 'windows' shell: bash - run: | - docker inspect -f {{.State.Health.Status}} quickstart - until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do - sleep 0.1; + while true; do + status=`docker inspect -f {{.State.Health.Status}} quickstart` + echo "quickstart status: $status" + if [ "$status" == "healthy" ]; then + break + fi + sleep 1; done; if: runner.os != 'windows' shell: bash @@ -88,9 +92,13 @@ jobs: if: runner.os == 'windows' shell: wsl-run {0} - run: | - docker inspect -f {{.State.Health.Status}} quickstart - until [ "`docker inspect -f {{.State.Health.Status}} quickstart`"=="healthy" ]; do - sleep 0.1; + while true; do + status=`docker inspect -f {{.State.Health.Status}} quickstart` + echo "quickstart status: $status" + if [ "$status" == "healthy" ]; then + break + fi + sleep 1; done; if: runner.os == 'windows' shell: wsl-run {0}