Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/end2end_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@

steps:
- name: Checkout
uses: actions/checkout@v4

Check failure on line 30 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5

Check failure on line 37 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
python-version: ${{ matrix.version }}
cache: pip
Expand All @@ -45,6 +45,10 @@
CONSTRAINTS_FILE="$GITHUB_WORKSPACE/constraints.txt"
echo "setuptools<82" > "$CONSTRAINTS_FILE"
export PIP_CONSTRAINT="$CONSTRAINTS_FILE"
# pip >= 26.2 no longer applies PIP_CONSTRAINT to isolated build
# environments (needed for the mmcv sdist build, see
# https://github.com/open-mmlab/mmcv/issues/3325)
export PIP_BUILD_CONSTRAINT="$CONSTRAINTS_FILE"
pip install -e .[dev]

- name: Run full public tests
Expand All @@ -52,7 +56,7 @@

- name: Authenticate to Google Cloud
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
uses: google-github-actions/auth@v2

Check failure on line 59 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
Expand All @@ -75,14 +79,14 @@

steps:
- name: Checkout
uses: actions/checkout@v4

Check failure on line 82 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5

Check failure on line 89 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
python-version: ${{ matrix.version }}
cache: pip
Expand All @@ -93,6 +97,10 @@
CONSTRAINTS_FILE="$GITHUB_WORKSPACE/constraints.txt"
echo "setuptools<82" > "$CONSTRAINTS_FILE"
export PIP_CONSTRAINT="$CONSTRAINTS_FILE"
# pip >= 26.2 no longer applies PIP_CONSTRAINT to isolated build
# environments (needed for the mmcv sdist build, see
# https://github.com/open-mmlab/mmcv/issues/3325)
export PIP_BUILD_CONSTRAINT="$CONSTRAINTS_FILE"
pip install -e .[dev]

- name: Run representative public tests
Expand All @@ -100,7 +108,7 @@

- name: Authenticate to Google Cloud
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
uses: google-github-actions/auth@v2

Check failure on line 111 in .github/workflows/end2end_tests.yaml

View workflow job for this annotation

GitHub Actions / semgrep/ci

Semgrep Issue

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ jobs:
working-directory: ${{ inputs.tools_ref != '' && 'tools' || '' }}
run: |
CONSTRAINTS_FILE="$GITHUB_WORKSPACE/constraints.txt"
echo "setuptools<81" > "$CONSTRAINTS_FILE"
echo "setuptools<82" > "$CONSTRAINTS_FILE"
export PIP_CONSTRAINT="$CONSTRAINTS_FILE"
# pip >= 26.2 no longer applies PIP_CONSTRAINT to isolated build
# environments (needed for the mmcv sdist build, see
# https://github.com/open-mmlab/mmcv/issues/3325)
export PIP_BUILD_CONSTRAINT="$CONSTRAINTS_FILE"
pip install -e .[dev]
pip install coverage-badge>=1.1.0 pytest-cov>=4.1.0

Expand All @@ -72,6 +76,9 @@ jobs:
env:
ML_REF: ${{ inputs.ml_ref }}
run: |
CONSTRAINTS_FILE="$GITHUB_WORKSPACE/constraints.txt"
export PIP_CONSTRAINT="$CONSTRAINTS_FILE"
export PIP_BUILD_CONSTRAINT="$CONSTRAINTS_FILE"
pip uninstall luxonis-ml -y
pip install \
"luxonis-ml[data,nn-archive,utils] @ git+https://github.com/luxonis/luxonis-ml.git@${ML_REF}" \
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ cd tools

```bash
# Install the package
PIP_CONSTRAINT=constraints.txt pip install .
# (PIP_BUILD_CONSTRAINT is required with pip >= 26.2, which no longer
# applies PIP_CONSTRAINT to isolated build environments)
PIP_CONSTRAINT=constraints.txt PIP_BUILD_CONSTRAINT=constraints.txt pip install .
# Running the package
tools yolov6nr4.pt --imgsz "416"
```
Expand Down
Loading