diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml new file mode 100644 index 00000000..7bfd323d --- /dev/null +++ b/.github/workflows/build_tests.yml @@ -0,0 +1,67 @@ +name: Dreamos Build + +on: + push: + branches: [ new_workflow_test ] + pull_request: + branches: [ new_workflow_test ] + +jobs: + build-dreamos: + + runs-on: ubuntu-latest + + steps: + + - name: Prepare cache for binaries + uses: actions/cache@v2 + id: cached-binaries + with: + path: | + **/gcc-x86_64-cross + key: gcc-binary-toolchains + + - name: Install llvm and clang + run: sudo apt install lld llvm + + - name: Install nasm + run: sudo apt install nasm + + - name: Install mtools + run: sudo apt install mtools + + - name: Download gcc + if: steps.cached-binaries.outputs.cache-hit != 'true' + run: > + mkdir toolchains; + wget https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64/tarballs/x86-64--glibc--stable-2022.08-1.tar.bz2 -O toolchains/gcc-x86_64; + cd toolchains; + tar -vxf gcc-x86_64; mv x86-64--glibc--stable-2022.08-1 gcc-x86_64-cross; + + + - uses: actions/checkout@v2 + with: + path: dreamos + + - name: Compile with gcc + run: > + PATH=$PATH:$GITHUB_WORKSPACE/toolchains/gcc-x86_64-cross/bin; + cd dreamos; + make clean; + make build + TOOLCHAIN=gcc + IS_WORKFLOW=1 + ARCH_PREFIX=x86_64-buildroot-linux-gnu + IMAGE_BASE_NAME=DreamOS64 + + - name: Compile with clang + run: > + PATH=$PATH:$GITHUB_WORKSPACE/toolchains/gcc-x86_64-cross/bin; + cd dreamos; + make clean; + make build + TOOLCHAIN=clang + IS_WORKFLOW=1 + ARCH_PREFIX=x86_64-elf + IMAGE_BASE_NAME=DreamOS64 + diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 9ab6d4a8..a7cf7bcf 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,4 +1,4 @@ -name: C/C++ CI +name: Dreamos Tests on: push: diff --git a/Makefile b/Makefile index 0aae0bee..0972c783 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ ARCH_PREFIX := x86_64-elf ASM_COMPILER := nasm QEMU_SYSTEM := qemu-system-x86_64 -IS_WORKFLOW ?= 0 +IS_WORKFLOW = 0 ifeq ($(TOOLCHAIN), gcc) X_CC = $(ARCH_PREFIX)-gcc diff --git a/build/Config.mk b/build/Config.mk index 905e218c..d5a0bb6d 100644 --- a/build/Config.mk +++ b/build/Config.mk @@ -2,15 +2,15 @@ # Kernel Configuration -USE_FRAMEBUFFER := 1 -SMALL_PAGES := 0 +USE_FRAMEBUFFER ?= 1 +SMALL_PAGES ?= 0 # Build Configuration -TOOLCHAIN := clang -BUILD_FOLDER := dist -FONT_FOLDER := fonts +TOOLCHAIN ?= clang +BUILD_FOLDER ?= dist +FONT_FOLDER ?= fonts # Image Base Name -IMAGE_BASE_NAME := DreamOs64 +IMAGE_BASE_NAME ?= DreamOs64