Skip to content

Update 3ds.yml

Update 3ds.yml #31

Workflow file for this run

name: build 3ds rootfs
on:
workflow_dispatch:
workflow_call:
push:
jobs:

Check failure on line 9 in .github/workflows/3ds.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/3ds.yml

Invalid workflow file

You have an error in your yaml syntax on line 9
build-rootfs:
needs: srv-info
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: "Checkout Repo"
uses: actions/checkout@v4
# Cleanup The Actions Workspace Using Custom Composite Run Actions
- name: Cleanup
uses: rokibhasansagar/slimhub_actions@main
# That's it! Now use your normal steps
- name: Get Buildroot source
run: |
git clone https://github.com/linux-3ds/buildroot.git --depth=1
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- run: |
sudo apt-get install -y binutils build-essential git flex bison libssl-dev bc libgmp-dev subversion libmpc-dev
- run: cp 3ds_defconfig buildroot/configs/nintendo3ds_defconfig
- name: Configure
run: |
cd buildroot
time make nintendo3ds_defconfig V=1 VERBOSE=1 -j4
- name: Build
run: |
cd buildroot
time make all V=1 VERBOSE=1 -j4
- name: disk status
run: |
sudo df -h
echo ----------
sudo du -h buildroot
- name: Upload rootfs to Artifact
uses: actions/upload-artifact@v4
with:
name: "3ds-rootfs"
path: buildroot/output/images/rootfs.cpio.gz
build-arm9linuxfw:
needs: srv-info
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: "Pull Repo"
run: git clone https://github.com/linux-3ds/arm9linuxfw
- name: "Install Packages"
run: sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi
- name: Build
run: make -C arm9linuxfw -j4 V=1 VERBOSE=1
- name: Upload arm9linuxfw to Artifact
uses: actions/upload-artifact@v4
with:
name: "arm9linuxfw"
path: arm9linuxfw/arm9linuxfw.bin
build-kernel:
needs: [srv-info, build-rootfs]
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: "Pull Repo"
run: git clone https://github.com/linux-3ds/linux --depth=1
- name: Download Rootfs
uses: actions/download-artifact@v4
with:
name: 3ds-rootfs
path: linux/
- name: "Install Packages"
run: sudo apt-get install -y gcc-arm-linux-gnueabi binutils build-essential git flex bison libssl-dev bc axel libgmp-dev libmpc-dev jq
- name: Ccache for gh actions
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.os }}
- name: Build
env:
ARCH: "arm"
CROSS_COMPILE: "ccache arm-linux-gnueabi-"
run: |
export USE_CCACHE=1
make -C linux nintendo3ds_defconfig all -j4 V=1 VERBOSE=1
- name: Post Build
run: |
mkdir -p -v out
cp linux/arch/arm/boot/zImage out -v
cp linux/arch/arm/boot/dts/nintendo3ds_ctr.dtb out -v
cp linux/arch/arm/boot/dts/nintendo3ds_ktr.dtb out -v
- name: Upload rootfs to Artifact
uses: actions/upload-artifact@v4
with:
name: "3ds-kernel"
path: out/*
build-firm:
runs-on: ubuntu-20.04
needs: srv-info
permissions:
contents: read
steps:
- name: "Install Packages"
run: |
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi build-essential git python3-pip
pip3 install -U git+https://github.com/TuxSH/firmtool.git
- name: Pull Repo
run: git clone https://github.com/linux-3ds/firm_linux_loader/
- name: Build
run: make -C firm_linux_loader -j4 V=1 VERBOSE=1
env:
CC: "arm-none-eabi-gcc"
- name: Upload firm to Artifact
uses: actions/upload-artifact@v4
with:
name: "firm_linux_loader"
path: firm_linux_loader/firm_linux_loader.firm
srv-info:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: "Install Packages"
run: sudo apt install neofetch -y
- name: "OS Info"
run: sudo neofetch
- name: Server Info
run: |
echo -e "已知CPU型号(降序):8370C,8272CL,8171M,E5-2673 \n"
echo "--------------------------CPU信息--------------------------"
echo "CPU物理数量:$(cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l)"
echo -e "CPU核心信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n"
echo "--------------------------内存信息--------------------------"
echo "已安装内存详细信息:"
echo -e "$(sudo lshw -short -C memory | grep GiB) \n"
echo "--------------------------硬盘信息--------------------------"
echo "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l)" && df -hT
# 获取 CPU 信息
cpu_info=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c)
echo "CPU_INFO<<EOF"
echo "$cpu_info"
echo "EOF"
# 获取内存信息
memory_info=$(sudo lshw -short -C memory | grep GiB)
echo "MEMORY_INFO<<EOF"
echo "$memory_info"
echo "EOF"
# 获取硬盘信息
disk_info=$(ls /dev/sd* | grep -v [1-9] | wc -l)
disk_usage=$(df -hT)
echo "DISK_INFO<<EOF"
echo "$disk_info"
echo "EOF"
echo "DISK_USAGE<<EOF"
echo "$disk_usage"
echo "EOF"