Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Run tests
- name: Build KenOS from a clean checkout
run: |
echo $DOCKER_PASS | docker login --username $DOCKER_USER --password-stdin
docker pull memegauste/kenos-build:alphadocker
docker run -w $GITHUB_DIR -v $GITHUB_DIR:$GITHUB_DIR memegauste/kenos-build:alphadocker /bin/bash -c "make -j$(nproc) -k RPT_FLAGS='-ffreestanding -O2 -Wall -Wno-error'"
docker run --rm -w "$GITHUB_DIR" -v "$GITHUB_DIR:$GITHUB_DIR" memegauste/kenos-build:alphadocker /bin/bash -ec '
make clean
make -j"$(nproc)"
grub-file --is-x86-multiboot kenos.bin
'

- uses: actions/upload-artifact@v4
name: Upload current KenOS build
with:
name: kenos.iso
path: ./kenos.iso
if-no-files-found: error
18 changes: 9 additions & 9 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ kenos.iso: kenos.bin
kenos.bin: build/kernel.o build/boot.o $(OBJECTS)
${CC} -T linker.ld -o $@ -ffreestanding -O2 -nostdlib $^

build/kernel.o: kernel.c
mkdir build
build:
mkdir -p $@

build/kernel.o: kernel.c | build
${CC} -c $< -o $@ -std=gnu99 ${RPT_FLAGS} -Iinclude -Wextra

build/%.o: lib/%.c
build/%.o: lib/%.c | build
${CC} -c $< -o $@ -std=gnu99 ${RPT_FLAGS} -Iinclude -Wextra

build/boot.o: boot.asm
${ASM} -felf32 $? -o $@
build/boot.o: boot.asm | build
${ASM} -felf32 $< -o $@

.PHONY: clean
clean:
rm -rf build
rm kenos.bin
rm build/*
rm isodir/boot/kenos.bin
rm kenos.iso
rm -f kenos.bin isodir/boot/kenos.bin kenos.iso
Loading