-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.78 KB
/
cmake.yml
File metadata and controls
65 lines (56 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: BasicallyLinux Build Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Compile Kernel
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Toolchain
run: |
sudo apt-get update
sudo apt-get install -y \
nasm \
make \
binutils-i686-linux-gnu \
gcc-i686-linux-gnu \
libgcc-s1-i386-cross \
wget
- name: Cache AI Model
id: cache-model
uses: actions/cache@v4
with:
path: assets/smollm2.gguf
key: ${{ runner.os }}-model-smollm2
- name: Download AI Model Asset
if: steps.cache-model.outputs.cache-hit != 'true'
run: |
mkdir -p assets
wget -O assets/smollm2.gguf https://huggingface.co/bartowski/SmolLM2-135M-Instruct-GGUF/resolve/main/SmolLM2-135M-Instruct-Q4_K_M.gguf
- name: Build BasicallyLinux
run: |
mkdir -p build
cd build
# Use the cross-compiler, force 32-bit mode, and skip the link check for the compiler test
cmake .. \
-DCMAKE_C_COMPILER=i686-linux-gnu-gcc \
-DCMAKE_ASM_NASM_COMPILER=nasm \
-DCMAKE_ASM_NASM_FLAGS="-f elf32" \
-DCMAKE_C_FLAGS="-m32" \
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
make
- name: Verify Kernel Architecture
run: |
file build/kernel.bin
i686-linux-gnu-objdump -f build/kernel.bin | grep "architecture: i386"
- name: Archive Artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: basicallylinux-alpha
path: build/kernel.bin