mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
reverting workflows to original state
This commit is contained in:
parent
6a3b977794
commit
92fa01c7a3
2 changed files with 17 additions and 13 deletions
17
.github/workflows/publish.yml
vendored
17
.github/workflows/publish.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
- main
|
||||
paths:
|
||||
- 'codeflash/version.py'
|
||||
- 'codeflash-benchmark/codeflash_benchmark/__init__.py'
|
||||
- 'codeflash-benchmark/codeflash_benchmark/version.py'
|
||||
|
||||
jobs:
|
||||
detect-changes:
|
||||
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
else
|
||||
echo "codeflash=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if git diff --name-only HEAD~1 HEAD | grep -q '^codeflash-benchmark/codeflash_benchmark/__init__.py$'; then
|
||||
if git diff --name-only HEAD~1 HEAD | grep -q '^codeflash-benchmark/codeflash_benchmark/version.py$'; then
|
||||
echo "benchmark=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "benchmark=false" >> $GITHUB_OUTPUT
|
||||
|
|
@ -121,23 +121,14 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract version from __init__.py
|
||||
- name: Extract version from version.py
|
||||
id: extract_version
|
||||
run: |
|
||||
VERSION=$(grep -oP '__version__ = "\K[^"]+' codeflash-benchmark/codeflash_benchmark/__init__.py)
|
||||
VERSION=$(grep -oP '__version__ = "\K[^"]+' codeflash-benchmark/codeflash_benchmark/version.py)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "tag=benchmark-v$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Extracted version: $VERSION"
|
||||
|
||||
- name: Verify version matches pyproject.toml
|
||||
run: |
|
||||
INIT_VERSION=${{ steps.extract_version.outputs.version }}
|
||||
TOML_VERSION=$(grep -oP '^version = "\K[^"]+' codeflash-benchmark/pyproject.toml)
|
||||
if [ "$INIT_VERSION" != "$TOML_VERSION" ]; then
|
||||
echo "::error::Version mismatch: __init__.py=$INIT_VERSION, pyproject.toml=$TOML_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check if tag already exists
|
||||
id: check_tag
|
||||
run: |
|
||||
|
|
|
|||
13
.github/workflows/unit-tests.yaml
vendored
13
.github/workflows/unit-tests.yaml
vendored
|
|
@ -40,6 +40,19 @@ jobs:
|
|||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: Build and install codeflash-runtime JAR
|
||||
run: |
|
||||
cd codeflash-java-runtime
|
||||
mvn clean package -q -DskipTests
|
||||
mvn install -q -DskipTests
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue