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
2 changes: 1 addition & 1 deletion .github/workflows/build-golang-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:

# - uses: ./.github/workflows/platform-integration-test.yaml
# with:
# wheel: dist/otdf_python-0.2.3-py3-none-any.whl
# wheel: dist/otdf_python-0.2.4-py3-none-any.whl
8 changes: 4 additions & 4 deletions .github/workflows/build-golang-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
uses: ./.github/workflows/lint-on-ubuntu.yaml

build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: write

Expand Down Expand Up @@ -43,12 +43,12 @@ jobs:

- uses: actions/cache/restore@v4
with:
path: dist/otdf_python-0.2.3-py3-none-any.whl
path: dist/otdf_python-0.2.4-py3-none-any.whl
key: ${{ runner.os }}${{ matrix.python3_version }}-data-${{ github.sha }}

- uses: actions/cache/save@v4
with:
path: dist/otdf_python-0.2.3-py3-none-any.whl
path: dist/otdf_python-0.2.4-py3-none-any.whl
key: ${{ runner.os }}${{ matrix.python3_version }}-data-${{ github.sha }}
restore-keys: |
${{ runner.os }}${{ matrix.python3_version }}-data-
Expand All @@ -61,5 +61,5 @@ jobs:
needs: build
uses: ./.github/workflows/platform-integration-test.yaml
with:
wheel: dist/otdf_python-0.2.3-py3-none-any.whl
wheel: dist/otdf_python-0.2.4-py3-none-any.whl
python_version: ${{ matrix.python3_version }}
2 changes: 1 addition & 1 deletion .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
go-version: [1.22.x]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-on-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:

lint-ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
fail-fast: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/platform-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ permissions:

jobs:
integration_test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout this repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- uses: actions/cache/restore@v4
with:
path: dist/otdf_python-0.2.3-py3-none-any.whl
path: dist/otdf_python-0.2.4-py3-none-any.whl
key: ${{ runner.os }}${{ inputs.python_version }}-data-${{ github.sha }}

- name: Prove that the input file is available
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:
# - platform-xtest
# - mavenverify
# - pr
# runs-on: ubuntu-latest
# runs-on: ubuntu-22.04
# if: always()
# steps:
# - if: contains(needs.*.result, 'failure')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
build_linux_x86_64:
# if: false
name: Linux Python x86_64
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

build_linux_arm:
name: Linux Python ARM
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
# This permission is mandatory for PyPI's trusted publishing
id-token: write
needs: [build_macos, build_linux_x86_64, build_linux_arm]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# If branch is 'develop'
if: github.ref == 'refs/heads/develop'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
build_linux_x86_64:
# if: false
name: Linux Python x86_64
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

build_linux_arm:
name: Linux Python ARM
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
# This permission is mandatory for PyPI's trusted publishing
id-token: write
needs: [build_macos, build_linux_x86_64, build_linux_arm]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# If branch is 'main'
if: github.ref == 'refs/heads/main'

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Install from the [Python Package Index (PyPI)](https://pypi.org):
pip install otdf_python

# Install a pinned version
pip install otdf-python==0.2.3
pip install otdf-python==0.2.4

# Install a pinned version, from test.pypi.org
pip install -i https://test.pypi.org/simple/ otdf-python==0.2.3
pip install -i https://test.pypi.org/simple/ otdf-python==0.2.4
```

## Usage
Expand Down
24 changes: 20 additions & 4 deletions build-scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,63 @@ printf """

"""

echo "✨✨✨ Display Python version"
echo "python -VV"
python -VV

echo "✨✨✨ Display Python executable path"
echo 'python -c "import sys; print(sys.executable)"'
python -c "import sys; print(sys.executable)"

echo "✨✨✨ Display pip version"
echo 'pip -V'
pip -V

echo "✨✨✨ Install poetry"
echo 'pip install poetry'
pip install poetry

echo "✨✨✨ List home directory contents"
# Look for go/bin (skip, we know it exists)
echo '$HOME/'
ls -la "$HOME/"

echo '$HOME/.local/'
ls -la "$HOME/.local/"

echo "✨✨✨ List Go directory contents"
echo '$HOME/go/'
ls -la "$HOME/go/"

echo "✨✨✨ Display Go version"
go version

echo "✨✨✨ Add Go bin directory to PATH"
# Add Go bin directory to PATH
echo "export PATH=$PATH:~/.local/go/bin" >> $GITHUB_ENV

echo "✨✨✨ Install dependencies with poetry"
# Since we don't have our wheel build / install configured yet we use '--no-root'
poetry install --no-root

echo "✨✨✨ Activate poetry environment"
source $(poetry env info --path)/bin/activate

echo "✨✨✨ Add Go bin directory to PATH again"
# Add Go bin directory to PATH
echo "export PATH=$PATH:~/.local/go/bin" >> $GITHUB_ENV

echo "✨✨✨ Install goimports"
go install golang.org/x/tools/cmd/goimports@latest

echo "✨✨✨ Install gopy"
go install github.com/go-python/gopy@latest

echo "✨✨✨ Upgrade setuptools and wheel"
poetry run pip install --upgrade setuptools wheel

echo "✨✨✨ Build gopy"
gopy build --output=otdf_python -vm=python3 .

echo "✨✨✨ Build wheel"
poetry run python3 setup.py bdist_wheel

pip install dist/otdf_python-0.2.3-py3-none-any.whl
echo "✨✨✨ Install wheel"
pip install dist/otdf_python-0.2.4-py3-none-any.whl
2 changes: 1 addition & 1 deletion build-scripts/make_and_validate_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ python3 -m pip install --upgrade setuptools wheel
python3 setup.py bdist_wheel

# Prove that the wheel can be installed
pip install dist/otdf_python-0.2.3-py3-none-any.whl
pip install dist/otdf_python-0.2.4-py3-none-any.whl

if [[ "$SKIP_TESTS" == "-s" || "$SKIP_TESTS" == "--skip-tests" ]]; then
echo "Build is complete, skipping tests."
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/uv_make_and_validate_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ loud_print "Installing wheel"
uv venv .venv-wheel --python 3.12 "$PY_TYPE"
source "${BUILD_ROOT}/.venv-wheel/bin/activate"
pip install pybindgen
pip install dist/otdf_python-0.2.3-py3-none-any.whl
pip install dist/otdf_python-0.2.4-py3-none-any.whl

if [[ "$SKIP_TESTS" == "-s" || "$SKIP_TESTS" == "--skip-tests" ]]; then
echo "Build is complete, skipping tests."
Expand Down
Loading
Loading