refactor: remove DWARF analyzer raw pointer #376
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 ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| FIXTURE_COMPILER_IMAGE: ghcr.io/swananan/ghostscope-fixture-compiler@sha256:b1e716ec17610673dcaf69497bd93ef0c700a2ad7fe8265d6764d15a8c1edc89 | |
| FIXTURE_COMPILER_CACHE_REV: b1e716ec17610673dcaf69497bd93ef0c700a2ad7fe8265d6764d15a8c1edc89 | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| LLVM_SYS_181_PREFIX: /usr/lib/llvm-18 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install LLVM 18 and Polly | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y llvm-18-dev libpolly-18-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| with: | |
| components: clippy | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-index- | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-${{ github.job }}-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ github.job }}-target- | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| LLVM_SYS_181_PREFIX: /usr/lib/llvm-18 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install LLVM 18 and Polly | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y llvm-18-dev libpolly-18-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-index- | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-${{ github.job }}-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ github.job }}-target- | |
| - name: Build test binaries | |
| run: cargo test --no-run --all-features | |
| - name: Build dwarf-tool (required by tests) | |
| run: cargo build -p dwarf-tool | |
| - name: Run workspace tests | |
| run: cargo test --all-features | |
| env: | |
| RUST_BACKTRACE: 1 | |
| e2e: | |
| name: Standard E2E | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| env: | |
| LLVM_SYS_181_PREFIX: /usr/lib/llvm-18 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install LLVM 18 and Polly | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y llvm-18-dev libpolly-18-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-index- | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-${{ github.job }}-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ github.job }}-target- | |
| - name: Cache fixture binaries | |
| id: fixture-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| e2e-tests/tests/fixtures/sample_program/sample_program | |
| e2e-tests/tests/fixtures/sample_program/sample_program_o1 | |
| e2e-tests/tests/fixtures/sample_program/sample_program_o2 | |
| e2e-tests/tests/fixtures/sample_program/sample_program_o3 | |
| e2e-tests/tests/fixtures/sample_program/sample_program_stripped | |
| e2e-tests/tests/fixtures/sample_program/sample_program_stripped.debug | |
| e2e-tests/tests/fixtures/complex_types_program/complex_types_program | |
| e2e-tests/tests/fixtures/complex_types_program/complex_types_program_o1 | |
| e2e-tests/tests/fixtures/complex_types_program/complex_types_program_o2 | |
| e2e-tests/tests/fixtures/complex_types_program/complex_types_program_o3 | |
| e2e-tests/tests/fixtures/complex_types_program/complex_types_program_nopie | |
| e2e-tests/tests/fixtures/member_pointer_program/member_pointer_program | |
| e2e-tests/tests/fixtures/member_pointer_program/member_pointer_program_o1 | |
| e2e-tests/tests/fixtures/member_pointer_program/member_pointer_program_o2 | |
| e2e-tests/tests/fixtures/member_pointer_program/member_pointer_program_o3 | |
| e2e-tests/tests/fixtures/globals_program/globals_program | |
| e2e-tests/tests/fixtures/globals_program/libgvars.so | |
| e2e-tests/tests/fixtures/late_globals_program/late_globals_program | |
| e2e-tests/tests/fixtures/rust_global_program/target/debug/rust_global_program | |
| e2e-tests/tests/fixtures/inline_callsite_program/inline_callsite_program | |
| e2e-tests/tests/fixtures/inline_callsite_program/inline_callsite_program_clang_dwarf5 | |
| e2e-tests/tests/fixtures/inline_call_value_program/inline_call_value_program | |
| e2e-tests/tests/fixtures/partitioned_ranges_program/partitioned_ranges_program | |
| e2e-tests/tests/fixtures/cpp_complex_program/cpp_complex_program | |
| e2e-tests/tests/fixtures/static_scope_program/static_scope_program | |
| e2e-tests/tests/fixtures/static_scope_program/static_scope_program_clang_dwarf5 | |
| e2e-tests/tests/fixtures/entry_value_recovery_program/entry_value_recovery_program | |
| e2e-tests/tests/fixtures/entry_value_recovery_program/entry_value_recovery_program_clang_dwarf5 | |
| key: ${{ runner.os }}-${{ github.job }}-fixtures-${{ env.FIXTURE_COMPILER_CACHE_REV }}-${{ hashFiles('e2e-tests/compile-fixtures.sh', 'e2e-tests/tests/fixtures/**/*.c', 'e2e-tests/tests/fixtures/**/*.h', 'e2e-tests/tests/fixtures/**/*.cpp', 'e2e-tests/tests/fixtures/**/*.rs', 'e2e-tests/tests/fixtures/**/Makefile', 'e2e-tests/tests/fixtures/**/Cargo.toml', 'e2e-tests/tests/fixtures/**/Cargo.lock') }} | |
| - name: Compile fixtures with fixture compiler image | |
| if: steps.fixture-cache.outputs.cache-hit != 'true' | |
| run: | | |
| docker run --rm \ | |
| -v "${GITHUB_WORKSPACE}/e2e-tests:/workspace/e2e-tests" \ | |
| -w /workspace/e2e-tests \ | |
| "$FIXTURE_COMPILER_IMAGE" \ | |
| bash ./compile-fixtures.sh | |
| sudo chown -R "$(id -u):$(id -g)" "${GITHUB_WORKSPACE}/e2e-tests/tests/fixtures" | |
| - name: Build GhostScope CLI and dwarf-tool | |
| run: cargo build -p ghostscope -p dwarf-tool --all-features | |
| - name: Run e2e | |
| env: | |
| GHOSTSCOPE_PRESERVE_PRECOMPILED_FIXTURES: 1 | |
| RUST_BACKTRACE: 1 | |
| run: sudo -E "$(which cargo)" test -p ghostscope-e2e-tests --tests --all-features -- --nocapture | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| LLVM_SYS_181_PREFIX: /usr/lib/llvm-18 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install LLVM 18 and Polly | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y llvm-18-dev libpolly-18-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-index- | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-${{ github.job }}-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ github.job }}-target- | |
| - name: Build debug | |
| run: cargo build --all-features | |
| - name: Verify embedded script help matches docs | |
| run: | | |
| tmpfile="$(mktemp)" | |
| target/debug/ghostscope --script-help > "$tmpfile" | |
| diff -u docs/scripting.md "$tmpfile" | |
| - name: Build release | |
| run: cargo build --release --all-features |