chore(deps): bump ossf/scorecard-action from 99c09fe975337306107572b4fdf4db224cf8e2f2 to 4eaacf0543bb3f2c246792bd56e8cdeffafb205a #220
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| generate-bpf: | |
| name: Generate eBPF Object | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: '1.26.2' | |
| - name: Install toolchain | |
| run: sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev | |
| - name: Generate BPF | |
| run: make generate | |
| - name: Upload BPF object | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: procscope-bpf-object | |
| path: internal/tracer/procscope_bpfel.o | |
| retention-days: 1 | |
| test: | |
| name: Test | |
| needs: generate-bpf | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.26.2'] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Download BPF object | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: procscope-bpf-object | |
| path: internal/tracer | |
| - name: Build | |
| run: make build | |
| - name: Cross-build supported targets | |
| run: | | |
| CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath ./cmd/procscope | |
| CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath ./cmd/procscope | |
| - name: Unit tests | |
| run: go test -v -race -count=1 -short ./... | |
| - name: Integration tests (requires eBPF/root) | |
| run: | | |
| ./bin/procscope --version | |
| sudo ./bin/procscope -- ls /tmp || echo "Warning: Integration test failed" | |
| - name: Vet | |
| run: go vet ./... | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: '1.26.2' | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 | |
| continue-on-error: true | |
| with: | |
| version: v1.64.5 | |
| vuln: | |
| name: Vulnerability Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: '1.26.2' | |
| - name: Install govulncheck | |
| run: go install golang.org/x/vuln/cmd/govulncheck@v1.2.0 | |
| - name: Run govulncheck | |
| run: govulncheck ./... || true | |
| build-debian: | |
| name: Build Debian Package | |
| needs: generate-bpf | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: '1.26.2' | |
| - name: Download BPF object | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: procscope-bpf-object | |
| path: internal/tracer | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y debhelper lintian dh-golang | |
| - name: Build Debian Package | |
| run: dpkg-buildpackage -us -uc -b -d | |
| - name: Move Debian Package | |
| run: mv ../procscope_*.deb . | |
| - name: Lint Debian Package | |
| run: lintian ./procscope_*.deb || true | |
| - name: Upload Debian Package | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: procscope-deb | |
| path: ./procscope_*.deb | |
| build-arch: | |
| name: Build Arch Linux Package | |
| needs: generate-bpf | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:base-devel | |
| steps: | |
| - name: Install dependencies | |
| run: pacman -Syu --noconfirm git go nodejs | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Download BPF object | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: procscope-bpf-object | |
| path: internal/tracer | |
| - name: Build Arch Package | |
| run: | | |
| useradd -m builduser | |
| chown -R builduser:builduser . | |
| su builduser -c "cd arch && makepkg -sf" | |
| - name: Upload Arch Package | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: procscope-pkg-tar-zst | |
| path: arch/*.pkg.tar.zst |