-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from bestie/docker-build
Compile using Docker and GitHub actions
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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"] |