Repository navigation
Build #94
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: "0 2 * * *" # runs every day at 02:00 UTC | |
| workflow_dispatch: # allows manual trigger | |
| pull_request: | |
| jobs: | |
| shellcheck: | |
| name: ShellCheck | |
| runs-on: ubuntu-latest | |
| container: | |
| image: koalaman/shellcheck-alpine:stable | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Show version | |
| run: shellcheck --version | |
| - name: Run shellcheck | |
| run: | | |
| find scripts/ -type f -name '*.sh' -print0 | \ | |
| xargs -0 shellcheck -x | |
| black: | |
| name: Black | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python:3.10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: pip install -U pip | |
| - run: pip install black==25.12.0 | |
| - run: black --check . | |
| prospector: | |
| name: Prospector | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python:3.10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: pip install prospector==1.14.0 | |
| - run: prospector | |
| secret_detection: | |
| name: Gitleaks | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zricethezav/gitleaks:v8.18.2 | |
| options: --entrypoint "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: gitleaks detect -v --source . | |
| build_cmake_docker: | |
| name: Cmake build inside quay.io/ascend/cann (${{ matrix.npu_device }}, py${{ matrix.python_version }}) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| python_version: 3.11 | |
| npu_device: 910b | |
| - arch: x86_64 | |
| python_version: 3.12 | |
| npu_device: 910b | |
| - arch: x86_64 | |
| python_version: 3.11 | |
| npu_device: a3 | |
| - arch: x86_64 | |
| python_version: 3.12 | |
| npu_device: a3 | |
| container: | |
| image: quay.io/ascend/cann:8.5.1-${{ matrix.npu_device }}-ubuntu22.04-py${{ matrix.python_version }} | |
| steps: | |
| - name: Show OS | |
| run: cat /etc/os-release | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run bash commands | |
| shell: bash | |
| run: | | |
| apt-get update | |
| apt-get install -yq python-is-python3 python3-dev cmake | |
| source /usr/local/Ascend/ascend-toolkit/set_env.sh | |
| source /usr/local/Ascend/nnal/atb/set_env.sh | |
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib # to avoid libascend_hal.so issue | |
| pip3 install pyyaml setuptools pytest packaging pybind11[global] | |
| pip3 install -r requirements.txt | |
| pip3 install torch-npu==2.8.0.post2 --extra-index-url https://download.pytorch.org/whl/cpu | |
| make clean build_cmake | |
| build_wheel_docker: | |
| name: Build wheel inside quay.io/ascend/cann (${{ matrix.npu_device }}, py${{ matrix.python_version }}) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| python_version: 3.11 | |
| npu_device: 910b | |
| - arch: x86_64 | |
| python_version: 3.12 | |
| npu_device: 910b | |
| - arch: x86_64 | |
| python_version: 3.11 | |
| npu_device: a3 | |
| - arch: x86_64 | |
| python_version: 3.12 | |
| npu_device: a3 | |
| container: | |
| image: quay.io/ascend/cann:8.5.1-${{ matrix.npu_device }}-ubuntu22.04-py${{ matrix.python_version }} | |
| steps: | |
| - name: Show OS | |
| run: cat /etc/os-release | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run bash commands | |
| shell: bash | |
| run: | | |
| apt-get update | |
| apt-get install -yq python-is-python3 python3-dev cmake | |
| source /usr/local/Ascend/ascend-toolkit/set_env.sh | |
| source /usr/local/Ascend/nnal/atb/set_env.sh | |
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib # to avoid libascend_hal.so issue | |
| pip3 install pyyaml setuptools pytest packaging pybind11[global] | |
| pip3 install -r requirements.txt | |
| pip3 install torch-npu==2.8.0.post2 --extra-index-url https://download.pytorch.org/whl/cpu | |
| make clean build_wheel |