Skip to content

Commit

Permalink
Update workflows/actions (#774)
Browse files Browse the repository at this point in the history
* Update to `actions/checkout@v4`

* Update to `actions/setup-python@v5`

* Update use of set-output

* Remove redundant variables/jobs

* Update to `actions/github-script@v7`
  • Loading branch information
dbarbuzzi authored Oct 7, 2024
1 parent 7c2ab3a commit e051dad
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-publish-release-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:

- name: Checkout code
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Get Tag
id: extract_tag
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF_NAME#*/})"
run: echo "tag=${GITHUB_REF_NAME#*/}" >> $GITHUB_OUTPUT

- name: Current Version Name
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: umbrelladocs/action-linkspector@v1
with:
github_token: ${{ secrets.github_token }}
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Quality Checks
on:
on:
push:
branches:
- main
Expand All @@ -12,13 +12,10 @@ jobs:
quality-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: ${{needs.test-setup.outputs.branch}}
- uses: actions/checkout@v4
- name: "⚙️ Install dependencies"
run: pip3 install .[dev]
- name: "🧹 Running quality checks"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/set-comment.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PR Reminder Comment Bot
on:
on:
pull_request:
branches:
- main
Expand All @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Remind to add ready label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
Expand All @@ -20,4 +20,4 @@ jobs:
body: '👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.'
})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 15 additions & 43 deletions .github/workflows/test-check.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Test Checks
on:
on:
push:
branches:
- main
Expand All @@ -19,39 +19,17 @@ env:
CLEARML_API_SECRET_KEY: ${{ secrets.CLEARML_API_SECRET_KEY }}

jobs:
test-setup:
runs-on: ubuntu-22.04
outputs:
branch: ${{ steps.get-branch.outputs.branch }}
base: ${{ steps.base-check.outputs.output }}
pytorch: ${{ steps.pytorch-check.outputs.output }}
transformers: ${{ steps.transformers-check.outputs.output }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# TODO: for @DanH what is this supposed to be doing?
# The way it was being used before was only testing code on main,
# not on the current PR. git branch --show current does not work
- name: Get current branch
id: get-branch
run: >
(git branch --show-current | grep -E "release/")
&& echo "::set-output name=branch::$(git branch --show-current)"
|| echo "::set-output name=branch::main"
base-tests:
runs-on: ubuntu-22.04
needs: test-setup
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install compressed-tensors dependencies"
run: pip3 install -U pip && pip3 install setuptools compressed-tensors/
- name: "Clean compressed-tensors directory"
Expand All @@ -62,17 +40,15 @@ jobs:
run: make test
pytorch-tests:
runs-on: ubuntu-22.04
needs: test-setup
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install compressed-tensors dependencies"
run: pip3 install -U pip && pip3 install setuptools compressed-tensors/
- name: "Clean compressed-tensors directory"
Expand All @@ -84,17 +60,15 @@ jobs:
pytest tests/llmcompressor/pytorch -v
compat-pytorch-1_9-pytorch-tests:
runs-on: ubuntu-22.04
needs: test-setup
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install compressed-tensors dependencies"
run: pip3 install -U pip && pip3 install setuptools compressed-tensors/
- name: "Clean compressed-tensors directory"
Expand All @@ -106,17 +80,15 @@ jobs:
pytest tests/llmcompressor/pytorch -v
transformers-tests:
runs-on: ubuntu-22.04
needs: test-setup
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install compressed-tensors dependencies"
run: pip3 install -U pip && pip3 install setuptools compressed-tensors/
- name: "Clean compressed-tensors directory"
Expand All @@ -129,7 +101,7 @@ jobs:
run: |
pytest tests/llmcompressor/transformers/compression -v
- name: Run Finetune Tests
if: always() && steps.install.outcome == 'success'
if: always() && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/finetune -m unit
- name: Running GPTQ Tests
Expand All @@ -148,4 +120,4 @@ jobs:
- name: Running OBCQ Tests
if: always() && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/obcq -v
pytest -v tests/llmcompressor/transformers/obcq -v

0 comments on commit e051dad

Please sign in to comment.