From 60a96f06b4eb2deb884b44755270b8a140593b1e Mon Sep 17 00:00:00 2001 From: tangxifan Date: Thu, 3 Nov 2022 21:19:50 -0700 Subject: [PATCH 01/13] [ci] update docker image from ubuntu 18.04 to 20.04 --- .github/workflows/build.yml | 10 ++++++---- .github/workflows/cell_lib_test.yml | 2 +- .github/workflows/docker.yml | 2 +- docker/Dockerfile.base | 2 +- docker/Dockerfile.env | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fcd410be1..2f31e0c83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ env: jobs: change_detect: name: "Detect code changes" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 outputs: # this is output as string, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs source_modified: ${{ steps.changes.outputs.status_code == '1' }} @@ -67,7 +67,7 @@ jobs: needs: change_detect if: ${{ fromJSON(needs.change_detect.outputs.source_modified) }} name: ${{ matrix.config.name }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 # Note: dependencies are installed in the container. See details about dependency list in docker/Dockerfile.master # Comment the line out when base image is built again #container: ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-build-${{ matrix.config.cc}} @@ -251,9 +251,10 @@ jobs: tags: | ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-master:latest ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-master:${{ needs.change_detect.outputs.sha_short }} + linux_regression_tests: name: linux_regression_tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 needs: [linux_build, change_detect] container: ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-env strategy: @@ -304,11 +305,12 @@ jobs: retention-days: 1 path: | openfpga_flow/**/*.log + docker_regression_tests: needs: change_detect if: ${{ !fromJSON(needs.change_detect.outputs.source_modified) }} name: docker_regression_tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 container: image: ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-master:latest options: --user root --workdir /home/openfpga_user diff --git a/.github/workflows/cell_lib_test.yml b/.github/workflows/cell_lib_test.yml index e04148251..5016297d5 100644 --- a/.github/workflows/cell_lib_test.yml +++ b/.github/workflows/cell_lib_test.yml @@ -13,7 +13,7 @@ jobs: # Test the RTL compilation compatibility verilog: name: RTL compilation and tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Cancel previous uses: styfle/cancel-workflow-action@0.9.1 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ff1a2f022..f29dbd883 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,7 +10,7 @@ env: jobs: change_detect: name: "Detect code changes" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 outputs: docker_repo: ${{ steps.changes.outputs.docker_repo }} steps: diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index c635bd4c0..fafef66d3 100755 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install software-properties-common -y # 18.04 includes 2.17 but github requires 2.18+ to support submodules. diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index bfb114a40..95af40363 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install --no-install-recommends software-properties-common -y # 18.04 includes 2.17 but github requires 2.18+ to support submodules. From fee478585a1515d06327563c898ad1a669d86715 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Thu, 3 Nov 2022 21:24:24 -0700 Subject: [PATCH 02/13] [ci] fixed dependency errors due to ubuntu 20.04 --- .github/workflows/install_dependencies_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_dependencies_run.sh b/.github/workflows/install_dependencies_run.sh index f2342af44..09f0f7c07 100644 --- a/.github/workflows/install_dependencies_run.sh +++ b/.github/workflows/install_dependencies_run.sh @@ -1,4 +1,4 @@ apt-get install --no-install-recommends -y \ -libdatetime-perl libc6 libffi6 libgcc1 libreadline7 libstdc++6 \ +libdatetime-perl libc6 libffi-dev libgcc1 libreadline-dev libstdc++6 \ libtcl8.6 python3.8 python3-pip zlib1g libbz2-1.0 \ iverilog git rsync make curl wget tree python3.8-venv From d570d01a61c7c5f95f202edab4cd3152dd02708a Mon Sep 17 00:00:00 2001 From: tangxifan Date: Thu, 3 Nov 2022 22:09:45 -0700 Subject: [PATCH 03/13] [ci] typo --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f31e0c83..7bafed4cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,31 +76,31 @@ jobs: fail-fast: false matrix: config: - - name: "Build Compatibility: GCC-7 (Ubuntu 18.04)" + - name: "Build Compatibility: GCC-7 (Ubuntu 20.04)" cc: gcc-7 cxx: g++-7 - - name: "Build Compatibility: GCC-8 (Ubuntu 18.04)" + - name: "Build Compatibility: GCC-8 (Ubuntu 20.04)" cc: gcc-8 cxx: g++-8 - - name: "Build Compatibility: GCC-9 (Ubuntu 18.04)" + - name: "Build Compatibility: GCC-9 (Ubuntu 20.04)" cc: gcc-9 cxx: g++-9 - - name: "Build Compatibility: GCC-10 (Ubuntu 18.04)" + - name: "Build Compatibility: GCC-10 (Ubuntu 20.04)" cc: gcc-10 cxx: g++-10 - - name: "Build Compatibility: GCC-11 (Ubuntu 18.04)" + - name: "Build Compatibility: GCC-11 (Ubuntu 20.04)" cc: gcc-11 cxx: g++-11 - - name: "Build Compatibility: Clang-6 (Ubuntu 18.04)" + - name: "Build Compatibility: Clang-6 (Ubuntu 20.04)" cc: clang-6.0 cxx: clang++-6.0 - - name: "Build Compatibility: Clang-7 (Ubuntu 18.04)" + - name: "Build Compatibility: Clang-7 (Ubuntu 20.04)" cc: clang-7 cxx: clang++-7 - - name: "Build Compatibility: Clang-8 (Ubuntu 18.04)" + - name: "Build Compatibility: Clang-8 (Ubuntu 20.04)" cc: clang-8 cxx: clang++-8 - - name: "Build Compatibility: Clang-10 (Ubuntu 18.04)" + - name: "Build Compatibility: Clang-10 (Ubuntu 20.04)" cc: clang-10 cxx: clang++-10 # Define the steps to run the build job @@ -294,7 +294,7 @@ jobs: chmod +x yosys/install/bin/yosys-config chmod +x yosys/install/bin/yosys-filterlib chmod +x yosys/install/bin/yosys-smtbmc - - name: ${{matrix.config.name}}_GCC-8_(Ubuntu 18.04) + - name: ${{matrix.config.name}}_GCC-8_(Ubuntu 20.04) shell: bash run: source openfpga.sh && source openfpga_flow/regression_test_scripts/${{matrix.config.name}}.sh --debug --show_thread_logs - name: Upload artifact @@ -338,7 +338,7 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: ${{matrix.config.name}}_GCC-8_(Ubuntu 18.04) + - name: ${{matrix.config.name}}_GCC-8_(Ubuntu 20.04) shell: bash run: | bash .github/workflows/install_dependencies_run.sh From 35b3ed5089cab62d76206e53873f3f0241b84ef7 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 10:32:33 -0700 Subject: [PATCH 04/13] [script] debugging missing readline ddl --- .github/workflows/build.yml | 2 +- .github/workflows/install_dependencies_run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bafed4cd..868dce978 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -217,7 +217,7 @@ jobs: docker_distribution: name: Build docker image for distribution - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [linux_build, change_detect] steps: - name: Cancel previous diff --git a/.github/workflows/install_dependencies_run.sh b/.github/workflows/install_dependencies_run.sh index 09f0f7c07..f44e8ff73 100644 --- a/.github/workflows/install_dependencies_run.sh +++ b/.github/workflows/install_dependencies_run.sh @@ -1,4 +1,4 @@ apt-get install --no-install-recommends -y \ -libdatetime-perl libc6 libffi-dev libgcc1 libreadline-dev libstdc++6 \ +libdatetime-perl libc6 libffi-dev libgcc1 libreadline libstdc++6 \ libtcl8.6 python3.8 python3-pip zlib1g libbz2-1.0 \ iverilog git rsync make curl wget tree python3.8-venv From fa37fccad48170571154fa41fecfd8aac5f4f24e Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 10:35:42 -0700 Subject: [PATCH 05/13] [ci] debugging --- .github/workflows/install_dependencies_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_dependencies_run.sh b/.github/workflows/install_dependencies_run.sh index f44e8ff73..09db74907 100644 --- a/.github/workflows/install_dependencies_run.sh +++ b/.github/workflows/install_dependencies_run.sh @@ -1,4 +1,4 @@ apt-get install --no-install-recommends -y \ -libdatetime-perl libc6 libffi-dev libgcc1 libreadline libstdc++6 \ +libdatetime-perl libc6 libffi-dev libgcc1 libreadline8 libstdc++6 \ libtcl8.6 python3.8 python3-pip zlib1g libbz2-1.0 \ iverilog git rsync make curl wget tree python3.8-venv From 04e1ef56b3c3653e0195733d36b1f06747f42ac4 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 14:01:56 -0700 Subject: [PATCH 06/13] [ci] remove sudo in install dependency scripts as docker build does not support it --- .github/workflows/build.yml | 4 ++-- .github/workflows/install_dependencies_build.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 868dce978..f6bd2d7f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -119,7 +119,7 @@ jobs: submodules: true - name: Install dependencies - run: ./.github/workflows/install_dependencies_build.sh + run: bash ./.github/workflows/install_dependencies_build.sh - name: Dump tool versions run: | @@ -200,7 +200,7 @@ jobs: submodules: true - name: Install dependencies - run: ./.github/workflows/install_dependencies_build.sh + run: bash ./.github/workflows/install_dependencies_build.sh - name: Dump tool versions run: | diff --git a/.github/workflows/install_dependencies_build.sh b/.github/workflows/install_dependencies_build.sh index 25354475c..897b405d9 100755 --- a/.github/workflows/install_dependencies_build.sh +++ b/.github/workflows/install_dependencies_build.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # The package list is designed for Ubuntu 20.04 LTS -sudo apt-get update -sudo apt-get install -y \ +apt-get update +apt-get install -y \ autoconf \ automake \ bison \ From 9571eeb4b402e7951b1a5467d80b8c954c893d77 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 14:13:04 -0700 Subject: [PATCH 07/13] [ci] hotfix --- .github/workflows/cell_lib_test.yml | 2 +- .github/workflows/format.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cell_lib_test.yml b/.github/workflows/cell_lib_test.yml index 5016297d5..ef6164631 100644 --- a/.github/workflows/cell_lib_test.yml +++ b/.github/workflows/cell_lib_test.yml @@ -27,7 +27,7 @@ jobs: - name: Install Dependencies run: | - sudo bash .github/workflows/install_dependencies_run.sh + bash .github/workflows/install_dependencies_run.sh - name: Dump tool versions run: | diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 5e2fe222e..6716f31bd 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v2 - name: Install dependencies - run: ./.github/workflows/install_dependencies_build.sh + run: bash ./.github/workflows/install_dependencies_build.sh - name: Dump tool versions run: | From 49fccc530fb6b8486ee1103962a52ebbc7a0d4a6 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 14:15:27 -0700 Subject: [PATCH 08/13] [ci] add apt-get source for gcc-11 --- .github/workflows/install_dependencies_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/install_dependencies_build.sh b/.github/workflows/install_dependencies_build.sh index 897b405d9..f56e90afa 100755 --- a/.github/workflows/install_dependencies_build.sh +++ b/.github/workflows/install_dependencies_build.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # The package list is designed for Ubuntu 20.04 LTS +add-apt-repository -y ppa:ubuntu-toolchain-r/test apt-get update apt-get install -y \ autoconf \ From 36b42a50ec163d5167a367f5fba1310cbdfc962b Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 14:18:30 -0700 Subject: [PATCH 09/13] [ci] hotfix --- .github/workflows/build.yml | 4 ++-- .github/workflows/cell_lib_test.yml | 2 +- .github/workflows/format.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6bd2d7f3..504c5cc35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -119,7 +119,7 @@ jobs: submodules: true - name: Install dependencies - run: bash ./.github/workflows/install_dependencies_build.sh + run: sudo bash ./.github/workflows/install_dependencies_build.sh - name: Dump tool versions run: | @@ -200,7 +200,7 @@ jobs: submodules: true - name: Install dependencies - run: bash ./.github/workflows/install_dependencies_build.sh + run: sudo bash ./.github/workflows/install_dependencies_build.sh - name: Dump tool versions run: | diff --git a/.github/workflows/cell_lib_test.yml b/.github/workflows/cell_lib_test.yml index ef6164631..5016297d5 100644 --- a/.github/workflows/cell_lib_test.yml +++ b/.github/workflows/cell_lib_test.yml @@ -27,7 +27,7 @@ jobs: - name: Install Dependencies run: | - bash .github/workflows/install_dependencies_run.sh + sudo bash .github/workflows/install_dependencies_run.sh - name: Dump tool versions run: | diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 6716f31bd..a0e95c726 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v2 - name: Install dependencies - run: bash ./.github/workflows/install_dependencies_build.sh + run: sudo bash ./.github/workflows/install_dependencies_build.sh - name: Dump tool versions run: | From ac684a8d6948c0a94fd373879bce116eaae7fd6c Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 15:10:21 -0700 Subject: [PATCH 10/13] [ci] update docker python --- docker/Dockerfile.env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index 95af40363..cdca53f2c 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -8,7 +8,8 @@ RUN bash install_dependencies_run.sh RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py RUN python3.8 get-pip.py && rm get-pip.py RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 -RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 +# Comment out this line since Ubuntu 20.04 does not support it +# RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 ADD requirements.txt requirements.txt ENV PYTHON_EXEC=python3.8 RUN ${PYTHON_EXEC} -m pip install -r requirements.txt From 9e02c93bd4bcfc91afee1ae21a9c032be94b1cc5 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 16:28:40 -0700 Subject: [PATCH 11/13] [ci] update docker image for gcc-10 gcc-11 --- docker/Dockerfile.gcc-10 | 2 +- docker/Dockerfile.gcc-11 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.gcc-10 b/docker/Dockerfile.gcc-10 index 241b0c477..e336f2dd3 100644 --- a/docker/Dockerfile.gcc-10 +++ b/docker/Dockerfile.gcc-10 @@ -1,2 +1,2 @@ FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y gcc-10 g++-10 +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-10 g++-10 diff --git a/docker/Dockerfile.gcc-11 b/docker/Dockerfile.gcc-11 index 0b8bf6ab0..a98fb26f6 100644 --- a/docker/Dockerfile.gcc-11 +++ b/docker/Dockerfile.gcc-11 @@ -1,2 +1,2 @@ FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y gcc-11 g++-11 +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-11 g++-11 From 10daa5ee37f762be2aa148906d7a8409768d4c2f Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 17:59:37 -0700 Subject: [PATCH 12/13] [ci] debugging --- docker/Dockerfile.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index cdca53f2c..b2ca7c202 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -2,7 +2,7 @@ FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install --no-install-recommends software-properties-common -y # 18.04 includes 2.17 but github requires 2.18+ to support submodules. -RUN add-apt-repository ppa:git-core/ppa +#RUN add-apt-repository ppa:git-core/ppa ADD .github/workflows/install_dependencies_run.sh install_dependencies_run.sh RUN bash install_dependencies_run.sh RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py From 8f634acf4db4da0c67a73bae7a37e4d316d8d480 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 4 Nov 2022 19:27:16 -0700 Subject: [PATCH 13/13] [ci] debugging --- .github/workflows/install_dependencies_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/install_dependencies_build.sh b/.github/workflows/install_dependencies_build.sh index f56e90afa..df33bbda9 100755 --- a/.github/workflows/install_dependencies_build.sh +++ b/.github/workflows/install_dependencies_build.sh @@ -26,6 +26,7 @@ apt-get install -y \ liblist-moreutils-perl \ libncurses5-dev \ libreadline-dev \ + libreadline8 \ libx11-dev \ libxft-dev \ libxml++2.6-dev \