Daily CI Tests #1932
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * *' | |
name: 'Daily CI Tests' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
docker_image: | |
uses: siliconcompiler/siliconcompiler/.github/workflows/docker_image.yml@main | |
with: | |
tool: 'tools' | |
sc_version: ${{ github.sha }} | |
daily_tests_job: | |
needs: docker_image | |
timeout-minutes: 60 | |
runs-on: ubuntu-20.04 # Match ubuntu version with container | |
container: | |
image: ${{ needs.docker_image.outputs.sc_tool }} | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
name: 'All tests' | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout SiliconCompiler | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set tools and permissions for caching | |
run: | | |
chown -R root: ~ | |
ln -s $RUNNER_TOOL_CACHE /opt/hostedtoolcache | |
echo "LD_LIBRARY_PATH_BACKUP=$LD_LIBRARY_PATH" >> "$GITHUB_ENV" | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
env: | |
AGENT_TOOLSDIRECTORY: ${{ runner.tool_cache }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
allow-prereleases: true | |
- name: Run tests | |
run: | | |
/start_slurm.sh | |
export LD_LIBRARY_PATH="${{ env.LD_LIBRARY_PATH_BACKUP }}" | |
echo $LD_LIBRARY_PATH | |
${{ steps.setup-python.outputs.python-path }} -m venv clean_env | |
source clean_env/bin/activate | |
python3 --version | |
cd $GITHUB_WORKSPACE | |
python3 -m pip install --upgrade pip | |
python3 -m pip install .[test,examples] | |
pytest -n auto --durations=0 | |
zerosoc: | |
name: 'ZeroSOC' | |
needs: docker_image | |
timeout-minutes: 150 | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ needs.docker_image.outputs.sc_tool }} | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: ["flat", "hierarchy"] | |
steps: | |
- name: Checkout SiliconCompiler | |
uses: actions/checkout@v4 | |
- name: Checkout ZeroSOC | |
uses: actions/checkout@v4 | |
with: | |
repository: siliconcompiler/zerosoc | |
path: zerosoc | |
- name: Setup workspace | |
run: | | |
python3 -m venv clean_env | |
source clean_env/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r zerosoc/python-requirements.txt | |
python3 -m pip install . | |
- name: Run flat | |
if: matrix.config == 'flat' | |
run: | | |
source clean_env/bin/activate | |
cd $GITHUB_WORKSPACE/zerosoc | |
./build.py --top-flat | |
- name: Run hierarchy | |
if: matrix.config == 'hierarchy' | |
run: | | |
source clean_env/bin/activate | |
cd $GITHUB_WORKSPACE/zerosoc | |
./build.py --core-only | |
./build.py --top-only |