Fix charm build.

Add check/gate charmbuild target.

Refresh test-requirements.

Update charmcraft to use rust >= 1.76 to support newer versions
of rpds-py.

Change-Id: I9fda331731d29fecccd0a9c59ece9aa00d065333
This commit is contained in:
James Page 2024-11-19 09:43:32 +00:00
parent 500565c654
commit 20f312ad9c
No known key found for this signature in database
GPG Key ID: BFECAECBA0E7D8C3
5 changed files with 37 additions and 85 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ interfaces
layers layers
*.swp *.swp
*.charm *.charm
.coverage

View File

@ -2,3 +2,8 @@
templates: templates:
- openstack-python3-charm-jobs - openstack-python3-charm-jobs
- openstack-cover-jobs - openstack-cover-jobs
check:
jobs:
- charmbuild
vars:
charm_build_name: ovn-dedicated-chassis

View File

@ -12,77 +12,33 @@ parts:
- python3-dev - python3-dev
- libffi-dev - libffi-dev
- libssl-dev - libssl-dev
- rustc - rustc-1.76
- cargo - cargo-1.76
- pkg-config
override-build: |
# Note(mylesjp): Force build to use rustc-1.76
ln -s /usr/bin/rustc-1.76 /usr/bin/rustc
ln -s /usr/bin/cargo-1.76 /usr/bin/cargo
craftctl default
build-snaps: build-snaps:
- charm - charm/latest/edge
build-environment: build-environment:
- CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/ - CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/
- CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/ - CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/
- MAKEFLAGS: -j$(nproc) - MAKEFLAGS: -j$(nproc)
- CARGO_HTTP_MULTIPLEXING: "false" - CARGO_HTTP_MULTIPLEXING: "false"
bases:
- build-on: base: ubuntu@24.04
- name: ubuntu platforms:
channel: "22.04" amd64:
architectures: [amd64] build-on: amd64
run-on: build-for: amd64
- name: ubuntu arm64:
channel: "22.04" build-on: arm64
architectures: [amd64] build-for: arm64
- build-on: ppc64el:
- name: ubuntu build-on: ppc64el
channel: "22.04" build-for: ppc64el
architectures: [s390x] s390x:
run-on: build-on: s390x
- name: ubuntu build-for: s390x
channel: "22.04"
architectures: [s390x]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
- build-on:
- name: ubuntu
channel: "23.10"
architectures: [amd64]
run-on:
- name: ubuntu
channel: "23.10"
architectures: [amd64]
- build-on:
- name: ubuntu
channel: "23.10"
architectures: [s390x]
run-on:
- name: ubuntu
channel: "23.10"
architectures: [s390x]
- build-on:
- name: ubuntu
channel: "23.10"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "23.10"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "23.10"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "23.10"
architectures: [arm64]

View File

@ -4,7 +4,6 @@
# https://github.com/openstack-charmers/release-tools # https://github.com/openstack-charmers/release-tools
# #
pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
stestr>=2.2.0 stestr>=2.2.0
@ -20,19 +19,5 @@ mock>=1.2
nose>=1.3.7 nose>=1.3.7
coverage>=3.6 coverage>=3.6
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
#
# Revisit for removal / mock improvement: netifaces
#
# NOTE(lourot): newer versions of cryptography require a Rust compiler to build,
# see
# * https://github.com/openstack-charmers/zaza/issues/421
# * https://mail.python.org/pipermail/cryptography-dev/2021-January/001003.html
#
netifaces # vault
psycopg2-binary # vault
tenacity # vault
pbr==5.6.0 # vault
cryptography<3.4 # vault, keystone-saml-mellon
lxml # keystone-saml-mellon
hvac # vault, barbican-vault
psutil # cinder-lvm

View File

@ -57,6 +57,11 @@ basepython = python3.10
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs} commands = stestr run --slowest {posargs}
[testenv:py312]
basepython = python3.12
deps = -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
deps = flake8==3.9.2 deps = flake8==3.9.2