Skip to content

Commit d81eae0

Browse files
Merge pull request #46 from Jagadeeshftw/workflows
feat: Add CI Workflow For Soroban Smart Contracts to Automate Build And Test Processes
2 parents 99a3595 + b2599c4 commit d81eae0

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/contract-ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Soroban Smart Contracts CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: macos-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rust
20+
run: |
21+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
22+
source $HOME/.cargo/env
23+
- name: Install Rust target for Soroban
24+
run: |
25+
source $HOME/.cargo/env
26+
rustup target add wasm32v1-none
27+
- name: Install Stellar CLI with Homebrew
28+
run: |
29+
brew update
30+
brew install stellar-cli
31+
stellar --version
32+
- name: Build Cargo project
33+
run: |
34+
source $HOME/.cargo/env
35+
cargo build --verbose
36+
37+
- name: Build Soroban contract
38+
run: |
39+
source $HOME/.cargo/env
40+
stellar contract build --verbose
41+
42+
- name: Run Cargo tests
43+
run: |
44+
source $HOME/.cargo/env
45+
cargo test --verbose
46+

0 commit comments

Comments
 (0)