diff --git a/.github/workflows/build-cross-action.yml b/.github/workflows/build-cross-action.yml index 9a317ef0..747ecd0c 100644 --- a/.github/workflows/build-cross-action.yml +++ b/.github/workflows/build-cross-action.yml @@ -37,10 +37,7 @@ jobs: ( matrix.host != matrix.target && inputs.kind == "cross" ) runs-on: - - self-hosted - - linux - - src-build - - ${{ matrix.host }} + - ${{ (contains(matrix.host, "x86_64") && "linux-x86_64") || "linux-arm64" }} env: RELENV_DATA: ${{ github.workspace }} @@ -56,8 +53,9 @@ jobs: - name: Install Dependencies run: | sudo apt-get update - sudo apt-get install -y build-essential bison python3-all patchelf swig - python3 -m pip install nox + sudo apt-get install -y build-essential bison python3-all patchelf swig python3-virtualenv + virtualenv venv + venv/bin/pip3 install nox - name: Python Version run: | diff --git a/.github/workflows/build-native-action.yml b/.github/workflows/build-native-action.yml index 6ae3fcdd..24eea204 100644 --- a/.github/workflows/build-native-action.yml +++ b/.github/workflows/build-native-action.yml @@ -32,10 +32,7 @@ jobs: name: "Python ${{ matrix.version }} Linux ${{ matrix.target }} on ${{ matrix.host }}" runs-on: - - self-hosted - - linux - - src-build - - ${{ matrix.host }} + - ${{ (contains(matrix.host, 'x86_64') && 'linux-x86_64') || 'linux-arm64' }} env: RELENV_DATA: ${{ github.workspace }} @@ -46,13 +43,14 @@ jobs: - name: Install Dependencies run: | 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 -m pip install nox + 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 - name: Python Version run: | - python3 --version - python3 -c 'import os; print(os.name)' + venv/bin/python3 --version + venv/bin/python3 -c 'import os; print(os.name)' - name: Download Toolchain Artifact uses: actions/download-artifact@v4 @@ -67,12 +65,12 @@ jobs: - name: Build run: | - python3 -m relenv build --arch=${{ matrix.target }} --python=${{ matrix.version }} + venv/bin/python3 -m relenv build --arch=${{ matrix.target }} --python=${{ matrix.version }} - name: Verify Build if: ${{ matrix.host == matrix.target }} run: | - python3 -m nox -e tests -- -s tests/test_verify_build.py + venv/bin/python3 -m nox -e tests -- -s tests/test_verify_build.py - name: Linux Logs uses: actions/upload-artifact@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32a25902..8db8aece 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,27 +126,27 @@ jobs: with: changed-files: ${{ needs.get-changed-files.outputs.changed-files }} - 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 }}" + #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 }}" - upload-toolchain-artifacts: - name: Deploy Toolchain - if: ${{ inputs.kind == 'release' && success() }} - uses: ./.github/workflows/deploy-toolchain-action.yml - needs: - - build-python-package - - toolchain - with: - version: "${{ needs.build-python-package.outputs.version }}" + #upload-toolchain-artifacts: + # name: Deploy Toolchain + # if: ${{ inputs.kind == 'release' && success() }} + # uses: ./.github/workflows/deploy-toolchain-action.yml + # needs: + # - build-python-package + # - toolchain + # with: + # version: "${{ needs.build-python-package.outputs.version }}" deploy-python-package: name: Deploy Python Package @@ -158,8 +158,8 @@ jobs: - docs - build-python-package - test-fips - - upload-build-artifacts - - upload-toolchain-artifacts + # - upload-build-artifacts + # - upload-toolchain-artifacts create-release: name: Create Github Release @@ -185,8 +185,8 @@ jobs: #- build-cross - test - docs - - upload-build-artifacts - - upload-toolchain-artifacts + # - upload-build-artifacts + # - upload-toolchain-artifacts - deploy-python-package - create-release steps: diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 74fad118..7980e156 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -11,6 +11,84 @@ jobs: release: name: Create Github Release runs-on: ubuntu-latest + strategy: + matrix: + include: + - platform: linux-gnu + arch: x86_64 + python: 3.10.15 + - platform: linux-gnu + arch: x86_64 + python: 3.11.10 + - platform: linux-gnu + arch: x86_64 + python: 3.12.7 + - platform: linux-gnu + arch: x86_64 + python: 3.13.0 + - platform: linux-gnu + arch: aarch64 + python: 3.10.15 + - platform: linux-gnu + arch: aarch64 + python: 3.11.10 + - platform: linux-gnu + arch: aarch64 + python: 3.12.7 + - platform: linux-gnu + arch: aarch64 + python: 3.13.0 + + - platform: win + arch: x86 + python: 3.10.15 + - platform: win + arch: x86 + python: 3.11.10 + - platform: win + arch: x86 + python: 3.12.7 + - platform: win + arch: x86 + python: 3.13.0 + - platform: win + arch: amd64 + python: 3.10.15 + - platform: win + arch: amd64 + python: 3.11.10 + - platform: win + arch: amd64 + python: 3.12.7 + - platform: win + arch: amd64 + python: 3.13.0 + + - platform: macos + arch: x86_64 + python: 3.10.15 + - platform: macos + arch: x86_64 + python: 3.11.10 + - platform: macos + arch: x86_64 + python: 3.12.7 + - platform: macos + arch: x86_64 + python: 3.13.0 + - platform: macos + arch: arm64 + python: 3.10.15 + - platform: macos + arch: arm64 + python: 3.11.10 + - platform: macos + arch: arm64 + python: 3.12.7 + - platform: macos + arch: arm64 + python: 3.13.0 + steps: - name: Download Python Build Artifacts uses: actions/download-artifact@v4 @@ -24,6 +102,12 @@ jobs: name: Python Wheel path: dist + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.xz + path: release-artifacts/ + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -58,3 +142,11 @@ jobs: asset_path: dist/relenv-${{ inputs.version }}-py3-none-any.whl asset_name: relenv-${{ inputs.version }}-py3-none-any.whl asset_content_type: application/zip + + - name: Upload Release artifacts + id: upload-python-build-assets + uses: actions/upload-release-asset@v1 + with: + name: ${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.xz + path: release-artifacts/ + asset_content_type: application/tar+xz diff --git a/.github/workflows/toolchain-action.yml b/.github/workflows/toolchain-action.yml index 48977be1..e2351435 100644 --- a/.github/workflows/toolchain-action.yml +++ b/.github/workflows/toolchain-action.yml @@ -15,10 +15,7 @@ jobs: name: "Toolchain ${{ matrix.target }} on ${{ matrix.host }}" runs-on: - - self-hosted - - linux - - src-build - - ${{ matrix.host }} + - ${{ (contains(matrix.host, 'x86_64') && 'linux-x86_64') || 'linux-arm64' }} #if: fromJSON(inputs.changed-files)['toolchain'] == 'true' diff --git a/relenv/common.py b/relenv/common.py index b9bf6c5b..3397ac9e 100644 --- a/relenv/common.py +++ b/relenv/common.py @@ -18,7 +18,7 @@ import time # relenv package version -__version__ = "0.17.4" +__version__ = "0.17.40000000" MODULE_DIR = pathlib.Path(__file__).resolve().parent @@ -28,7 +28,11 @@ MACOS_DEVELOPMENT_TARGET = "10.15" -CHECK_HOSTS = ("repo.saltproject.io", "woz.io") +CHECK_HOSTS = ( + "packages.broadcom.com/artifactory/saltproject-generic", + "repo.saltproject.io", + "woz.io", +) arches = { LINUX: ( diff --git a/relenv/toolchain.py b/relenv/toolchain.py index c301affa..e20f707d 100644 --- a/relenv/toolchain.py +++ b/relenv/toolchain.py @@ -30,6 +30,8 @@ TC_URL = "https://{hostname}/relenv/{version}/toolchain/{host}/{triplet}.tar.xz" CICD = "CI" in os.environ +LAST_RELENV_W_TOOLCHAIN = "0.17.4" + def setup_parser(subparsers): """ @@ -91,7 +93,10 @@ def fetch(arch, toolchain, clean=False, version=__version__): check_hosts = [os.environ["RELENV_FETCH_HOST"]] for host in check_hosts: url = TC_URL.format( - hostname=host, version=version, host=platform.machine(), triplet=triplet + hostname=host, + version=LAST_RELENV_W_TOOLCHAIN, + host=platform.machine(), + triplet=triplet, ) if check_url(url, timeout=5): break