Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/skills/bazel/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ In order of preference:
keep its checksum field populated.

Vendored Rust crates under [`misc/bazel/3rdparty`](../../../misc/bazel/3rdparty) are generated. Regenerate with
[`update_cargo_deps.sh`](../../../misc/bazel/3rdparty/update_cargo_deps.sh) rather than editing, and keep the
[`update_all_rust_deps.sh`](../../../misc/bazel/3rdparty/update_all_rust_deps.sh) rather than editing, and keep the
`use_repo` lists in sync, which `bazel mod tidy` does for module extensions.

## Building standalone
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/cpp-bmn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ on:
pull_request:
paths: &bmn_paths
- "cpp/extractor/bmn/**"
- "misc/bazel/3rdparty/cpp_bmn_deps/**"
- "misc/bazel/3rdparty/cpp_bmn_deps_extension.bzl"
- "misc/bazel/3rdparty/update_cpp_bmn_deps.sh"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "misc/bazel/3rdparty/rust_workspace_deps/**"
- "misc/bazel/3rdparty/rust_workspace_deps_extension.bzl"
- "misc/bazel/3rdparty/update_rust_workspace_deps.sh"
- "misc/bazel/3rdparty/BUILD.bazel"
- "misc/bazel/rust.bzl"
- "MODULE.bazel"
Expand All @@ -33,7 +36,7 @@ jobs:
- name: Check
run: cargo check
- name: Clippy
run: cargo clippy -- -D warnings
run: cargo clippy --all-targets --no-deps -- -D warnings
- name: Test
run: cargo test

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ql-for-ql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ jobs:
with:
path: |
ql/extractor-pack/
ql/target/release/buramu
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ql/**/*.rs') }}
target/release/buramu
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('Cargo.toml', 'Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ql/**/*.rs') }}
- name: Cache cargo
if: steps.cache-extractor.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
ql/target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-rust-cargo-${{ hashFiles('ql/**/Cargo.lock') }}
target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-rust-cargo-${{ hashFiles('Cargo.lock') }}
- name: Release build
if: steps.cache-extractor.outputs.cache-hit != 'true'
run: cd ql; ./scripts/create-extractor-pack.sh
Expand All @@ -59,7 +59,7 @@ jobs:
key: run-ql-for-ql
- name: Make database and analyze
run: |
./ql/target/release/buramu | tee deprecated.blame # Add a blame file for the extractor to parse.
./target/release/buramu | tee deprecated.blame # Add a blame file for the extractor to parse.
${CODEQL} database create --threads=0 -l=ql ${DB} --search-path "${{ github.workspace }}"
${CODEQL} database analyze -j0 --format=sarif-latest --output=ql-for-ql.sarif ${DB} ql/ql/src/codeql-suites/ql-code-scanning.qls --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ql-for-ql-dataset_measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
ql/target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('ql/**/Cargo.lock') }}
target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('Cargo.lock') }}
- name: Build Extractor
run: cd ql; env "PATH=$PATH:`dirname ${CODEQL}`" ./scripts/create-extractor-pack.sh
env:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ql-for-ql-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: Run QL for QL Tests
on:
push:
branches: [main]
paths:
paths: &ql_paths
- "ql/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- codeql-workspace.yml
- .github/workflows/ql-for-ql-tests.yml
pull_request:
branches: [main]
paths:
- "ql/**"
- codeql-workspace.yml
- .github/workflows/ql-for-ql-tests.yml
paths: *ql_paths

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


env:
CARGO_TERM_COLOR: always
Expand All @@ -37,10 +37,10 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
ql/target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('ql/rust-toolchain.toml', 'ql/**/Cargo.lock') }}
target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}
- name: Check formatting
run: cd ql; cargo fmt -- --check
run: cd ql; cargo fmt -p codeql-extractor-ql -p buramu -p tree-sitter-blame -- --check
- name: Build extractor
run: |
cd ql;
Expand Down Expand Up @@ -82,8 +82,8 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
ql/target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('ql/rust-toolchain.toml', 'ql/**/Cargo.lock') }}
target
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}
- name: Build extractor
if: runner.os != 'Windows'
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "!shared/yeast-macros/**"
- "!shared/yeast-schema/**"
- "MODULE.bazel"
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- .github/workflows/rust.yml
- .github/actions/**
- codeql-workspace.yml
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/tree-sitter-extractor-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ name: Test tree-sitter-extractor

on:
push:
paths:
paths: &tree_sitter_paths
- "shared/tree-sitter-extractor/**"
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- .github/workflows/tree-sitter-extractor-test.yml
branches:
- main
- "rc/*"
pull_request:
paths:
- "shared/tree-sitter-extractor/**"
- .github/workflows/tree-sitter-extractor-test.yml
paths: *tree_sitter_paths
branches:
- main
- "rc/*"
Expand Down Expand Up @@ -46,4 +47,4 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Run clippy
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments
run: cargo clippy -- --no-deps -D warnings
6 changes: 3 additions & 3 deletions .github/workflows/update-rust-analyzer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading