Lima python is again available from pip #184
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
repository_dispatch: | |
types: [trigger_workflow] | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
MANYLINUX_TAG: "2022-10-25-fbea779" | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
PYTHON_VERSION: "3.7" | |
PYTHON_SHORT_VERSION: "cp37-cp37m" | |
PYTHON_WHEEL_VERSION: "cp37-abi3" | |
PYTHON_FULL_VERSION: "3.7.15" | |
PYSIDE_VERSION: "6" | |
QT_VERSION_MAJOR: "6" | |
QT_VERSION_MINOR: "5" | |
QT_VERSION_PATCH: "2" | |
QT_VERSION: "6.5" | |
QT_FULL_VERSION: "6.5.2" | |
GCC_VERSION: "11.2.1" | |
LLVM_VERSION: "13.0.1" | |
LIMA_PYTHON_VERSION: "0.5.0b6" | |
jobs: | |
lima-python: | |
name: "Build the lima-python image with Qt ${QT_VERSION} for python ${PYTHON_VERSION}" | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.AYMARA_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.AYMARA_DOCKERHUB_TOKEN }} | |
- name: "Checkout code" | |
uses: actions/checkout@v2 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@v1.2.0 | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: false | |
swap-storage: true | |
- name: "Build image" | |
run: docker build -f Dockerfile-manylinux_2_28 --build-arg MANYLINUX_TAG="${MANYLINUX_TAG}" --build-arg PYSIDE_VERSION="${PYSIDE_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg PYTHON_SHORT_VERSION=${PYTHON_SHORT_VERSION} --build-arg PYTHON_FULL_VERSION=${PYTHON_FULL_VERSION} --build-arg LIMA_PYTHON_VERSION=${LIMA_PYTHON_VERSION} --build-arg PYTHON_WHEEL_VERSION="${PYTHON_WHEEL_VERSION}" --build-arg BRANCH="${{ github.ref_name }}" --build-arg QT_FULL_VERSION="${QT_FULL_VERSION}" --build-arg QT_VERSION_MAJOR="${QT_VERSION_MAJOR}" --build-arg QT_VERSION_MINOR="${QT_VERSION_MINOR}" --build-arg QT_VERSION_PATCH="${QT_VERSION_PATCH}" --build-arg QT_VERSION="${QT_VERSION}" -t aymara/lima-python${PYTHON_VERSION}:latest . | |
- name: "Push image" | |
run: docker push aymara/lima-python${PYTHON_VERSION}:latest | |
- uses: shrink/actions-docker-extract@v2 | |
id: extract | |
with: | |
image: aymara/lima-python${PYTHON_VERSION}:latest | |
path: /lima-python/wheelhouse/aymara-${LIMA_PYTHON_VERSION}-${PYTHON_WHEEL_VERSION}-manylinux_2_28_x86_64.whl | |
destination: dist | |
# - name: move wheel | |
# run: mv .extracted-*/aymara-${LIMA_PYTHON_VERSION}-${PYTHON_WHEEL_VERSION}-manylinux_2_28_x86_64.whl ${{ github.workspace }}/aymara-${LIMA_PYTHON_VERSION}-${PYTHON_WHEEL_VERSION}-manylinux_2_28_x86_64.whl | |
- name: upload wheel artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: aymara-${{ env.LIMA_PYTHON_VERSION }}-${{env.PYTHON_WHEEL_VERSION}}-manylinux_2_28_x86_64.whl | |
path: dist | |
if-no-files-found: error | |
overwrite: true | |
compression-level: 0 # wheels are already zip files | |
lima-python-tests: | |
name: "Build the lima-python test image with Qt ${QT_VERSION} for python ${PYTHON_VERSION}" | |
runs-on: ubuntu-latest | |
needs: lima-python | |
permissions: | |
contents: write | |
steps: | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.AYMARA_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.AYMARA_DOCKERHUB_TOKEN }} | |
- name: "Checkout code" | |
uses: actions/checkout@v2 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@v1.2.0 | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: false | |
swap-storage: true | |
- name: "Build image" | |
run: docker build -f Dockerfile-tests-actions --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg PYTHON_WHEEL_VERSION="${PYTHON_WHEEL_VERSION}" --build-arg LIMA_PYTHON_VERSION=${LIMA_PYTHON_VERSION} . | |
# Retrieve artifact from build job | |
- name: Download wheel artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
name: aymara-${{ env.LIMA_PYTHON_VERSION }}-${{env.PYTHON_WHEEL_VERSION}}-manylinux_2_28_x86_64.whl | |
# - run: zip -r dist.zip dist/ | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: dist/aymara-${{ env.LIMA_PYTHON_VERSION }}-${{env.PYTHON_WHEEL_VERSION}}-manylinux_2_28_x86_64.whl | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
prerelease: true | |
tag: continuous | |
commit: ${{ github.ref_name }} |