fix: wire config freeze gating into set_config #75
Workflow file for this run
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
| # ============================================================================= | |
| # ApexChainx Contracts — CI Pipeline | |
| # ============================================================================= | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| client-checks: | |
| name: Client Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.94.1 | |
| with: | |
| targets: wasm32-unknown-unknown | |
| components: rustfmt, clippy | |
| - name: Debug environment | |
| run: | | |
| echo "=== Rust toolchain ===" | |
| rustc --version | |
| cargo --version | |
| rustup show | |
| echo "=== Project structure ===" | |
| ls -la | |
| ls -la apexchainx_calculator/ | |
| echo "=== Cargo.toml ===" | |
| cat apexchainx_calculator/Cargo.toml | |
| - name: Cargo check | |
| working-directory: apexchainx_calculator | |
| run: | | |
| cargo check 2>&1 | tee check.log || (echo "=== Cargo check failed ===" && cat check.log && exit 1) | |
| - name: Format check | |
| working-directory: apexchainx_calculator | |
| run: cargo fmt --check | |
| - name: Clippy | |
| working-directory: apexchainx_calculator | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Build native | |
| working-directory: apexchainx_calculator | |
| run: cargo build | |
| - name: Build WASM | |
| working-directory: apexchainx_calculator | |
| run: cargo build --target wasm32-unknown-unknown | |
| e2e-tests: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Run tests | |
| working-directory: apexchainx_calculator | |
| run: cargo test --lib | |
| provenance-hashes: | |
| name: Provenance & Hashes | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@1.94.1 | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Build WASM release | |
| working-directory: apexchainx_calculator | |
| run: cargo build --target wasm32-unknown-unknown --release | |
| - name: Generate hash | |
| run: | | |
| WASM=target/wasm32-unknown-unknown/release/apexchainx_calculator.wasm | |
| if [ -f "$WASM" ]; then | |
| sha256sum "$WASM" | awk '{print $1 " apexchainx_calculator.wasm"}' > provenance.sha256 | |
| echo "Hash generated successfully" | |
| cat provenance.sha256 | |
| else | |
| echo "WASM file not found at $WASM" | |
| exit 1 | |
| fi | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-provenance-hash | |
| path: provenance.sha256 | |
| retention-days: 30 |