Skip to content

Fix workflow

Fix workflow #28

Workflow file for this run

name: Build atom-skygaze
on:
push:
branches:
- main
- build
pull_request:
branches: main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Create build directory
run: mkdir -p build
- name: Download Buildroot and toolchains
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build
curl -o - https://buildroot.org/downloads/buildroot-2024.02.tar.gz | tar zxvf -
git clone https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/Dafang-Hacks/mips-gcc472-glibc216-64bit
- name: Setup Kernel config
run: |
echo CONFIG_CROSS_COMPILE="$GITHUB_WORKSPACE/build/buildroot-2024.02/output/host/usr/bin/mipsel-ingenic-linux-gnu-" >> configs/kernel_workflow.config
echo CONFIG_INITRAMFS_SOURCE="$GITHUB_WORKSPACE/build/buildroot-2024.02/output/images/initramfs.cpio" >> configs/kernel_workflow.config
- name: Setup Buildroot
run: |
cd build/buildroot-2024.02
make defconfig BR2_DEFCONFIG=$GITHUB_WORKSPACE/configs/atomskygaze_workflow_defconfig
# Add some configuration for custom packages.
echo 'BR2_PACKAGE_BUSYBOX_INIT=y' >> .config
echo 'BR2_PACKAGE_BUSYBOX_INIT_CONFIG="../../configs/busybox-init.config"' >> .config
echo 'BR2_PACKAGE_BUSYBOX_INIT_SHOW_OTHERS=y' >> .config
echo 'BR2_PACKAGE_DOSFSTOOLS_INIT=y' >> .config
echo 'BR2_PACKAGE_ATBM_WIFI=y' >> .config
cp -pR $GITHUB_WORKSPACE/custompackages/package/* package
- name: Setup rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
source $HOME/.cargo/env
- name: Patch minimp4.rs
run: |
cd $GITHUB_WORKSPACE/submodules/minimp4.rs
patch -p1 < $GITHUB_WORKSPACE/patches/minimp4.patch
- name: Build initramfs
run: |
cd build/buildroot-2024.02
$GITHUB_WORKSPACE/buildscripts/make_initramfs.sh
make rootfs-initramfs
- name: Check initramfs dir
run: |
cd build/buildroot-2024.02/output/initramfs_root
ls -la
- name: Find cpio
run: |
CPIO_FILE=$GITHUB_WORKSPACE/build/buildroot-2024.02/output/images/initramfs.cpio
CPIO_NAME=$(basename "$CPIO_FILE")
echo "CPIO_FILE=$CPIO_FILE" >> $GITHUB_ENV
echo "CPIO_NAME=$CPIO_NAME" >> $GITHUB_ENV
- name: Upload cpio
uses: actions/upload-artifact@v4
with:
name: ${{ env.CPIO_NAME }}
path: ${{ env.CPIO_FILE }}
- name: Build linux
run: |
cd build/buildroot-2024.02
make linux-rebuild
- name: Build all
run: |
cd build/buildroot-2024.02
make
- name: Find artifact
run: |
ZIP_FILE=$(find . -name 'atom-skygaze.v*.*.zip' -print -quit)
ZIP_NAME=$(basename "$ZIP_FILE")
echo "ZIP_FILE=$ZIP_FILE" >> $GITHUB_ENV
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ZIP_NAME }}
path: ${{ env.ZIP_FILE }}