feat: add OCB
This commit is contained in:
parent
70847fa3e0
commit
b2692ef67d
2 changed files with 89 additions and 0 deletions
70
.forgejo/workflows/ocb.yaml
Normal file
70
.forgejo/workflows/ocb.yaml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
name: Build OCB
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 10 * * 0"
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths: [".forgejo/workflows/ocb.yaml", "OCB/**/*"]
|
||||
|
||||
env:
|
||||
REPOSITORY_URL: https://cmwedding-bot:${{ secrets.FORGEJO_TOKEN }}@git.weddingfactory.eu/api/packages/cmwedding/pypi
|
||||
ODOO_VERSION: "17.0"
|
||||
|
||||
jobs:
|
||||
check-version-exists:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
version: ${{ steps.check.outputs.version }}
|
||||
|
||||
steps:
|
||||
- id: check
|
||||
uses: https://git.weddingfactory.eu/cmwedding/wheels@b9ce80f179a5ec9c8a90c68ab4d6345737831467
|
||||
with:
|
||||
pypi-base-url: ${{ env.REPOSITORY_URL }}
|
||||
pypi-package: odoo
|
||||
github-repository: "OCA/OCB"
|
||||
unstable-branch: ${{ env.ODOO_VERSION }}
|
||||
|
||||
build:
|
||||
name: Build wheels on ${{ matrix.os }}
|
||||
|
||||
needs: check-version-exists
|
||||
if: needs.check-version-exists.outputs.version != ''
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- run: git clone --depth=1 https://github.com/OCA/OCB --branch ${{ env.ODOO_VERSION }} .
|
||||
|
||||
- name: Patch source
|
||||
run: |
|
||||
wget "https://git.weddingfactory.eu/cmwedding/wheels/raw/branch/main/OCB/pyproject.toml"
|
||||
sed -i 's/%s/${{ env.ODOO_VERSION }}/' pyproject.toml
|
||||
|
||||
- name: Build wheels
|
||||
uses: https://github.com/pypa/cibuildwheel@v2.23.3
|
||||
env:
|
||||
CIBW_BEFORE_ALL_LINUX: |
|
||||
pip3 install \
|
||||
-i "${{ env.REPOSITORY_URL }}" \
|
||||
--trusted-host git.weddingfactory.eu \
|
||||
psycopg2 \
|
||||
pycairo
|
||||
CIBW_BUILD: "cp31{0..1}-manylinux_{x86_64,aarch64}"
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
||||
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
|
||||
|
||||
- name: Publish package distributions to Forgejo
|
||||
run: |
|
||||
pip3 install twine
|
||||
python3 -m twine upload ./wheelhouse/*
|
||||
env:
|
||||
TWINE_REPOSITORY_URL: ${{ env.REPOSITORY_URL }}
|
||||
TWINE_NON_INTERACTIVE: 1
|
||||
|
||||
19
OCB/pyproject.toml
Normal file
19
OCB/pyproject.toml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[project]
|
||||
name = "odoo"
|
||||
version = "%s"
|
||||
dynamic = [
|
||||
"optional-dependencies",
|
||||
"dependencies",
|
||||
"classifiers",
|
||||
"authors",
|
||||
"license",
|
||||
"requires-python",
|
||||
"readme",
|
||||
"description"
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=41"]
|
||||
build-backend = "pep517_odoo"
|
||||
backend-path = ["setup"]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue