Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump versions and make CI work #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 5 additions & 125 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
on:
push:
branches:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, this was my debugging GH actions not working

- main
pull_request:
merge_group:

Expand All @@ -14,18 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04, macos-12, macos-13, macos-14]
python: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-12
python: "3.11"
- os: macos-12
python: "3.12"
- os: macos-13
python: "3.11"
- os: macos-13
python: "3.12"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What made removing the os matrix necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly to reduce the amount of CI resources being burnt while testing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mm, yeah i guess that's fair, but I think we need a decent spread.
We can loose some versions of python - now needs >3.10. We probably need windows tested as well tho. macos-12 is being discontinued soon, so that can go.

Not too worried about runner cost, but we should cover as much target user arch as we can. I can always set up some specific runners if the wait for runner availability is too long after that

os: [ubuntu-latest, ]
python: ["3.12", ]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -54,114 +42,6 @@ jobs:

- name: Run tests
run: |
make sim-check

pyuvm:
if: false
strategy:
matrix:
os: ["ubuntu-latest", "ubuntu-24.04", "macos-12", "macos-13", "macos-14"]
python: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-12
python: "3.11"
- os: macos-12
python: "3.12"
- os: macos-13
python: "3.11"
- os: macos-13
python: "3.12"


fail-fast: false

runs-on: ${{ matrix.os }}
env:
DEPS_PATH: ${{ github.workspace }}/deps
VERILATOR_REVISION: v5.028

steps:
- name: Install dependencies (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install git build-essential autoconf g++ flex bison perl help2man zlib1g-dev libfl-dev
if: runner.os == 'Linux'

- name: Install dependencies (Mac)
run: |
brew install autoconf flex bison perl help2man zlib
if: runner.os == 'macOS'

- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-${{ matrix.python }}

- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
cache: true
python-version: ${{ matrix.python }}

- name: Cache YoWASP build products
uses: actions/cache@v4
with:
path: ~/.cache/YoWASP
key: YoWASP-${{ runner.os }}-${{ hashFiles('./.venv/**/*.wasm') }}
restore-keys: |
YoWASP-${{ runner.os }}-

- name: Cache verilator installation
uses: actions/cache@v4
id: cache-verilator
with:
path: .verilator
key: cache-verilator-${{ env.VERILATOR-REVISION }}-${{ matrix.os }}

- name: Build verilator
run: |
PREFIX=`pwd`/.verilator
VERILATOR_PATH=${DEPS_PATH}/verilator
mkdir -p ${VERILATOR_PATH}
git clone --recursive https://github.com/verilator/verilator ${VERILATOR_PATH}
pushd ${VERILATOR_PATH}
git reset --hard ${VERILATOR_REVISION}
autoconf
./configure --prefix=${PREFIX}
make -j`nproc`
make install
popd
if: steps.cache-verilator.outputs.cache-hit != 'true'

- name: Run tests
run: |
PATH=${GITHUB_WORKSPACE}/.verilator/bin:$PATH make verif-run-pyuvm

submit:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reasoning to remove the submit stage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because we don't actually have anything to submit yet

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh, why not?

needs: test
if: ${{ false }}
runs-on: ubuntu-22.04
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
cache: true
- name: Install dependencies
run: |
pdm install
- run: pdm run chipflow silicon submit
env:
CHIPFLOW_API_KEY_ID: ${{ secrets.CHIPFLOW_API_KEY_ID }}
CHIPFLOW_API_KEY_SECRET: ${{ secrets.CHIPFLOW_API_KEY_SECRET }}
make sim-build
(timeout 30 make sim-run || true) 2> sim.log
grep "Booting Zephyr OS build" sim.log
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ board-load-ulx3s:
sim-run: sim-build #software-build
cd build/sim && ./sim_soc

.PHONY: sim-check
sim-check: sim-run
pdm run python -m my_design.tools.json_compare my_design/tests/events_reference.json build/sim/events.json

.PHONY: pyuvm-gen-verilog
pyuvm-gen-verilog: init
pdm run python -m my_design.ips.spi
Expand Down
4 changes: 2 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.