fix: Comment out the publish job in release workflow #24
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: Check & Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| # aperture-ebpf is no_std/bpf-target only; skip it in the stable check job | |
| run: cargo clippy --workspace --all-targets --exclude aperture-ebpf -- -D warnings | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| # exercise all workspace crates except eBPF (build tool) | |
| run: cargo test --workspace --exclude aperture-ebpf | |
| ui: | |
| name: UI Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ui | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: ui/package-lock.json | |
| - run: npm ci | |
| - run: npx tsc --noEmit | |
| - run: npx vite build | |
| docs: | |
| name: Docs Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs-site | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: docs-site/package-lock.json | |
| - run: npm ci | |
| - run: npm run build | |
| build-binaries: | |
| name: Build (${{ matrix.target }}) | |
| needs: [check, test] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| artifact: aperture-linux-amd64 | |
| build_cli: true | |
| build_agent: true | |
| - target: aarch64-unknown-linux-gnu | |
| artifact: aperture-linux-arm64 | |
| build_cli: false | |
| build_agent: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cross-compilation tools | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Install lld (needed for -fuse-ld=lld) | |
| run: sudo apt-get install -y lld || true | |
| - name: Install bpf-linker deps and bpf-linker | |
| run: | | |
| sudo apt-get install -y llvm libclang-dev clang | |
| cargo +nightly install --git https://github.com/aya-rs/bpf-linker bpf-linker | |
| - name: Build eBPF programs | |
| run: | | |
| # Build eBPF programs to catch regressions; outputs consumed by agent | |
| cargo +nightly build-ebpf --release | |
| - name: Build aggregator | |
| run: cargo build --release --bin aperture-aggregator --target ${{ matrix.target }} | |
| env: | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
| - name: Build CLI | |
| if: matrix.build_cli | |
| run: cargo build --release --bin aperture --target ${{ matrix.target }} | |
| - name: Build agent | |
| if: matrix.build_agent | |
| run: cargo build --release --bin aperture-agent --target ${{ matrix.target }} | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/aperture-aggregator dist/ 2>/dev/null || true | |
| cp target/${{ matrix.target }}/release/aperture dist/ 2>/dev/null || true | |
| cp target/${{ matrix.target }}/release/aperture-agent dist/ 2>/dev/null || true | |
| tar czf ${{ matrix.artifact }}.tar.gz -C dist . | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }}.tar.gz | |
| docker: | |
| name: Docker Images | |
| needs: [check, test] | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build aggregator image | |
| run: docker build -f Dockerfile.aggregator -t aperture-aggregator . | |
| - name: Build agent image | |
| run: docker build -f Dockerfile.agent -t aperture-agent . |