Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,41 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo test

downstream:
name: Downstream (${{ matrix.repo }})
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- repo: defenseunicorns/peat-node
features: automerge-backend
- repo: defenseunicorns/peat-gateway
features: automerge-backend,broker
steps:
- uses: actions/checkout@v4
with:
path: peat-mesh
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
path: downstream
token: ${{ secrets.DOWNSTREAM_PAT }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: downstream
- name: Point downstream at this peat-mesh revision
run: |
cd downstream
sed -i 's|peat-mesh = {[^}]*}|peat-mesh = { path = "../peat-mesh", features = ["${{ matrix.features }}"] }|' Cargo.toml
- name: Build downstream
run: cargo check --manifest-path downstream/Cargo.toml
- name: Test downstream
run: cargo test --manifest-path downstream/Cargo.toml

audit:
name: Security Audit
continue-on-error: true
Expand Down
39 changes: 38 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,46 @@ jobs:
name: CI
uses: ./.github/workflows/ci.yml

downstream:
name: Downstream (${{ matrix.repo }})
needs: ci
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- repo: defenseunicorns/peat-node
features: automerge-backend
- repo: defenseunicorns/peat-gateway
features: automerge-backend,broker
steps:
- uses: actions/checkout@v4
with:
path: peat-mesh
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
path: downstream
token: ${{ secrets.DOWNSTREAM_PAT }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: downstream
- name: Point downstream at this peat-mesh revision
run: |
cd downstream
# Replace the crates.io dependency with a path dependency
sed -i 's|peat-mesh = {[^}]*}|peat-mesh = { path = "../peat-mesh", features = ["${{ matrix.features }}"] }|' Cargo.toml
echo "--- Cargo.toml dependency ---"
grep peat-mesh Cargo.toml
- name: Build downstream
run: cargo check --manifest-path downstream/Cargo.toml
- name: Test downstream
run: cargo test --manifest-path downstream/Cargo.toml

publish:
name: Publish to crates.io
needs: ci
needs: [ci, downstream]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Loading