Skip to content

Commit

Permalink
try offline
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jan 8, 2025
1 parent 5cf2f8a commit ad9ab6b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Obtain results before changes
run: |
cargo run --locked --release --bin datadog-static-analyzer -- -i ${{ matrix.repo.org }}/${{ matrix.repo.name }} -o result-pre.json -b -f sarif
cargo run --offline --release --bin datadog-static-analyzer -- -i ${{ matrix.repo.org }}/${{ matrix.repo.name }} -o result-pre.json -b -f sarif
- name: Fetch all branches and checkout PR
run: |
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Obtain results after changes
run: |
cargo run --locked --release --bin datadog-static-analyzer -- -i ${{ matrix.repo.org }}/${{ matrix.repo.name }} -o result-post.json -b -f sarif
cargo run --offline --release --bin datadog-static-analyzer -- -i ${{ matrix.repo.org }}/${{ matrix.repo.name }} -o result-post.json -b -f sarif
- name: Install Node.js dependencies
run: npm install
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:

- name: Build Rust binaries
run: |
cargo build --locked --release --target ${{ matrix.target }} --bin datadog-static-analyzer
cargo build --locked --release --target ${{ matrix.target }} --bin datadog-static-analyzer-git-hook
cargo build --locked --release --target ${{ matrix.target }} --bin datadog-static-analyzer-server
cargo build --offline --release --target ${{ matrix.target }} --bin datadog-static-analyzer
cargo build --offline --release --target ${{ matrix.target }} --bin datadog-static-analyzer-git-hook
cargo build --offline --release --target ${{ matrix.target }} --bin datadog-static-analyzer-server
- name: Zip Rust binaries (Unix)
if: ${{ !startsWith(matrix.os, 'windows') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- { os: macos-latest, target: aarch64-apple-darwin, gha_alias: 'macOS aarch64 - ' }
- { os: windows-latest, target: x86_64-pc-windows-msvc, gha_alias: 'Windows x64 - ' }
cargo_cmd:
- { cmd_name: build, args: '--locked' , gha_alias: "Build - Profile 'debug'" }
- { cmd_name: test, args: '--workspace --locked', gha_alias: "Test" }
- { cmd_name: build, args: '--offline' , gha_alias: "Build - Profile 'debug'" }
- { cmd_name: test, args: '--workspace --offline', gha_alias: "Test" }
include:
- config: { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, gha_alias: '' }
cargo_cmd: { cmd_name: clippy, args: '', gha_alias: "Clippy" }
Expand All @@ -39,10 +39,10 @@ jobs:
command: ${{ matrix.cargo_cmd.cmd_name }}
args: ${{ matrix.cargo_cmd.args }}
- name: Check python rulesets - part1
run: cargo run --locked --bin datadog-static-analyzer-test-ruleset -- -r python-best-practices -r python-security -r python-code-style -r python-inclusive
run: cargo run --offline --bin datadog-static-analyzer-test-ruleset -- -r python-best-practices -r python-security -r python-code-style -r python-inclusive
- name: Check python rulesets - part2
run: cargo run --locked --bin datadog-static-analyzer-test-ruleset -- -r python-django -r python-flask -r python-design
run: cargo run --offline --bin datadog-static-analyzer-test-ruleset -- -r python-django -r python-flask -r python-design
- name: Check Java rulesets
run: cargo run --locked --bin datadog-static-analyzer-test-ruleset -- -r java-security -r java-best-practices -r java-code-style
run: cargo run --offline --bin datadog-static-analyzer-test-ruleset -- -r java-security -r java-best-practices -r java-code-style
- name: Check Docker rulesets
run: cargo run --locked --bin datadog-static-analyzer-test-ruleset -- -r docker-best-practices
run: cargo run --offline --bin datadog-static-analyzer-test-ruleset -- -r docker-best-practices
8 changes: 4 additions & 4 deletions .github/workflows/test-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
components: clippy
- name: Test all production rules
run: |
cargo build --locked --profile release-dev --bin datadog-static-analyzer && \
cargo build --locked --profile release-dev --bin datadog-static-analyzer-server && \
cargo build --offline --profile release-dev --bin datadog-static-analyzer && \
cargo build --offline --profile release-dev --bin datadog-static-analyzer-server && \
sudo apt-get install python3-requests && \
for language in go python typescript javascript csharp java ruby; do \
python misc/test-rules.py -c $PWD/target/release-dev/datadog-static-analyzer -s $PWD/target/release-dev/datadog-static-analyzer-server -l $language ; \
Expand All @@ -41,8 +41,8 @@ jobs:
components: clippy
- name: Test all staging rules
run: |
cargo build --locked --profile release-dev --bin datadog-static-analyzer && \
cargo build --locked --profile release-dev --bin datadog-static-analyzer-server && \
cargo build --offline --profile release-dev --bin datadog-static-analyzer && \
cargo build --offline --profile release-dev --bin datadog-static-analyzer-server && \
sudo apt-get install python3-requests && \
for language in go python typescript javascript csharp java ruby; do \
python misc/test-rules.py -c $PWD/target/release-dev/datadog-static-analyzer -s $PWD/target/release-dev/datadog-static-analyzer-server -l $language ; \
Expand Down

0 comments on commit ad9ab6b

Please sign in to comment.