Skip to content

Commit

Permalink
build: add python dev (#126)
Browse files Browse the repository at this point in the history
* build: add python dev

* build: update ci
  • Loading branch information
vishwa2710 committed Jun 9, 2024
1 parent d7b344e commit f9f46ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/build-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,42 +55,29 @@ jobs:
target: base1
secrets: inherit

build-part2-of-base-image:
name: Build Part 2 of Base Image
build-part2-and-push-and-tag-base-image:
name: Build Part 2 and Push and Tag Base Image with Version
needs:
- prepare-environment
- build-part1-of-base-image
uses: ./.github/workflows/build-image.yml
with:
project_name: ${{ needs.prepare-environment.outputs.project_name }}
project_version: ${{ needs.prepare-environment.outputs.project_version }}
push: false
target: base2
secrets: inherit

build-part3-and-push-and-tag-base-image:
name: Build Part 3 and Push and Tag Base Image with Version
needs:
- prepare-environment
- build-part2-of-base-image
uses: ./.github/workflows/build-image.yml
with:
project_name: ${{ needs.prepare-environment.outputs.project_name }}
project_version: ${{ needs.prepare-environment.outputs.project_version }}
push: true
target: base3
target: base2
secrets: inherit

push-and-tag-base-image-as-latest:
if: github.event_name == 'release' && github.event.action == 'published'
name: Push and Tag Base Image as Latest
needs:
- prepare-environment
- build-part3-and-push-and-tag-base-image
- build-part2-and-push-and-tag-base-image
uses: ./.github/workflows/build-image.yml
with:
project_name: ${{ needs.prepare-environment.outputs.project_name }}
project_version: latest
push: true
target: base3
target: base2
secrets: inherit
23 changes: 8 additions & 15 deletions docker/development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,22 @@ RUN wget https://apt.llvm.org/llvm-snapshot.gpg.key \

## Python

FROM base1 as base2

RUN add-apt-repository ppa:deadsnakes/ppa

RUN apt-get update && apt-get install -y \
python3.8 \
python3.8-distutils \
python3.9 \
python3.9-distutils \
python3.10 \
python3.10-distutils \
python3.11 \
python3.11-distutils \
python3.12 \
python3.12-distutils
python3.8 python3.8-distutils python3.8-dev \
python3.9 python3.9-distutils python3.9-dev \
python3.10 python3.10-distutils python3.10-dev \
python3.11 python3.11-distutils python3.11-dev \
python3.12 python3.12-distutils python3.12-dev

RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.8 && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9 && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12

FROM base2 as base3
FROM base1 as base2

## Python tools

Expand All @@ -109,8 +102,8 @@ RUN python3.8 -m pip install --upgrade pip ipython \
&& python3.11 -m pip install --upgrade pip ipython \
&& python3.12 -m pip install --upgrade pip ipython \
&& python3.8 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen \
&& python3.9 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen\
&& python3.10 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen\
&& python3.9 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen \
&& python3.10 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen \
&& python3.11 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen \
&& python3.12 -m pip install --upgrade setuptools build wheel twine pytest pybind11-stubgen

Expand Down

0 comments on commit f9f46ee

Please sign in to comment.