Skip to content

Commit 7b81fe3

Browse files
committed
Ruby: fix conditional use of cross in build
1 parent e7ead76 commit 7b81fe3

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/ruby-build.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,14 @@ jobs:
8181
- name: Run tests
8282
if: steps.cache-extractor.outputs.cache-hit != 'true'
8383
run: cd extractor && cargo test --verbose
84-
- name: Release build
85-
if: steps.cache-extractor.outputs.cache-hit != 'true'
86-
# On linux, build the extractor via cross in a centos7 container.
87-
# This ensures we don't depend on glibc > 2.17.
88-
run: |
89-
if [[ "$RUNNER_OS" == "Linux" ]]; then
90-
CARGO=cross
91-
else
92-
CARGO=cargo
93-
fi
94-
cd extractor && "$CARGO" build --release
84+
# On linux, build the extractor via cross in a centos7 container.
85+
# This ensures we don't depend on glibc > 2.17.
86+
- name: Release build (linux)
87+
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os == 'Linux'
88+
run: cd extractor && cross build --release
89+
- name: Release build (windows and macos)
90+
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux'
91+
run: cd extractor && cargo build --release
9592
- name: Generate dbscheme
9693
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
9794
run: extractor/target/release/generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll

0 commit comments

Comments
 (0)