From 731413b6e06631898539d4c1a3f3a0bb8c2b9d39 Mon Sep 17 00:00:00 2001 From: jewelcodes Date: Wed, 4 Sep 2024 13:52:36 -0400 Subject: [PATCH] workflow: mac build system --- .github/workflows/build-mac.yml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build-mac.yml diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml new file mode 100644 index 0000000..e13e476 --- /dev/null +++ b/.github/workflows/build-mac.yml @@ -0,0 +1,37 @@ +name: Check build (macOS) + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: brew install nasm curl make + + - name: Fetch and install toolchain + run: | + curl https://jewelcodes.io/lux/toolchain-macos-arm64.tar.xz -o toolchain-macos-arm64.tar.xz + tar -xvJf toolchain-macos-arm64.tar.xz + mv toolchain $HOME/toolchain + echo "$HOME/toolchain/bin" >> $GITHUB_PATH + + - name: Verify toolchain is executable + run: x86_64-lux-gcc -v + + - name: Build kernel + run: make + + - name: Clean up artifacts + run: | + rm -rf toolchain-macos-arm64.tar.xz $HOME/toolchain + make clean