Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f87f2a8
Use ppbt toolchain when building.
dwoz Sep 20, 2024
e5192f0
Add ppbt to build dependencies
dwoz Sep 20, 2024
f4c6afc
Fix ppbt import and extract
dwoz Sep 20, 2024
aa78ec5
Fix unit tests
dwoz Sep 20, 2024
019dc3c
Add no-pretty argument for building
dwoz Sep 20, 2024
e567f3c
Add ppbt to test and docs deps
dwoz Sep 20, 2024
a40d327
Add ppbt to test requirements
dwoz Sep 20, 2024
77cf2bd
Only require ppbt on linux
dwoz Sep 20, 2024
2a300ac
ppbt is in requirements file
dwoz Sep 22, 2024
64e997f
Fix unit test on non linux platforms
dwoz Oct 21, 2024
c7b0878
fix tests/test_verify_build.py::test_pip_install_salt_git
dwoz Oct 21, 2024
264ca63
Fix command order
dwoz Feb 28, 2025
4c3ba44
Move cargo home directory to relenv data dir
dwoz Feb 28, 2025
f6a5dae
Make ppbt optional
dwoz Mar 1, 2025
d001c34
Skip ppbt when not on linux
dwoz Mar 1, 2025
7a3cd19
Do not raise missing ppbt unless on linux
dwoz Mar 1, 2025
653be02
Clean up and simplify
dwoz Mar 1, 2025
028ed1b
Wrap ppbt import in exception handler
dwoz Mar 1, 2025
460e9bd
Fix function call
dwoz Mar 1, 2025
5135586
Log detected version
dwoz Mar 1, 2025
d58dce6
Fix build unit test
dwoz Mar 1, 2025
18578ed
Cleaner syntax
dwoz Mar 1, 2025
ec477ed
run ppbt extract to test why cryptography failes
dwoz Mar 1, 2025
c5b65b6
Do not hide errors
dwoz Mar 2, 2025
6d96af5
Toolchains only exist on linux
dwoz Mar 2, 2025
b8b2504
Fix pre-commit wart
dwoz Mar 2, 2025
a3529f2
Only linux has toolchains
dwoz Mar 2, 2025
4072eb2
Install ppbt for fips tests
dwoz Mar 3, 2025
41756f5
Add python3-devel to system dependencies for fips tests
dwoz Mar 3, 2025
1ea27bd
Add glibc-devel to fips system deps
dwoz Mar 3, 2025
7d28990
debug pip
dwoz Mar 4, 2025
a5b7659
fix order
dwoz Mar 4, 2025
29de542
Fix fips test failures
dwoz Mar 6, 2025
8f387b4
Add pyversions
dwoz May 9, 2025
3a408e6
Detect python versions
dwoz May 10, 2025
c289cfc
Add our own version class
dwoz May 10, 2025
6539a98
install ppbt on editable tests
dwoz Jul 13, 2025
5ee0520
Install ppbt before cryptography
dwoz Jul 13, 2025
7bd6ac8
Print know versions
dwoz Jul 13, 2025
cf26674
Update versions
dwoz Jul 13, 2025
e5cbf1c
Clean up cruft
dwoz Jul 13, 2025
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-cross-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential bison python3-all patchelf swig python3-virtualenv
virtualenv venv
venv/bin/pip3 install nox
env/bin/python3 -m pip install nox ppbt

- name: Python Version
run: |
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/build-native-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,16 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential bison python3-all patchelf swig cmake libldap2-dev libsasl2-dev ldap-utils libssl-dev pkg-config libvirt-dev default-libmysqlclient-dev python3-virtualenv
virtualenv venv
venv/bin/pip3 install nox
venv/bin/python3 -m pip install nox ppbt

- name: Python Version
run: |
venv/bin/python3 --version
venv/bin/python3 -c 'import os; print(os.name)'

- name: Download Toolchain Artifact
uses: actions/download-artifact@v4
with:
name: toolchain-${{ matrix.host }}-${{ matrix.target }}-linux-gnu.tar.xz
path: .

- name: Extract Toolchain Artifact
run: |
mkdir -p toolchain
tar -C toolchain -xvf toolchain-${{ matrix.host }}-${{ matrix.target }}-linux-gnu.tar.xz

- name: Build
run: |
venv/bin/python3 -m relenv build --arch=${{ matrix.target }} --python=${{ matrix.version }}
venv/bin/python3 -m relenv build --no-pretty --arch=${{ matrix.target }} --python=${{ matrix.version }}

- name: Verify Build
if: ${{ matrix.host == matrix.target }}
Expand All @@ -87,7 +76,7 @@ jobs:

- name: "Upload artifact: build/${{ matrix.version }}-${{ matrix.target }}-linux-gnu.tar.xz"
uses: actions/upload-artifact@v4
if: ${{ matrix.host == matrix.target && always()}}
if: ${{ matrix.host == matrix.target && always() }}
with:
name: ${{ matrix.version }}-${{ matrix.target }}-linux-gnu.tar.xz
path: build/${{ matrix.version }}-${{ matrix.target }}-linux-gnu.tar.xz
Expand Down Expand Up @@ -130,7 +119,7 @@ jobs:

