feat: introduce spiffe-rustls crate for rustls integration #841
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
| name: Build | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| setup-and-lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Install toolchain | |
| uses: ./.github/actions/setup-env | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cache Project | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| shared-key: ${{ runner.os }}-cargo | |
| - name: Lint code with rustfmt and clippy | |
| run: | | |
| cargo +nightly fmt -- --check | |
| cargo clippy --all-targets -- -D warnings | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| needs: setup-and-lint | |
| env: | |
| SPIFFE_ENDPOINT_SOCKET: unix:/tmp/spire-agent/public/api.sock | |
| SPIRE_ADMIN_ENDPOINT_SOCKET: unix:/tmp/spire-agent/admin/api.sock | |
| RUST_BACKTRACE: "1" | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Install toolchain | |
| uses: ./.github/actions/setup-env | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cache Project | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| shared-key: ${{ runner.os }}-cargo | |
| - name: Build workspace (default features) | |
| run: cargo build --workspace --all-targets | |
| - name: Test workspace | |
| run: cargo test --workspace | |
| - name: Build spiffe-rustls (aws-lc-rs) | |
| run: cargo build -p spiffe-rustls --no-default-features --features aws-lc-rs --all-targets | |
| - name: Test spiffe-rustls (aws-lc-rs) | |
| run: cargo test -p spiffe-rustls --no-default-features --features aws-lc-rs | |
| - name: Build spiffe-rustls examples (tcp) | |
| run: cargo build -p spiffe-rustls --features tcp-examples --examples | |
| - name: Build spiffe-rustls examples (grpc) | |
| run: cargo build -p spiffe-rustls --features grpc-examples --examples | |
| - name: Start SPIRE | |
| run: .github/workflows/scripts/run-spire.sh | |
| - name: Run Integration Tests | |
| run: cargo test --features integration-tests | |
| - name: Clean up SPIRE | |
| if: ${{ always() }} | |
| run: .github/workflows/scripts/cleanup-spire.sh |