Skip to content

eeprom: Add additional eeprom adjustments #40

eeprom: Add additional eeprom adjustments

eeprom: Add additional eeprom adjustments #40

Workflow file for this run

name: Xbox
on: [push, pull_request]
jobs:
Xbox:
runs-on: ubuntu-latest
steps:
- name: Install and Setup Dependencies
run: |
sudo apt-get update -y && sudo apt-get install -y python3-pip qemu-utils
pip3 install --upgrade pip
pip3 install pyfatx libqcow-python
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
# Git tags need to be generated before compilation so CI build picks up the latest release
- name: Set release tag name
id: release_tag
run: echo "tag=v$(date +'%Y%m%d-%H%M')" >> "$GITHUB_OUTPUT"
- name: Create Git tag
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git tag "${{ steps.release_tag.outputs.tag }}"
git push origin "${{ steps.release_tag.outputs.tag }}"
- name: Compile program
run: |
docker run --rm \
-v "$(pwd)":/workspace -w /workspace \
ghcr.io/xboxdev/nxdk:latest \
sh -c "apk add --no-cache git && \
git config --global --add safe.directory /workspace && \
mkdir -p build && cd build && \
cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/src/nxdk/share/toolchain-nxdk.cmake -DCMAKE_BUILD_TYPE=Release && \
cmake --build ."
- name: Generate HDD Image
run: |
mkdir c
cp build/default.xbe c/xboxdash.xbe
python3 scripts/create_hdd_image.py c -o xbox_hdd.img
qemu-img convert -f raw -O qcow2 -c xbox_hdd.img xbox_hdd.qcow2
rm xbox_hdd.img
- name: Prepare artifact
run: |
mkdir -p artifact
cp xbox_hdd.qcow2 artifact/xbox_hdd.qcow2
cp build/xemu-dashboard.iso artifact/xemu-dashboard.iso
cp build/default.xbe artifact/default.xbe
{
echo "==== LICENSE for xemu-dashboard ===="
cat LICENSE
echo
echo "==== LICENSE for ftpd ===="
cat lib/ftpd/LICENSE
echo
echo "==== LICENSE for nanoprintf ===="
cat lib/nanoprintf/LICENSE
echo
echo "==== LICENSE for stb ===="
cat lib/stb/LICENSE
echo
echo "==== LICENSE for xgu ===="
cat lib/xgu/LICENSE
echo
echo "==== LICENSE for RobotoMono-Regular.ttf ===="
cat assets/LICENSE_roboto_mono
echo
echo "==== LICENSE for UbuntuMono-Regular.ttf ===="
cat assets/LICENSE_ubuntu_mono
echo
echo "==== LICENSE for SHA1/RC4 functions ===="
cat lib/xbox_eeprom/LICENSE
echo
echo "==== LICENSE for json parser ===="
cat lib/json/LICENSE
echo
echo "==== LICENSE for mbedtls ===="
cat lib/mbedtls/LICENSE
echo
} > artifact/LICENSE
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: xemu-dashboard
path: artifact
- name: Create GitHub Release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.release_tag.outputs.tag }}
name: "Build ${{ steps.release_tag.outputs.tag }}"
files: artifact/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}