- name: Build
run: |
python3 -m relenv build --python=${{ matrix.version }}
python3 -m relenv build --no-pretty --python=${{ matrix.version }}

- name: Verify Build
run: |
Expand Down Expand Up @@ -188,7 +177,7 @@ jobs:

- name: Build
run: |
python3 -m relenv build --python=${{ matrix.version }}
python3 -m relenv build --no-pretty --python=${{ matrix.version }}

- name: Verify Build
run: |
Expand Down
42 changes: 15 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ jobs:
deleted:
- deleted:
- '**'
toolchain:
- added|modified:
- '.github/workflows/*toolchain*.yml'
- 'relenv/toolchain.py'
- 'relenv/_toolchain/**'

pre-commit:
name: Pre-Commit
uses: ./.github/workflows/pre-commit-action.yml
Expand All @@ -79,20 +73,11 @@ jobs:
kind: "${{ inputs.kind }}"
cmd: "${{ inputs.package_command }}"

toolchain:
name: Toolchain Builds
uses: ./.github/workflows/toolchain-action.yml
needs:
- get-changed-files
with:
changed-files: ${{ needs.get-changed-files.outputs.changed-files }}

build-native:
name: Python Native Builds
uses: ./.github/workflows/build-native-action.yml
needs:
- get-changed-files
- toolchain
with:
changed-files: ${{ needs.get-changed-files.outputs.changed-files }}

Expand All @@ -103,17 +88,6 @@ jobs:
- get-changed-files
uses: ./.github/workflows/test-fips-action.yml

#build-cross:
# name: Python Cross Builds
# uses: ./.github/workflows/build-action.yml
# needs:
# - get-changed-files
# - toolchain
# - build-native
# with:
# changed-files: ${{ needs.get-changed-files.outputs.changed-files }}
# kind: "cross"

test:
name: Test
needs:
Expand Down Expand Up @@ -142,6 +116,18 @@ jobs:
# - test-fips
# secrets:
# PYPI_API_TOKEN: "${{ secrets.PYPI_API_TOKEN }}"
#
upload-build-artifacts:
name: Deploy Prebuilt Python Builds
if: ${{ inputs.kind == 'release' && success() }}
uses: ./.github/workflows/deploy-build-action.yml
needs:
- build-python-package
- build-native
- test-fips
#- build-cross
with:
version: "${{ needs.build-python-package.outputs.version }}"

deploy-python-package:
name: "Deploy python package"
Expand All @@ -153,6 +139,7 @@ jobs:
- docs
- build-python-package
- test-fips
- upload-build-artifacts
steps:
- uses: actions/create-github-app-token@v1
id: app-token
Expand Down Expand Up @@ -185,14 +172,15 @@ jobs:
if: always()
needs:
- pre-commit
- toolchain
- build-native
#- build-cross
- test
- docs
- upload-build-artifacts
- deploy-python-package
- create-release
steps:

- name: Get workflow information
id: get-workflow-info
uses: technote-space/workflow-conclusion-action@v3
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test-fips-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Install System Dependencies
run: |
yum install -y openssl-fips-provider python3 python3-virtualenv git gcc
yum install -y openssl-fips-provider python3 python3-devel python3-virtualenv git gcc binutils glibc-devel linux-api-headers libffi-devel

- uses: actions/checkout@v3

Expand All @@ -41,6 +41,12 @@ jobs:
run: |
virtualenv venv

- name: Pip debug
run: |
./venv/bin/python3 -m pip install --upgrade pip
./venv/bin/python3 -c 'import platform; print(platform.libc_ver())'
./venv/bin/pip3 debug --verbose

- name: Install Virtual Environment Dependencies
run: |
./venv/bin/pip3 install -r requirements/tests.txt
Expand Down
6 changes: 0 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ def build(session, arch):
invoke_relenv(session, "build", f"--arch={arch}")


@nox.session
@nox.parametrize("arch", ("x86_64", "aarch64"))
def toolchain(session, arch):
invoke_relenv(session, "toolchain", "build", f"--arch={arch}")


# Convenience sessions
@nox.session
def build_x86_64(session):
Expand Down
8 changes: 4 additions & 4 deletions relenv/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from argparse import ArgumentParser

from . import build, buildenv, check, create, fetch, toolchain
from . import build, buildenv, check, create, fetch, pyversions, toolchain
from .common import __version__


Expand Down Expand Up @@ -34,6 +34,7 @@ def setup_cli():
fetch,
check,
buildenv,
pyversions,
]
for mod in modules_to_setup:
mod.setup_parser(subparsers)
Expand All @@ -47,10 +48,9 @@ def main():
"""
parser = setup_cli()
args = parser.parse_args()
# args.func(args)
try:
if hasattr(args, "func"):
args.func(args)
except AttributeError:
else:
parser.print_help()
parser.exit(1, "\nNo subcommand given...\n\n")

Expand Down
Loading