-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Aurelius84/develop
[CI]Add CI task for athena base on Github Action
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build Package | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
# For the sake of simplicity in testing, the Athena packaging program will temporarily run on Ubuntu-latest. | ||
# However, to ensure the stability of the packaging system, we will need to fix the Ubuntu version in the future. | ||
runs-on: ubuntu-latest | ||
|
||
# For the sake of simplicity in testing, the Athena packaging program will temporarily only package executable files for Python 3.8. | ||
# In the future, we will need to extend support to cover Python 3.8 through Python 3.12. | ||
steps: | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
|
||
# Checkout the latest branch of Athena. | ||
- name: Checkout Athena | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
path: athena | ||
|
||
|
||
# Install Dependencies for Python | ||
- name: Install Dependencies for Python | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel build | ||
# Build Athena | ||
- name: Build Athena | ||
working-directory: ./athena | ||
run: | | ||
python -m build | ||
python -m pip install dist/*.whl | ||
# Install Test | ||
- name: Run Test | ||
working-directory: ./athena/tests | ||
run: | | ||
bash run_all_test.sh |
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,29 @@ | ||
#!/bin/bash | ||
|
||
failed_scripts=() | ||
whitelist=( | ||
# "tests/test-generate-fusion-op-unittests.sh" | ||
) | ||
|
||
for script in tests/test-generate*.sh; do | ||
if [[ " ${whitelist[@]} " =~ " ${script} " ]]; then | ||
output=$(bash "$script" 2>&1) | ||
status=$? | ||
if [ $status -ne 0 ]; then | ||
failed_scripts+=("$script: $output") | ||
fi | ||
else | ||
echo "Skip $script" | ||
fi | ||
done | ||
|
||
if [ ${#failed_scripts[@]} -gt 0 ]; then | ||
echo "The following tests failed: " | ||
for script in "${failed_scripts[@]}"; do | ||
echo "$script" | ||
done | ||
echo "Failed!" | ||
exit 1 | ||
else | ||
echo "All tests run successfully!" | ||
fi |