зеркало из https://github.com/github/codeql.git
Ruby: update new cargo target directory in make and actions
This commit is contained in:
Родитель
aa6726a401
Коммит
d8db0e43da
|
@ -65,8 +65,8 @@ jobs:
|
|||
id: cache-extractor
|
||||
with:
|
||||
path: |
|
||||
ruby/extractor/target/release/codeql-extractor-ruby
|
||||
ruby/extractor/target/release/codeql-extractor-ruby.exe
|
||||
target/release/codeql-extractor-ruby
|
||||
target/release/codeql-extractor-ruby.exe
|
||||
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ruby/extractor/**/*.rs') }}
|
||||
- uses: actions/cache@v3
|
||||
|
@ -75,7 +75,7 @@ jobs:
|
|||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
ruby/target
|
||||
target
|
||||
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/**/Cargo.lock') }}
|
||||
- name: Check formatting
|
||||
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||
|
@ -91,7 +91,7 @@ jobs:
|
|||
run: cd extractor && cargo build --release
|
||||
- name: Generate dbscheme
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
|
||||
run: extractor/target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
run: ../target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
with:
|
||||
|
@ -106,8 +106,8 @@ jobs:
|
|||
with:
|
||||
name: extractor-${{ matrix.os }}
|
||||
path: |
|
||||
ruby/extractor/target/release/codeql-extractor-ruby
|
||||
ruby/extractor/target/release/codeql-extractor-ruby.exe
|
||||
target/release/codeql-extractor-ruby
|
||||
target/release/codeql-extractor-ruby.exe
|
||||
retention-days: 1
|
||||
compile-queries:
|
||||
if: github.repository_owner == 'github'
|
||||
|
|
|
@ -24,7 +24,7 @@ FILES=codeql-extractor.yml\
|
|||
ql/lib/ruby.dbscheme.stats\
|
||||
ql/lib/ruby.dbscheme
|
||||
|
||||
BIN_FILES=target/release/codeql-extractor-ruby$(EXE)
|
||||
BIN_FILES=../target/release/codeql-extractor-ruby$(EXE)
|
||||
|
||||
extractor-common:
|
||||
rm -rf build
|
||||
|
@ -37,14 +37,14 @@ extractor-common:
|
|||
tools: $(BIN_FILES)
|
||||
rm -rf tools/bin
|
||||
mkdir tools/bin
|
||||
cp -r target/release/codeql-extractor-ruby$(EXE) tools/bin/extractor$(EXE)
|
||||
cp -r ../target/release/codeql-extractor-ruby$(EXE) tools/bin/extractor$(EXE)
|
||||
|
||||
target/release/%$(EXE):
|
||||
../target/release/%$(EXE):
|
||||
cd extractor && cargo build --release
|
||||
|
||||
dbscheme:
|
||||
cd extractor && cargo build --release
|
||||
extractor/target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
../target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
codeql query format -i ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
|
||||
.PHONY: extractor
|
||||
|
@ -62,7 +62,7 @@ extractor: $(FILES) $(BIN_FILES)
|
|||
cp tools/autobuild.cmd extractor-pack/tools/autobuild.cmd
|
||||
cp ql/lib/ruby.dbscheme.stats extractor-pack/ruby.dbscheme.stats
|
||||
cp ql/lib/ruby.dbscheme extractor-pack/ruby.dbscheme
|
||||
cp extractor/target/release/codeql-extractor-ruby$(EXE) extractor-pack/tools/$(CODEQL_PLATFORM)/extractor$(EXE)
|
||||
cp ../target/release/codeql-extractor-ruby$(EXE) extractor-pack/tools/$(CODEQL_PLATFORM)/extractor$(EXE)
|
||||
|
||||
test: extractor dbscheme
|
||||
codeql test run --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --search-path .. --consistency-queries ql/consistency-queries ql/test
|
||||
|
|
|
@ -18,7 +18,7 @@ runs:
|
|||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
ruby/target
|
||||
target
|
||||
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-qltest-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/scripts/create-extractor-pack.sh', 'ruby/extractor/**/Cargo.lock') }}
|
||||
- name: Build Extractor
|
||||
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||
|
|
Загрузка…
Ссылка в новой задаче