Skip to content
Draft
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: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
cache: true
# Needed for the poetry plugin
charmcraft-snap-channel: latest/edge

integration-test:
strategy:
Expand Down
24 changes: 17 additions & 7 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ bases:
channel: "22.04"
architectures: [arm64]
parts:
charm:
rust-deps:
plugin: nil
build-snaps:
- rustup
build-packages:
Expand All @@ -20,14 +21,23 @@ parts:
- libpq-dev
override-build: |
rustup default stable

# Convert subset of poetry.lock to requirements.txt
poetry-deps:
plugin: nil
build-packages:
- curl
build-environment:
- POETRY_VERSION: "1.8.0"
override-build: |
curl -sSL https://install.python-poetry.org | python3 -
/root/.local/bin/poetry export --only main,charm-libs --output requirements.txt
ln -sf $HOME/.local/bin/poetry /usr/local/bin/poetry

craftctl default
charm-strict-dependencies: true
charm-requirements: [requirements.txt]
/usr/bin/python3 -m pip install pip==24.2
charm:
after: [rust-deps, poetry-deps]
plugin: poetry
source: .
poetry-with:
- charm-libs
libpq:
build-packages:
- libpq-dev
Expand Down
Loading