Skip to content

Commit

Permalink
Ruby: Build extractor via cargo-cross on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hmac committed Mar 15, 2023
1 parent 907fbea commit e7ead76
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ruby-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: Install cargo-cross
if: runner.os == 'Linux'
run: cargo install cross --version 0.2.1
- uses: ./.github/actions/os-version
id: os_version
- name: Cache entire extractor
Expand Down Expand Up @@ -80,7 +83,15 @@ jobs:
run: cd extractor && cargo test --verbose
- name: Release build
if: steps.cache-extractor.outputs.cache-hit != 'true'
run: cd extractor && cargo build --release
# On linux, build the extractor via cross in a centos7 container.
# This ensures we don't depend on glibc > 2.17.
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
CARGO=cross
else
CARGO=cargo
fi
cd extractor && "$CARGO" build --release
- name: Generate dbscheme
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
run: extractor/target/release/generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
Expand Down

0 comments on commit e7ead76

Please sign in to comment.