diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e7a72d1af..c515414c2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -99,6 +118,7 @@ jobs: - name: Run benchmarks run: | + . venv/bin/activate scripts/run_benchmarks.py - name: Store benchmark result (IPC) diff --git a/.github/workflows/deploy_gh_pages.yml b/.github/workflows/deploy_gh_pages.yml index 210752f06..89fdeea7d 100644 --- a/.github/workflows/deploy_gh_pages.yml +++ b/.github/workflows/deploy_gh_pages.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d70ae121..957e2b1c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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: @@ -56,6 +65,7 @@ jobs: - name: Run tests run: | + . venv/bin/activate scripts/run_tests.py -a regression - name: Test Report @@ -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 @@ -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 diff --git a/docker/AmaranthSynthECP5.Dockerfile b/docker/AmaranthSynthECP5.Dockerfile index 0e9809b8c..3b9326ccf 100644 --- a/docker/AmaranthSynthECP5.Dockerfile +++ b/docker/AmaranthSynthECP5.Dockerfile @@ -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/* diff --git a/docker/Verilator.Dockerfile b/docker/Verilator.Dockerfile index ddb5925f7..64c60c5e4 100644 --- a/docker/Verilator.Dockerfile +++ b/docker/Verilator.Dockerfile @@ -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/* diff --git a/docker/riscv-toolchain.Dockerfile b/docker/riscv-toolchain.Dockerfile index ec33ce01b..d35c604b9 100644 --- a/docker/riscv-toolchain.Dockerfile +++ b/docker/riscv-toolchain.Dockerfile @@ -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 && \ diff --git a/docs/Development_environment.md b/docs/Development_environment.md index 8f471cefa..cfdb58cad 100644 --- a/docs/Development_environment.md +++ b/docs/Development_environment.md @@ -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`.