Skip to content

Commit

Permalink
Merge pull request #41 from Chia-Network/risc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender authored Sep 20, 2023
2 parents b7ffa73 + d88229a commit 8586c9b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-ubuntu-22.04-risc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Ubuntu 22.04 RISC Image

on:
push:
branches:
- main
paths:
- 'ubuntu-22.04-risc/*'
- '.github/workflows/build-ubuntu-22.04-risc.yml'
pull_request:
workflow_dispatch:
schedule:
- cron: '30 12 * * 5'

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true

jobs:
build:
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
with:
docker-context: "./ubuntu-22.04-risc"
dockerfile: "./ubuntu-22.04-risc/Dockerfile"
dockerhub_imagename: "chianetwork/ubuntu-22.04-risc-builder"
docker-platforms: linux/riscv64
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }}
19 changes: 19 additions & 0 deletions ubuntu-22.04-risc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM riscv64/ubuntu:focal

ENV PYENV_ROOT=/root/.pyenv
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"

RUN apt-get update && \
apt-get install -y build-essential curl git make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev && \
curl https://pyenv.run | bash && \
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \
pyenv global 3.11 && \
rm -rf /var/lib/apt/lists/*

ENV PATH="/root/.cargo/bin:${PATH}"
ENV RUST_BACKTRACE=1

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

0 comments on commit 8586c9b

Please sign in to comment.