Add mandelbrot example #100
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Shaderpulse tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository with submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Cache LLVM build | |
uses: actions/cache@v3 | |
id: llvm-cache | |
with: | |
path: llvm-project/build | |
key: ${{ runner.os }}-llvm-${{ hashFiles('llvm-project/mlir/CMakeLists.txt') }} | |
restore-keys: | | |
${{ runner.os }}-llvm- | |
- name: Install Ninja | |
run: brew install ninja | |
- name: Set up CMake | |
uses: jwlawson/actions-setup-cmake@v1 | |
with: | |
cmake-version: '3.25' | |
- name: Build LLVM and MLIR | |
if: steps.llvm-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p llvm-project/build | |
cd llvm-project/build | |
cmake -G Ninja ../llvm \ | |
-DLLVM_ENABLE_PROJECTS=mlir \ | |
-DLLVM_BUILD_EXAMPLES=ON \ | |
-DLLVM_TARGETS_TO_BUILD="Native" \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DLLVM_ENABLE_ASSERTIONS=ON | |
cmake --build . | |
- name: Configure CMake for Shaderpulse | |
run: cmake -B build -DENABLE_CODEGEN=ON -DCMAKE_BUILD_TYPE=Release | |
- name: Build Shaderpulse | |
run: cmake --build build --config Release | |
- name: Run CTest | |
run: ctest --test-dir build/test --output-on-failure | |
- name: Run CodeGen tests | |
run: | | |
cd test/CodeGen/ | |
CI=1 ./run_tests.sh |