Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ad2d398
Run ts tests on win/mac
ifropc Dec 5, 2024
b1c8af4
docker test
ifropc Dec 5, 2024
d2b2c6e
docker macos
ifropc Dec 5, 2024
1fc00fe
quickstart in docker
ifropc Dec 5, 2024
8b74c49
Fix typo
ifropc Dec 5, 2024
0423e6c
Fix typo
ifropc Dec 5, 2024
c5ca55b
fixes
ifropc Dec 5, 2024
7be111a
inspect
ifropc Dec 5, 2024
9aab5ce
fixes
ifropc Dec 5, 2024
d1da372
fixes
ifropc Dec 5, 2024
2888a09
wait for qs
ifropc Dec 5, 2024
a577040
add docker logs and downgrade mac version
ifropc Dec 5, 2024
90db73b
powershell...
ifropc Dec 5, 2024
cfaffdf
tmp: remove health checks
ifropc Dec 5, 2024
e95f840
add WSL
ifropc Dec 10, 2024
4a992e5
i love windows
ifropc Dec 10, 2024
8381dfa
trying ubuntu 22
ifropc Dec 10, 2024
c9876a7
Ubuntu WSL action
ifropc Dec 12, 2024
c832c2a
winget
ifropc Dec 12, 2024
a05dd07
trying setup-wsl
ifropc Dec 12, 2024
2bd979f
try wsl shell
ifropc Dec 12, 2024
fd6b0b8
Win docker
ifropc Dec 12, 2024
a61d36c
--yes
ifropc Dec 12, 2024
89154d0
systemctl
ifropc Dec 12, 2024
df5d4d8
repairing systemd
ifropc Dec 12, 2024
4161abb
cleanup
ifropc Dec 12, 2024
cbd26c6
Bring back the health check
ifropc Dec 12, 2024
c04c0f5
windows tests
ifropc Dec 13, 2024
c9890cb
Fixes
ifropc Dec 13, 2024
afbf34c
small fix
ifropc Dec 13, 2024
465275a
refactoring
ifropc Dec 13, 2024
c35329d
windows...
ifropc Dec 13, 2024
20f0326
fixes
ifropc Dec 13, 2024
a8775f2
logs
ifropc Dec 13, 2024
8ddb1e6
fix
ifropc Dec 14, 2024
ef44032
Small fixes
ifropc Dec 14, 2024
70ec673
win print health
ifropc Dec 14, 2024
b11293b
adjust sleep scripts
ifropc Dec 14, 2024
81ee86a
curl test
ifropc Dec 18, 2024
4c0b74a
update test
ifropc Dec 18, 2024
72fc9c4
Add logging
ifropc Dec 18, 2024
95b23a9
Try importing keys
ifropc Dec 18, 2024
75929dc
move to sk into env var
ifropc Dec 19, 2024
1fe783e
friendbot test
ifropc Dec 19, 2024
b7944a0
docker logs
ifropc Dec 19, 2024
2a2a86b
add dummy wait
ifropc Dec 19, 2024
d1f6dea
docker run until failure win
ifropc Dec 19, 2024
85168d7
test
ifropc Dec 19, 2024
5478b08
Merge remote-tracking branch 'origin/main' into multiplatform-ts-bind…
ifropc Dec 19, 2024
88de2c0
Revert "test"
ifropc Dec 19, 2024
8cc3952
add quickstart check
ifropc Dec 19, 2024
7ceabed
Reorder steps
ifropc Dec 19, 2024
0c5c779
reorganize stuff
ifropc Dec 19, 2024
657aec8
Merge branch 'main' into multiplatform-ts-bindings
ifropc Feb 13, 2025
008c0c7
Merge remote-tracking branch 'origin/main' into multiplatform-ts-bind…
ifropc Feb 26, 2025
c3950a4
tmp disable rust and binaries jobs
ifropc Feb 26, 2025
7ef2a53
fix
ifropc Feb 26, 2025
1a13144
reorg
ifropc Feb 26, 2025
1ec44df
add debug curl
ifropc Feb 26, 2025
a6bb221
test
ifropc Feb 26, 2025
98d64f0
test
ifropc Feb 26, 2025
efa6554
Add quickstart logs
ifropc Mar 18, 2025
dc9f917
Update volume
ifropc Mar 18, 2025
4b97514
windows...
ifropc Mar 18, 2025
07f8c66
add docker cp
ifropc Mar 18, 2025
38c72a7
Print all logs
ifropc Mar 18, 2025
bedfa3e
extract container filesystem on windows build failure
leighmcculloch Mar 26, 2025
5e6bef7
undo
leighmcculloch Mar 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Binaries
on:
release:
types: [published]
pull_request:
# pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }}
Expand Down
171 changes: 151 additions & 20 deletions .github/workflows/bindings-ts.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
name: bindings typescript

