Use vsock.sock instead of vsock.sock_3 #34
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: Deploy Node Daemon | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'crates/**' | |
| - 'packages/contract/proto/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| workflow_dispatch: | |
| concurrency: | |
| group: deploy-node | |
| cancel-in-progress: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: Test & Lint Rust | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| targets: x86_64-unknown-linux-musl | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install protobuf compiler and musl tools | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler musl-tools | |
| - name: Test sandchest-agent | |
| run: cargo test -p sandchest-agent | |
| - name: Test sandchest-node | |
| run: cargo test -p sandchest-node | |
| - run: cargo clippy --workspace -- -D warnings | |
| build-and-upload: | |
| name: Build & Upload to R2 | |
| needs: check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install protobuf compiler and musl tools | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler musl-tools | |
| - name: Build release binary (static musl) | |
| run: cargo build --release --package sandchest-node --target x86_64-unknown-linux-musl | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sandchest-node-${{ github.sha }} | |
| path: target/x86_64-unknown-linux-musl/release/sandchest-node | |
| retention-days: 30 | |
| - name: Upload binary to R2 | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: auto | |
| run: | | |
| aws s3 cp target/x86_64-unknown-linux-musl/release/sandchest-node \ | |
| "s3://${{ secrets.R2_BUCKET }}/binaries/sandchest-node/${{ github.sha }}/sandchest-node" \ | |
| --endpoint-url "${{ secrets.R2_ENDPOINT }}" | |
| aws s3 cp target/x86_64-unknown-linux-musl/release/sandchest-node \ | |
| "s3://${{ secrets.R2_BUCKET }}/binaries/sandchest-node/latest/sandchest-node" \ | |
| --endpoint-url "${{ secrets.R2_ENDPOINT }}" | |
| # Deployment to individual nodes is handled via the admin app's | |
| # "Deploy Daemon" button, which pulls the binary from R2. | |
| # No direct SSH needed — scales to any number of servers. |