From 9ea548278441f571fcb52e74df9963921e02534e Mon Sep 17 00:00:00 2001 From: Kellen Sun <66171946+kellen-sun@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:18:35 -0500 Subject: [PATCH 1/6] Add CI workflow for testing on M1 Mac --- .github/workflows/main.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5114393 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +name: CI Test + +on: + pull_request: + branches: [ "main" ] + push: + branches: [ "main" ] + +jobs: + test-apple-silicon: + name: gtest on M1 Mac (CPU) + runs-on: macos-14 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install Build Dependencies + run: | + python -m pip install --upgrade pip + pip install nanobind cmake + + - name: Build Backend (CMake) + run: | + mkdir build + cd build + cmake .. -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release + cmake --build . + + - name: Install Library + # Installs your library in editable mode + run: pip install -e . + + - name: Install Test Dependencies + run: pip install pytest + + - name: Run Tests + run: | + ./build/tests/forge_tests From 926959bd6ff8124a306dc9ac96d3565a737c7777 Mon Sep 17 00:00:00 2001 From: Kellen Sun <66171946+kellen-sun@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:21:42 -0500 Subject: [PATCH 2/6] Update macOS version for test job --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5114393..c1be2da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: jobs: test-apple-silicon: name: gtest on M1 Mac (CPU) - runs-on: macos-14 + runs-on: macos-15 steps: - name: Checkout repository From a18228e31883c7d70ec3a7b1b783e0a48cc97999 Mon Sep 17 00:00:00 2001 From: Kellen Sun <66171946+kellen-sun@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:26:40 -0500 Subject: [PATCH 3/6] Update GitHub Actions workflow by removing install steps Removed library installation and test dependencies steps from workflow. --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1be2da..d90f33a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,13 +32,7 @@ jobs: cmake .. -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release cmake --build . - - name: Install Library - # Installs your library in editable mode - run: pip install -e . - - - name: Install Test Dependencies - run: pip install pytest - - name: Run Tests run: | + working-directory: ./build ./build/tests/forge_tests From 621dbeb262ba6cb86ac926d70d07326d6fb285fd Mon Sep 17 00:00:00 2001 From: Kellen Sun <66171946+kellen-sun@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:28:34 -0500 Subject: [PATCH 4/6] Update test run path in workflow configuration --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d90f33a..f4e3d7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,4 +35,4 @@ jobs: - name: Run Tests run: | working-directory: ./build - ./build/tests/forge_tests + ./tests/forge_tests From 0f321a0c12bd984c4fc15d123107fb2db8a9d196 Mon Sep 17 00:00:00 2001 From: Kellen Sun <66171946+kellen-sun@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:32:02 -0500 Subject: [PATCH 5/6] Fix working directory for running tests --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f4e3d7a..ed08734 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,5 +34,5 @@ jobs: - name: Run Tests run: | - working-directory: ./build + cd build ./tests/forge_tests From 2c6d85504d4396f591c1db916a8e1de7d7ccdcaf Mon Sep 17 00:00:00 2001 From: Kellen Sun Date: Fri, 27 Feb 2026 10:37:01 -0500 Subject: [PATCH 6/6] new badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b10d0b..1a72724 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/kellen-sun/Forge.svg) - +[![CI Build](https://github.com/kellen-sun/Forge/actions/workflows/main.yml/badge.svg)](https://github.com/kellen-sun/Forge/actions/workflows/main.yml) + # Forge > Forge crafts Metal: an Array framework with eager execution and JIT graph compilation for Apple Silicon GPUs