Skip to content

Maybe this time

Maybe this time #81

Workflow file for this run

name: Build
on:
push:
branches:
- main
- develop
- unstable
- ci
pull_request:
branches:
- main
- develop
- unstable
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
# TODO: eventually should set the PICO_SDK_PATH here
# PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Checkout PicoCart64
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
path: picocart64
- name: Checkout PicoCart64 submodules
working-directory: ${{github.workspace}}/picocart64
run: git submodule update --init
- name: Check for bad indentation
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
sudo apt-get install -y indent git
./picocart64/sw/scripts/indent.sh -c
- name: Checkout DragonMinded/libdragon
uses: actions/checkout@v2
with:
repository: DragonMinded/libdragon
path: libdragon
- name: Build testrom using the libdragon docker image
run: |
docker run \
--mount type=bind,source=$(pwd),target=/ci \
--workdir=/ci \
ghcr.io/dragonminded/libdragon:latest \
bash -c "\
git config --global --add safe.directory /ci/picocart64 && \
(cd libdragon && ./build.sh) && \
make -C ./picocart64/sw/n64/testrom"
mkdir artifacts
cp ./picocart64/sw/n64/testrom/build/testrom.z64 ./artifacts/
- name: Prepare test ROM for build
run: python3 picocart64/sw/scripts/load_rom.py --compress picocart64/sw/n64/testrom/build/testrom.z64
- name: Build PicoCart64 using the pico-sdk-builder docker image
run: |
docker run \
--mount type=bind,source=$(pwd),target=/ci \
--workdir=/ci \
ghcr.io/kbeckmann/pico-sdk-builder:latest \
bash -c "\
git config --global --add safe.directory /ci/picocart64 && \
mkdir picocart64/sw/build && \
cd picocart64/sw/build && \
cmake -DREGION=PAL .. && \
make && \
cp picocart64_v1/picocart64_v1.uf2 /ci/artifacts/picocart64-v1-pal.uf2 && \
\
cd .. && rm -rf build && mkdir build && cd build && \
cmake -DREGION=NTSC .. && \
make && \
cp picocart64_v1/picocart64_v1.uf2 /ci/artifacts/picocart64-v1-ntsc.uf2 && \
\
cd .. && rm -rf build && mkdir build && cd build && \
cmake -DREGION=PAL -DCPU_FREQ_MHZ=133 -DROM_HEADER_OVERRIDE=0x80372040 .. && \
make && \
cp picocart64_v1/picocart64_v1.uf2 /ci/artifacts/picocart64-v1-pal-133MHz.uf2 && \
\
cd .. && rm -rf build && mkdir build && cd build && \
cmake -DREGION=NTSC -DCPU_FREQ_MHZ=133 -DROM_HEADER_OVERRIDE=0x80372040 .. && \
make && \
cp picocart64_v1/picocart64_v1.uf2 /ci/artifacts/picocart64-v1-ntsc-133MHz.uf2"
- name: Upload PicoCart64 binaries with a bundled test rom to artifacts
uses: actions/upload-artifact@v3
with:
name: picocart64
path: |
${{ github.workspace }}/artifacts/*