Additional SPADA Examples #434
Workflow file for this run
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
| # This workflow will install Python dependencies and run tests | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Unit Tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" # caching pip dependencies | |
| # - name: Install Cairo | |
| # run: | | |
| # sudo apt-get update | |
| # sudo apt install libcairo2-dev pkg-config python3-dev | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi | |
| - name: Install CSL dependencies | |
| run: | | |
| . /etc/os-release | |
| echo "Using Ubuntu version $UBUNTU_CODENAME" | |
| # Make dependency setup faster | |
| echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null | |
| sudo dpkg-reconfigure man-db | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libssl-dev uuid-dev libgpgme11-dev squashfs-tools | |
| wget -q -O singularity.deb https://github.com/sylabs/singularity/releases/download/v4.2.1/singularity-ce_4.2.1-${UBUNTU_CODENAME}_amd64.deb | |
| sudo apt install ./singularity.deb | |
| singularity --version | |
| - name: Cache dependencies | |
| id: cache-deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: cerebras-sdk | |
| key: ${{ runner.os }}-deps | |
| - name: Install Cerebras SDK v1.4.0 | |
| if: steps.cache-deps.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir cerebras-sdk | |
| cd cerebras-sdk | |
| wget -q -O sdk-1.4.0.tar.gz "${{ secrets.CSL_SDK_URL }}" | |
| tar xf sdk-1.4.0.tar.gz | |
| rm sdk-1.4.0.tar.gz | |
| cd .. | |
| - name: Test Cerebras SDK | |
| run: | | |
| ./cerebras-sdk/cslc -h | |
| - name: Test with pytest | |
| run: | | |
| PYTHONPATH=`pwd` pytest | |
| - name: Test CSL with simulator | |
| run: | | |
| pip install --no-deps -e . | |
| export PATH=$PATH:`pwd`/cerebras-sdk | |
| ./tests/csl_runtime/run_tests.sh |