Skip to content

Commit

Permalink
[pypy] devkit
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed May 7, 2024
1 parent 209b7eb commit 8b93c1b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .docker/pypy.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM debian:unstable AS build
ARG TARGETPLATFORM
ARG VERSION
RUN apt update && apt install -y wget adduser git
RUN adduser --disabled-password dev
USER dev
ENV PATH="/home/dev/.pypy/bin:$PATH"
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=linux64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=aarch64; else ARCHITECTURE=linux64; fi \
&& wget -nv https://downloads.python.org/pypy/pypy3.10-v7.3.16-${ARCHITECTURE}.tar.bz2 -O - \
| tar -xj -C /tmp \
&& mv /tmp/pypy3.10-v7.3.16-${ARCHITECTURE} /home/dev/.pypy

FROM scratch
COPY --from=build /home/dev/.pypy /home/dev/.pypy
28 changes: 28 additions & 0 deletions .github/workflows/devkit-pypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Devkit (pypy)

on:
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
lang: ["pypy"]
version: ["7.3.16"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish
uses: elgohr/Publish-Docker-Github-Action@main
with:
name: shish2k/rosettaboy-devkit-${{ matrix.lang }}
dockerfile: .docker/${{ matrix.lang }}.dockerfile
buildoptions: "--build-arg VERSION=${{ matrix.version }}"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: ${{ matrix.version }}
platforms: linux/amd64,linux/arm64

0 comments on commit 8b93c1b

Please sign in to comment.