-
Notifications
You must be signed in to change notification settings - Fork 76
79 lines (76 loc) · 2.81 KB
/
bindings-ts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: bindings typescript
on:
push:
branches: [main, release/**]
pull_request:
jobs:
test:
name: test generated libraries
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest-16-cores, macos-13, windows-latest-8-cores]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.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
brew install colima
colima start
- name: Install wsl
if: runner.os == 'windows'
uses: vedantmgoyal9/setup-wsl2@main
- run: |
# 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
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}
- 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
- 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