Merge pull request #180 from testersweb0-bug/security/bidirectional-p… #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Build & Lint for Contract | |
| on: | |
| push: | |
| paths: | |
| - 'craft-nexus-contract/**' | |
| - '.github/workflows/contract.yml' | |
| pull_request: | |
| paths: | |
| - 'craft-nexus-contract/**' | |
| - '.github/workflows/contract.yml' | |
| jobs: | |
| build-and-test: | |
| name: Build and Test Contract | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: craft-nexus-contract | |
| steps: | |
| - name: Checkout Source Code | |
| uses: actions/checkout@v4 | |
| - name: Install wasm targets | |
| run: rustup target add wasm32-unknown-unknown wasm32v1-none | |
| - name: Rust Cache Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: craft-nexus-contract | |
| - name: Install Soroban CLI | |
| run: | | |
| wget -q https://github.com/stellar/stellar-cli/releases/download/v25.2.0/stellar-cli-25.2.0-x86_64-unknown-linux-gnu.tar.gz -O stellar-cli.tar.gz | |
| tar xzf stellar-cli.tar.gz | |
| sudo mv stellar /usr/local/bin/stellar | |
| chmod +x /usr/local/bin/stellar | |
| rm stellar-cli.tar.gz | |
| - name: Build, size check, and test contract | |
| run: | | |
| chmod +x ./scripts/build.sh | |
| MAX_WASM_SIZE_BYTES=65536 RUN_TESTS=1 ./scripts/build.sh |