-
Notifications
You must be signed in to change notification settings - Fork 82
118 lines (101 loc) · 3.09 KB
/
daily_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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