diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ed08734 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: CI Test + +on: + pull_request: + branches: [ "main" ] + push: + branches: [ "main" ] + +jobs: + test-apple-silicon: + name: gtest on M1 Mac (CPU) + runs-on: macos-15 + + 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: Run Tests + run: | + cd build + ./tests/forge_tests 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