Skip to content

Commit

Permalink
Merge pull request #17 from bestie/docker-build
Browse files Browse the repository at this point in the history
Compile using Docker and GitHub actions
  • Loading branch information
RobertDaleSmith authored Jan 15, 2024
2 parents 65c7806 + b80781e commit a445d99
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build USBRetro

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build Docker image and compile for all consoles
run: |
docker build -t usbretro .
docker run --rm -v ${{ github.workspace }}/src/build:/root/workspace/USBRetro/src/build usbretro /bin/bash -c "sh build.sh && cd build && cmake .. && make"
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: all_console_firmwares_raspberry_pi_pico
path: ${{ github.workspace }}/src/build/*.uf2
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM docker.io/debian:buster-slim

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -y build-essential cmake git
RUN apt install -y gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
RUN apt install -y python3 python3-pip
RUN apt install -y vim
RUN apt autoremove && apt clean

RUN mkdir -p /root/workspace/USBRetro
WORKDIR /root/workspace

RUN git clone --branch 1.5.1 https://github.com/raspberrypi/pico-sdk.git
ENV PICO_SDK_PATH=/root/workspace/pico-sdk
WORKDIR /root/workspace/pico-sdk/lib/tinyusb
RUN git submodule init
RUN git submodule update
RUN git checkout 4b3b401ce

WORKDIR /root/workspace/USBRetro
COPY . .
RUN git submodule init
RUN git submodule update

WORKDIR /root/workspace/USBRetro/src

CMD ["/bin/bash"]

0 comments on commit a445d99

Please sign in to comment.