on:
push:
branches: [main, release/**]
pull_request:
push:
branches: [ main, release/** ]
pull_request:

jobs:
test:
name: test generated libraries
runs-on: ubuntu-22.04
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/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
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest-16-cores, macos-13, windows-latest-8-cores ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v4
with:
Expand All @@ -39,9 +29,150 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
- run: sudo apt update && sudo apt install -y libdbus-1-dev libudev-dev
if: runner.os == 'Linux'
- run: cargo build
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: npm ci && npm run test
working-directory: cmd/crates/soroban-spec-typescript/ts-tests

- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
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: |
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
- name: Install Docker
if: runner.os == 'windows'
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
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 --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
shell: wsl-run {0}
- run: |
docker run -d --name quickstart -p 8000:8000 -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: |
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
- run: |
docker run -d --name quickstart -p 8000:8000 -v /c/a/_temp/logs:/var/log/supervisor/ -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: wsl-run {0}
- run: |
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}
- run: docker container inspect quickstart
shell: wsl-run {0}
- run: curl -v http://localhost:8000/friendbot?addr=GAEXO6GKTWINFBN2PQZPXQIPEA6OTVG2XCUIQQODRKCR7DDZJVXPMGPL
shell: wsl-run {0}
- run: Invoke-RestMethod -Uri http://localhost:8000/friendbot?addr=GAU5TZM3DP7ESCB6HMMG5UIBOYMWBUTS5EIXWRI3O2MC4VXE625VL5OL
- run: Invoke-RestMethod -Uri http://localhost:8000/friendbot?addr=GBCNICNDLG2SQ3AIHJTB3G7AMGR4SZZJISYYQENZR7TETHTZHRCSEAWC
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- run: |
Write-Host "Generating keys"
$env:SOROBAN_SECRET_KEY='SC5NRVW24PTAE2TM4M7VVZSCYUNVCBSZOSNRSHFU2XVYZGNMFV6YVLLX'
cargo run -p stellar-cli -- keys add --secret-key root
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- run: Invoke-RestMethod -Uri http://localhost:8000/friendbot?addr=GBGZY2GOHG7SDZTU6Y74T4EIZBL7XKW4MI6OJIQFMF4EUGAHUK5H7HKF
- run: |
Write-Host "Generating keys"
$env:SOROBAN_SECRET_KEY='SC5NRVW24PTAE2TM4M7VVZSCYUNVCBSZOSNRSHFU2XVYZGNMFV6YVLLX'
cargo run -p stellar-cli -- keys add --secret-key root
Comment on lines +123 to +131
Copy link

Copilot AI May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] A similar key generation step appears to be repeated; consider consolidating these steps to reduce redundancy and simplify maintenance.

Suggested change
Write-Host "Generating keys"
$env:SOROBAN_SECRET_KEY='SC5NRVW24PTAE2TM4M7VVZSCYUNVCBSZOSNRSHFU2XVYZGNMFV6YVLLX'
cargo run -p stellar-cli -- keys add --secret-key root
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- run: Invoke-RestMethod -Uri http://localhost:8000/friendbot?addr=GBGZY2GOHG7SDZTU6Y74T4EIZBL7XKW4MI6OJIQFMF4EUGAHUK5H7HKF
- run: |
Write-Host "Generating keys"
$env:SOROBAN_SECRET_KEY='SC5NRVW24PTAE2TM4M7VVZSCYUNVCBSZOSNRSHFU2XVYZGNMFV6YVLLX'
cargo run -p stellar-cli -- keys add --secret-key root
- name: Generate keys
run: |
Write-Host "Generating keys"
$env:SOROBAN_SECRET_KEY='SC5NRVW24PTAE2TM4M7VVZSCYUNVCBSZOSNRSHFU2XVYZGNMFV6YVLLX'
cargo run -p stellar-cli -- keys add --secret-key root
shell: pwsh
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- run: Invoke-RestMethod -Uri http://localhost:8000/friendbot?addr=GBGZY2GOHG7SDZTU6Y74T4EIZBL7XKW4MI6OJIQFMF4EUGAHUK5H7HKF
- run: |
- name: Generate keys
uses: ./.github/workflows/bindings-ts.yml
with:
step: generate-keys

Copilot uses AI. Check for mistakes.
Write-Host "Deploying contract"
cargo run -p stellar-cli -- contract deploy --alias custom-types --source root --wasm ../../../../target/wasm32-unknown-unknown/test-wasms/test_custom_types.wasm --ignore-checks
Write-Host "Generating bindings"
cargo run --quiet -p stellar-cli -- contract bindings typescript --contract-id custom-types --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 ci
if: runner.os != 'windows'
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- run: |
Write-Host "Running npm build"
npm ci --ignore-scripts
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() && runner.os != 'windows'
run: docker logs quickstart
- name: quickstart logs
if: always() && runner.os == 'windows'
run: |
docker container inspect quickstart
docker container logs quickstart
shell: wsl-run {0}
- name: logs upload
if: always() && runner.os == 'windows'
uses: actions/upload-artifact@v4
with:
name: quickstart-logs
path: C:\a\_temp\logs

- name: Export container filesystem
if: always()
run: |
docker container export -o container-export.tar quickstart
shell: wsl-run {0}

- name: Upload container filesystem
if: always()
uses: actions/upload-artifact@v4
with:
name: container-export
path: container-export.tar
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Rust
on:
push:
branches: [main, release/**]
pull_request:
# pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}
Expand Down
Loading