Don't build with cross any longer.

We've removed cross from the internal build when converting to bazel,
mirror that here.
This commit is contained in:
Cornelius Riemenschneider
2024-05-24 15:49:52 +02:00
parent 8c46b61e85
commit b09f3c1c0d
2 changed files with 3 additions and 14 deletions

View File

@@ -7,12 +7,12 @@ runs:
id: os_version
- name: Cache entire extractor
id: cache-extractor
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ruby/extractor-pack
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/scripts/create-extractor-pack.sh', 'ruby/extractor/**/Cargo.lock', 'ruby/actions/create-extractor-pack/action.yml') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ruby/extractor/**/*.rs') }}-${{ hashFiles('ruby/codeql-extractor.yml', 'ruby/downgrades', 'ruby/tools', 'ruby/ql/lib/ruby.dbscheme', 'ruby/ql/lib/ruby.dbscheme.stats') }}
- name: Cache cargo
uses: actions/cache@v3
uses: actions/cache@v4
if: steps.cache-extractor.outputs.cache-hit != 'true'
with:
path: |
@@ -24,6 +24,5 @@ runs:
if: steps.cache-extractor.outputs.cache-hit != 'true'
shell: bash
run: |
cargo install cross --version 0.2.5
scripts/create-extractor-pack.sh
working-directory: ruby

View File

@@ -1,11 +1,7 @@
#!/bin/bash
set -eux
CARGO=cargo
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
platform="linux64"
if which cross; then
CARGO=cross
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
platform="osx64"
else
@@ -13,15 +9,9 @@ else
exit 1
fi
(cd extractor && "$CARGO" build --release)
(cd extractor && cargo build --release)
# If building via cross, the binaries will be in extractor/target/<triple>/release
# If building via cargo, the binaries will be in extractor/target/release
BIN_DIR=extractor/target/release
if [[ "$CARGO" == "cross" ]]; then
BIN_DIR=extractor/target/x86_64-unknown-linux-gnu/release
fi
"$BIN_DIR/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