Skip to content

Commit 88f698c

Browse files
committed
Update makefile, change actions into matrix
1 parent 597750b commit 88f698c

File tree

7 files changed

+75
-380
lines changed

7 files changed

+75
-380
lines changed

.github/workflows/verify.yml

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -140,47 +140,64 @@ jobs:
140140
-w /work \
141141
"${GHCR_IMAGE}:${IMAGE_TAG}" \
142142
bash -c '
143-
mkdir -p run/work
144-
make TEST=param_test smoke_test
143+
make smoke_test TEST=param_test
145144
'
146145
147-
verify-ibex-soc:
148-
runs-on: ubuntu-22.04
149-
needs: [build-and-push-image, smoke-test]
150-
env:
151-
IMAGE_TAG: ${{ needs.build-and-push-image.outputs.image_tag }}
152-
153-
steps:
154-
- name: Checkout code
155-
uses: actions/checkout@v4
156-
157-
- name: Free disk space on runner
158-
run: |
159-
echo "Before cleanup:"; df -h
160-
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL || true
161-
sudo apt-get clean || true
162-
sudo rm -rf /var/lib/apt/lists/* || true
163-
docker system prune -af || true
164-
echo "After cleanup:"; df -h
165-
166-
- name: Log in to GHCR
167-
uses: docker/login-action@v3
168-
with:
169-
registry: ghcr.io
170-
username: ${{ github.actor }}
171-
password: ${{ secrets.GITHUB_TOKEN }}
172-
173-
- name: Pull CI image
174-
run: docker pull "${GHCR_IMAGE}:${IMAGE_TAG}"
175-
176-
- name: Ibex SoC + output check
177-
run: |
178-
docker run --rm \
179-
-v "$PWD":/work \
180-
-w /work \
181-
"${GHCR_IMAGE}:${IMAGE_TAG}" \
182-
bash -c '
183-
fusesoc library add sa_ip "$(pwd -P)" || true
184-
mkdir -p run/work
185-
make smoke_ibex
186-
'
146+
unit-tests:
147+
runs-on: ubuntu-22.04
148+
needs: [build-and-push-image, smoke-test]
149+
env:
150+
IMAGE_TAG: ${{ needs.build-and-push-image.outputs.image_tag }}
151+
152+
strategy:
153+
fail-fast: false
154+
matrix:
155+
include:
156+
- name: example
157+
cmd: |
158+
mkdir -p run/work
159+
cd run/work
160+
python ../example.py
161+
- name: pointnet
162+
cmd: make clean smoke_test TEST=pointnet
163+
# - name: resnet50
164+
# cmd: make clean smoke_test TEST=resnet50
165+
# - name: resnet18
166+
# cmd: make clean smoke_test TEST=resnet18
167+
# - name: jettagger
168+
# cmd: make clean smoke_test TEST=jettagger
169+
- name: verify-ibex-soc
170+
cmd: |
171+
fusesoc library add sa_ip "$(pwd -P)" || true
172+
make smoke_ibex
173+
174+
steps:
175+
- name: Checkout code
176+
uses: actions/checkout@v4
177+
178+
- name: Free disk space on runner
179+
run: |
180+
echo "Before cleanup:"; df -h
181+
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL || true
182+
sudo apt-get clean || true
183+
sudo rm -rf /var/lib/apt/lists/* || true
184+
docker system prune -af || true
185+
echo "After cleanup:"; df -h
186+
187+
- name: Log in to GHCR
188+
uses: docker/login-action@v3
189+
with:
190+
registry: ghcr.io
191+
username: ${{ github.actor }}
192+
password: ${{ secrets.GITHUB_TOKEN }}
193+
194+
- name: Pull CI image
195+
run: docker pull "${GHCR_IMAGE}:${IMAGE_TAG}"
196+
197+
- name: Run ${{ matrix.name }}
198+
run: |
199+
docker run --rm \
200+
-v "$PWD":/work \
201+
-w /work \
202+
"${GHCR_IMAGE}:${IMAGE_TAG}" \
203+
bash -c '${{ matrix.cmd }}'

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@
33
# Testing
44

55
TEST := param_test
6+
WORKDIR := run/work
67

7-
smoke_test:
8-
cd run/work && python -m pytest -s ../$(TEST).py
8+
clean:
9+
rm -rf $(WORKDIR)
910

10-
verify_ibex:
11+
$(WORKDIR):
12+
mkdir -p $(WORKDIR)
13+
14+
smoke_test: $(WORKDIR)
15+
cd $(WORKDIR) && python -m pytest -s ../$(TEST).py
16+
17+
verify_ibex: $(WORKDIR)
1118
cd ibex-soc && python check_output.py
1219

13-
smoke_ibex:
20+
smoke_ibex: $(WORKDIR)
1421
make TEST=ibex_test smoke_test iclean ibuild irun verify_ibex
1522

1623
# Docker

resnet_50.py

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)