-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
365205a
commit 5f6e614
Showing
2 changed files
with
80 additions
and
67 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
exo-commit: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test_ExoBLAS: | ||
strategy: | ||
matrix: | ||
runner: [ macos-14, ubuntu-latest ] | ||
include: | ||
- runner: ubuntu-latest | ||
CC: gcc | ||
CXX: g++ | ||
PRESET: avx2 | ||
- runner: macos-14 | ||
CC: clang # This will be system AppleClang | ||
CXX: clang++ # This will be system AppleClang | ||
PRESET: apple-silicon | ||
|
||
env: | ||
CC: ${{matrix.CC}} | ||
CXX: ${{matrix.CXX}} | ||
BUILD_TYPE: Release | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
runs-on: ${{matrix.runner}} | ||
steps: | ||
- name: Checkout Exo main sources | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: exo-lang/exo@${{ inputs.exo-commit }} | ||
submodules: recursive | ||
path: exo-repo | ||
|
||
- name: Setup Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
|
||
- name: Install Python dependencies | ||
run: python -m pip install -U pip wheel build | ||
|
||
- name: Install Exo | ||
run: python -m build ${{github.workspace}}/exo-repo ; python -m pip install ${{github.workspace}}/exo-repo/dist/*.whl | ||
|
||
- name: Get latest CMake and ninja | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Install Google benchmark | ||
run: git clone https://github.com/google/benchmark; cmake -S benchmark -B benchmark/build -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_TESTING=NO ; cmake --build benchmark/build; cmake --install benchmark/build --prefix ~/.local | ||
|
||
- name: Checkout ExoBLAS repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
path: ExoBLAS | ||
|
||
- name: Install ExoBLAS requirements | ||
run: python -m pip install -Ur ${{github.workspace}}/ExoBLAS/requirements.txt | ||
|
||
- name: Configure CMake | ||
env: | ||
CMAKE_PREFIX_PATH: ${{github.workspace}}/benchmark/build | ||
run: cmake ${{github.workspace}}/ExoBLAS -B ${{github.workspace}}/ExoBLAS/build/${{matrix.PRESET}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --preset ${{matrix.PRESET}} | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/ExoBLAS/build/${{matrix.PRESET}} --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Test Codegen | ||
run: ctest --test-dir ${{github.workspace}}/ExoBLAS/build/${{matrix.PRESET}} -C ${{env.BUILD_TYPE}} -R codegen_verbose | ||
if: ${{matrix.runner == 'ubuntu-latest'}} | ||
|
||
- name: Test Correctness | ||
run: ctest --test-dir ${{github.workspace}}/ExoBLAS/build/${{matrix.PRESET}} -C ${{env.BUILD_TYPE}} -R correctness |