diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..afecde9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-action@stable + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + + release: + needs: test + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Release + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Build release + run: cargo build --release + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ github.run_number }} + release_name: Release v${{ github.run_number }} + draft: true diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..42c870e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: '3.8' + +services: + builder: + image: rust:1.75-bookworm + container_name: enveil-builder + working_dir: /app + volumes: + - ./code:/app + - cargo-cache:/usr/local/cargo/registry + networks: + - openclaw-network + environment: + - RUST_BACKTRACE=1 + command: ["tail", "-f", "/dev/null"] + +networks: + openclaw-network: + name: openclaw-network + external: true + +volumes: + cargo-cache: