Skip to content

Commit

Permalink
Update python to 3.11 (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
lekcyjna123 authored Oct 16, 2023
1 parent aff89a1 commit bdf722e
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 28 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Synthesis benchmarks
runs-on: ubuntu-latest
timeout-minutes: 40
container: ghcr.io/kuznia-rdzeni/amaranth-synth:ecp5
container: ghcr.io/kuznia-rdzeni/amaranth-synth:ecp5-3.11
steps:
- uses: actions/checkout@v3

Expand All @@ -23,19 +23,29 @@ jobs:
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install --upgrade pip
pip3 install -r requirements-dev.txt
python3 -m pip install -r requirements-dev.txt
- name: Synthesize
run: PYTHONHASHSEED=0 ./scripts/synthesize.py --verbose --config ${{ matrix.config }}
run: |
. venv/bin/activate
PYTHONHASHSEED=0 ./scripts/synthesize.py --verbose --config ${{ matrix.config }}
- name: Print synthesis information
run: cat ./build/top.tim

- name: Collect Benchmark information
run: |
. venv/bin/activate
./scripts/parse_benchmark_info.py
cat ./benchmark.json
Expand All @@ -53,7 +63,7 @@ jobs:
build-perf-benchmarks:
name: Build performance benchmarks
runs-on: ubuntu-latest
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.05.14
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.10.08_v
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -73,7 +83,7 @@ jobs:
name: Run performance benchmarks
runs-on: ubuntu-latest
timeout-minutes: 60
container: ghcr.io/kuznia-rdzeni/verilator:v5.008
container: ghcr.io/kuznia-rdzeni/verilator:v5.008-3.11
needs: build-perf-benchmarks
steps:
- name: Checkout
Expand All @@ -84,13 +94,22 @@ jobs:
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install --upgrade pip
pip3 install -r requirements-dev.txt
python3 -m pip install -r requirements-dev.txt
- name: Generate Verilog
run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full
run: |
. venv/bin/activate
PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full
- uses: actions/download-artifact@v3
with:
Expand All @@ -99,6 +118,7 @@ jobs:

- name: Run benchmarks
run: |
. venv/bin/activate
scripts/run_benchmarks.py
- name: Store benchmark result (IPC)
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/deploy_gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
requirements.txt
requirements-dev.txt
python-version: "3.11"

- name: Install dependencies
run: |
python3 -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip3 install -r requirements-dev.txt
python -m pip install -r requirements-dev.txt
- name: Build documentation
run: ./ci/build_docs.sh
run: |
. venv/bin/activate
./ci/build_docs.sh
- name: Push documentation
# Deploy documentation only when on master
if: github.ref == 'refs/heads/master'
run: ./ci/push_gh_pages.sh
run: |
. venv/bin/activate
./ci/push_gh_pages.sh
22 changes: 16 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build-regression-tests:
name: Build regression tests
runs-on: ubuntu-latest
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.05.14
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.10.08_v
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -35,19 +35,28 @@ jobs:
name: Run regression tests
runs-on: ubuntu-latest
timeout-minutes: 10
container: ghcr.io/kuznia-rdzeni/verilator:v5.008
container: ghcr.io/kuznia-rdzeni/verilator:v5.008-3.11
needs: build-regression-tests
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install --upgrade pip
pip3 install -r requirements-dev.txt
python3 -m pip install -r requirements-dev.txt
- name: Generate Verilog
run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full
run: |
. venv/bin/activate
PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full
- uses: actions/download-artifact@v3
with:
Expand All @@ -56,6 +65,7 @@ jobs:

- name: Run tests
run: |
. venv/bin/activate
scripts/run_tests.py -a regression
- name: Test Report
Expand All @@ -76,7 +86,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
requirements.txt
Expand Down Expand Up @@ -105,7 +115,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions docker/AmaranthSynthECP5.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:22.10
FROM ubuntu:23.04

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
python3.10 python3-pip git yosys \
python3.11 python3-pip git yosys lsb-release \
build-essential cmake python3-dev libboost-all-dev libeigen3-dev && \
rm -rf /var/lib/apt/lists/*

Expand Down
4 changes: 2 additions & 2 deletions docker/Verilator.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:22.10
FROM ubuntu:23.04

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
python3.10 libpython3.10 python3-pip git \
python3.11 libpython3.11 python3-pip git lsb-release \
perl perl-doc help2man make autoconf g++ flex bison ccache numactl \
libgoogle-perftools-dev libfl-dev zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
Expand Down
4 changes: 2 additions & 2 deletions docker/riscv-toolchain.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:22.10
FROM ubuntu:23.04

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
autoconf automake autotools-dev curl python3 bc \
autoconf automake autotools-dev curl python3 bc lsb-release \
libmpc-dev libmpfr-dev libgmp-dev gawk build-essential \
bison flex texinfo gperf libtool patchutils zlib1g-dev \
libexpat-dev ninja-build git ca-certificates python-is-python3 && \
Expand Down
2 changes: 1 addition & 1 deletion docs/Development_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In order to prepare the development environment, please follow the steps below:

1. Install the Python 3.10 interpreter and pip package manager.
1. Install the Python 3.11 interpreter and pip package manager.
* Optionally create a Python virtual environment with `python3 -m venv venv` in the project directory and activate it using generated script: `. venv/bin/activate`.
2. Install all required libraries with `pip3 install -r requirements-dev.txt`.
3. Install `riscv64-unknown-elf` binutils using your favourite package manager. On Debian-based distros the package is called `binutils-riscv64-unknown-elf`, on Arch-based - `riscv64-unknown-elf-binutils`.
Expand Down

0 comments on commit bdf722e

Please sign in to comment.