Skip to content

lazybox: add 'symlink' helper #2027

lazybox: add 'symlink' helper

lazybox: add 'symlink' helper #2027

Workflow file for this run

name: Build MOS
on:
push:
workflow_dispatch:
jobs:
build:
name: "MOS ${{matrix.config.name}} (${{matrix.build_type}})"
runs-on: ubuntu-latest
container:
image: archlinux:latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
config:
- {
"name": "x86_64 limine",
"arch": "x86_64",
"target": "mos_limine",
"artifact": "mos_limine.elf",
"compile_only": "ON",
}
- {
"name": "RISC-V limine",
"arch": "riscv64",
"target": "mos_limine",
"artifact": "mos_limine.elf",
"compile_only": "ON",
}
build_type: [Debug, Release]
env:
MOS_TEST_SMP_COUNT: ${{matrix.config.smp}}
steps:
- name: Install packages
run: |
pacman -Syu --noconfirm base-devel git nasm mtools jq ninja qemu-system-x86 gnu-efi cpio wget unzip cmake limine protobuf python-protobuf python-setuptools libisoburn
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Toolchains
run: |
echo "" >> /etc/pacman.conf
echo '[mos]' >> /etc/pacman.conf
echo 'SigLevel = Optional TrustAll' >> /etc/pacman.conf
echo 'Server = https://repo.mooody.me/$repo/$arch' >> /etc/pacman.conf
pacman -Sy --noconfirm rustup mos-sdk ${{matrix.config.arch}}-mos-gcc ${{matrix.config.arch}}-mos-binutils ${{matrix.config.arch}}-mos-mlibc mos-llvm mos-rust
rustup toolchain link mosdev /opt/mos-rust/
rustup default mosdev
- name: Configure
run: |
cmake \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DMOS_CONFIG=${{matrix.config.arch}}-debug \
-DMOS_ARCH=${{matrix.config.arch}} \
-B build \
-G Ninja
ln -svf $(pwd)/build/ $(pwd)/build/${{matrix.config.arch}}
- name: Build
run: |
cd build
ninja ${{matrix.config.target}} mos_initrd
- name: Upload Bootable Artifact
uses: actions/upload-artifact@v4
with:
name: MOS-${{matrix.config.target}}-${{matrix.build_type}}-${{matrix.config.arch}}
path: build/boot.dir/${{matrix.config.artifact}}
- name: Upload initrd
uses: actions/upload-artifact@v4
with:
name: MOS-${{matrix.config.target}}-${{matrix.build_type}}-${{matrix.config.arch}}-initrd
path: build/initrd.cpio