From 421f3963385089821c5ce43d6c8f41020ff3ac9a Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 16:15:45 -0700 Subject: [PATCH 01/10] [ci] now use ubuntu 22.04 as the main os to check build compatibility; Drop gcc-8, clang-6, clang-7, clang-8, clang-9 support --- .github/workflows/build.yml | 124 ++++++++++-------- .github/workflows/docker.yml | 13 +- .github/workflows/format.yaml | 9 +- ...install_dependencies_build_ubuntu20p04.sh} | 0 .../install_dependencies_build_ubuntu22p04.sh | 5 +- ...> install_dependencies_run_ubuntu20p04.sh} | 0 6 files changed, 88 insertions(+), 63 deletions(-) rename .github/workflows/{install_dependencies_build.sh => install_dependencies_build_ubuntu20p04.sh} (100%) rename .github/workflows/{install_dependencies_run.sh => install_dependencies_run_ubuntu20p04.sh} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e8a8246c..9eb88af3b 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-20.04 + runs-on: ubuntu-22.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-20.04 + runs-on: ubuntu-22.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}} @@ -76,30 +76,38 @@ jobs: fail-fast: false matrix: config: - - name: "Build Compatibility: GCC-8 (Ubuntu 20.04)" - cc: gcc-8 - cxx: g++-8 - - name: "Build Compatibility: GCC-9 (Ubuntu 20.04)" + - name: "Build Compatibility: GCC-9 (Ubuntu 22.04)" cc: gcc-9 cxx: g++-9 - - name: "Build Compatibility: GCC-10 (Ubuntu 20.04)" + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: GCC-10 (Ubuntu 22.04)" cc: gcc-10 cxx: g++-10 - - name: "Build Compatibility: GCC-11 (Ubuntu 20.04)" + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: GCC-11 (Ubuntu 22.04)" cc: gcc-11 cxx: g++-11 - - name: "Build Compatibility: Clang-6 (Ubuntu 20.04)" - cc: clang-6.0 - cxx: clang++-6.0 - - name: "Build Compatibility: Clang-7 (Ubuntu 20.04)" - cc: clang-7 - cxx: clang++-7 - - name: "Build Compatibility: Clang-8 (Ubuntu 20.04)" - cc: clang-8 - cxx: clang++-8 - - name: "Build Compatibility: Clang-10 (Ubuntu 20.04)" - cc: clang-10 - cxx: clang++-10 + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: GCC-12 (Ubuntu 22.04)" + cc: gcc-12 + cxx: g++-12 + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: Clang-11 (Ubuntu 22.04)" + cc: clang-11 + cxx: clang++-11 + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: Clang-12 (Ubuntu 22.04)" + cc: clang-12 + cxx: clang++-12 + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: Clang-13 (Ubuntu 22.04)" + cc: clang-13 + cxx: clang++-13 + dependency_version: "ubuntu22p04" + - name: "Build Compatibility: Clang-14 (Ubuntu 22.04)" + cc: clang-14 + cxx: clang++-14 + dependency_version: "ubuntu22p04" # Define the steps to run the build job env: CC: ${{ matrix.config.cc }} @@ -114,7 +122,7 @@ jobs: uses: actions/checkout@v3 - name: Install dependencies - run: sudo bash ./.github/workflows/install_dependencies_build.sh + run: sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh - name: Dump tool versions run: | @@ -134,7 +142,7 @@ jobs: run: ccache -s - name: Upload artifact uses: actions/upload-artifact@v2 - if: ${{ matrix.config.cc == 'gcc-9'}} + if: ${{ matrix.config.cc == 'gcc-11'}} with: name: openfpga path: | @@ -155,7 +163,7 @@ jobs: needs: change_detect if: ${{ fromJSON(needs.change_detect.outputs.source_modified) }} name: ${{ matrix.config.name }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.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}} @@ -164,26 +172,31 @@ jobs: fail-fast: false matrix: config: - - name: "Build w/o Yosys (Ubuntu 20.04)" - cc: gcc-9 - cxx: g++-9 + - name: "Build w/o Yosys (Ubuntu 22.04)" + cc: gcc-11 + cxx: g++-11 cmake_flags: "-DOPENFPGA_WITH_YOSYS=OFF" - - name: "Build w/o Yosys plugin (Ubuntu 20.04)" - cc: gcc-9 - cxx: g++-9 + dependency_version: "ubuntu22p04" + - name: "Build w/o Yosys plugin (Ubuntu 22.04)" + cc: gcc-11 + cxx: g++-11 cmake_flags: "-DOPENFPGA_WITH_YOSYS_PLUGIN=OFF" - - name: "Build w/o test (Ubuntu 20.04)" - cc: gcc-9 - cxx: g++-9 + dependency_version: "ubuntu22p04" + - name: "Build w/o test (Ubuntu 22.04)" + cc: gcc-11 + cxx: g++-11 cmake_flags: "-DOPENFPGA_WITH_TEST=OFF" - - name: "Build w/o version number (Ubuntu 20.04)" - cc: gcc-9 - cxx: g++-9 + dependency_version: "ubuntu22p04" + - name: "Build w/o version number (Ubuntu 22.04)" + cc: gcc-11 + cxx: g++-11 cmake_flags: "-DOPENFPGA_WITH_VERSION=OFF" - - name: "Build w/o SWIG support (Ubuntu 20.04)" - cc: gcc-9 - cxx: g++-9 + dependency_version: "ubuntu22p04" + - name: "Build w/o SWIG support (Ubuntu 22.04)" + cc: gcc-11 + cxx: g++-11 cmake_flags: "-DOPENFPGA_WITH_SWIG=OFF" + dependency_version: "ubuntu22p04" # Define the steps to run the build job env: CC: ${{ matrix.config.cc }} @@ -198,7 +211,7 @@ jobs: uses: actions/checkout@v3 - name: Install dependencies - run: sudo bash ./.github/workflows/install_dependencies_build.sh + run: sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh - name: Dump tool versions run: | @@ -217,14 +230,19 @@ jobs: needs: change_detect if: ${{ fromJSON(needs.change_detect.outputs.source_modified) }} name: ${{ matrix.config.name }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: config: - - name: "Build (Ubuntu 22.04)" + - name: "Build (GCC-11 on Ubuntu 20.04)" cc: gcc-11 cxx: g++-11 + dependency_version: "ubuntu22p04" + - name: "Build (Clang-10 on Ubuntu 20.04)" + cc: clang-10 + cxx: clang++-10 + dependency_version: "ubuntu22p04" # Define the steps to run the build job env: CC: ${{ matrix.config.cc }} @@ -239,7 +257,7 @@ jobs: uses: actions/checkout@v3 - name: Install dependencies - run: sudo bash ./.github/workflows/install_dependencies_build_ubuntu22p04.sh + run: sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh - name: Dump tool versions run: | @@ -270,6 +288,7 @@ jobs: cxx: g++-11 build_type: debug cores: 4 + dependency_version: "ubuntu22p04" # Define the steps to run the build job env: CC: ${{ matrix.config.cc }} @@ -285,8 +304,8 @@ jobs: - name: Install dependencies run: | - sudo bash ./.github/workflows/install_dependencies_build_ubuntu22p04.sh - sudo bash ./.github/workflows/install_dependencies_run_ubuntu22p04.sh + sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh + sudo bash ./.github/workflows/install_dependencies_run_${{ matrix.config.dependency_version }}.sh sudo python3 -m pip install -r requirements.txt - name: Dump tool versions @@ -321,6 +340,7 @@ jobs: cxx: g++-11 build_type: release cores: 4 + dependency_version: "ubuntu22p04" # Define the steps to run the build job env: CC: ${{ matrix.config.cc }} @@ -336,8 +356,8 @@ jobs: - name: Install dependencies run: | - sudo bash ./.github/workflows/install_dependencies_build_ubuntu22p04.sh - sudo bash ./.github/workflows/install_dependencies_run_ubuntu22p04.sh + sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh + sudo bash ./.github/workflows/install_dependencies_run_${{ matrix.config.dependency_version }}.sh sudo python3 -m pip install -r requirements.txt - name: Dump tool versions @@ -360,7 +380,7 @@ jobs: docker_distribution: name: Build docker image for distribution - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [linux_build, change_detect] steps: - name: Cancel previous @@ -397,7 +417,7 @@ jobs: linux_regression_tests: name: linux_regression_tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [linux_build, change_detect] container: ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-env strategy: @@ -438,7 +458,7 @@ jobs: chmod +x build/yosys/bin/yosys-config chmod +x build/yosys/bin/yosys-filterlib chmod +x build/yosys/bin/yosys-smtbmc - - name: ${{matrix.config.name}}_GCC-9_(Ubuntu 20.04) + - name: ${{matrix.config.name}}_GCC-11_(Ubuntu 22.04) shell: bash run: source openfpga.sh && source openfpga_flow/regression_test_scripts/${{matrix.config.name}}.sh --debug --show_thread_logs - name: Upload artifact @@ -454,7 +474,7 @@ jobs: needs: change_detect if: ${{ !fromJSON(needs.change_detect.outputs.source_modified) }} name: docker_regression_tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: image: ghcr.io/${{ needs.change_detect.outputs.docker_repo }}/openfpga-master:latest options: --user root --workdir /home/openfpga_user @@ -482,10 +502,10 @@ jobs: - name: Checkout OpenFPGA repo uses: actions/checkout@v3 - - name: ${{matrix.config.name}}_GCC-9_(Ubuntu 20.04) + - name: ${{matrix.config.name}}_GCC-11_(Ubuntu 22.04) shell: bash run: | - bash .github/workflows/install_dependencies_run.sh + bash .github/workflows/install_dependencies_run_ubuntu22p04.sh ${PYTHON_EXEC} -m pip install -r requirements.txt rsync -am --exclude='openfpga_flow/**' /opt/openfpga/. . unset OPENFPGA_PATH diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f29dbd883..f0c0b3a28 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-20.04 + runs-on: ubuntu-22.04 outputs: docker_repo: ${{ steps.changes.outputs.docker_repo }} steps: @@ -64,15 +64,14 @@ jobs: strategy: matrix: compiler: - - gcc-7 - - gcc-8 - gcc-9 - gcc-10 - gcc-11 - - clang-6.0 - - clang-7 - - clang-8 - - clang-10 + - gcc-12 + - clang-11 + - clang-12 + - clang-13 + - clang-14 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index fd1365272..273c1122c 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -12,17 +12,20 @@ on: jobs: change_detect: name: "Check" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: config: - name: "C/C++" code_type: "-cpp" + dependency_version: "ubuntu22p04" - name: "XML" code_type: "-xml" + dependency_version: "ubuntu22p04" - name: "Python" code_type: "-py" + dependency_version: "ubuntu22p04" steps: - name: Cancel previous uses: styfle/cancel-workflow-action@0.9.1 @@ -34,12 +37,12 @@ jobs: - name: Install dependencies run: | - sudo bash ./.github/workflows/install_dependencies_build.sh + sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh sudo python3 -m pip install -r requirements.txt - name: Dump tool versions run: | - clang-format-10 --version + clang-format-14 --version black --version - name: Check format diff --git a/.github/workflows/install_dependencies_build.sh b/.github/workflows/install_dependencies_build_ubuntu20p04.sh similarity index 100% rename from .github/workflows/install_dependencies_build.sh rename to .github/workflows/install_dependencies_build_ubuntu20p04.sh diff --git a/.github/workflows/install_dependencies_build_ubuntu22p04.sh b/.github/workflows/install_dependencies_build_ubuntu22p04.sh index e49f0b9d4..19d806add 100755 --- a/.github/workflows/install_dependencies_build_ubuntu22p04.sh +++ b/.github/workflows/install_dependencies_build_ubuntu22p04.sh @@ -53,6 +53,9 @@ apt-get install -y \ gcc-10 \ g++-11 \ gcc-11 \ + clang-11 \ clang-12 \ - clang-format-12 \ + clang-13 \ + clang-14 \ + clang-format-14 \ libxml2-utils diff --git a/.github/workflows/install_dependencies_run.sh b/.github/workflows/install_dependencies_run_ubuntu20p04.sh similarity index 100% rename from .github/workflows/install_dependencies_run.sh rename to .github/workflows/install_dependencies_run_ubuntu20p04.sh From 8baa53c605f56ae23f7f86d29665e3c7d87173fa Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 16:16:43 -0700 Subject: [PATCH 02/10] [script] now use clang-format-14 as c++/c formatter --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 23c2cdab6..9f39d6c22 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ endif # Define executables PYTHON_EXEC ?= python3 -CLANG_FORMAT_EXEC ?= clang-format-10 +CLANG_FORMAT_EXEC ?= clang-format-14 XML_FORMAT_EXEC ?= xmllint PYTHON_FORMAT_EXEC ?= black From 45dda1ed574cbf1d8f96de56e5f2823294b29c5b Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 16:23:16 -0700 Subject: [PATCH 03/10] [docker] now move to ubuntu 22.04 --- docker/Dockerfile.base | 4 ++-- docker/Dockerfile.clang-10 | 2 -- docker/Dockerfile.clang-11 | 2 ++ docker/Dockerfile.clang-12 | 2 ++ docker/Dockerfile.clang-13 | 2 ++ docker/Dockerfile.clang-14 | 2 ++ docker/Dockerfile.clang-6.0 | 2 -- docker/Dockerfile.clang-7 | 2 -- docker/Dockerfile.clang-8 | 2 -- docker/Dockerfile.env | 4 ++-- docker/Dockerfile.gcc-12 | 2 ++ docker/Dockerfile.gcc-7 | 2 -- docker/Dockerfile.gcc-8 | 2 -- 13 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 docker/Dockerfile.clang-10 create mode 100644 docker/Dockerfile.clang-11 create mode 100644 docker/Dockerfile.clang-12 create mode 100644 docker/Dockerfile.clang-13 create mode 100644 docker/Dockerfile.clang-14 delete mode 100644 docker/Dockerfile.clang-6.0 delete mode 100644 docker/Dockerfile.clang-7 delete mode 100644 docker/Dockerfile.clang-8 create mode 100644 docker/Dockerfile.gcc-12 delete mode 100644 docker/Dockerfile.gcc-7 delete mode 100644 docker/Dockerfile.gcc-8 diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index fafef66d3..bffd33166 100755 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -1,9 +1,9 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.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. RUN add-apt-repository ppa:git-core/ppa -ADD .github/workflows/install_dependencies_build.sh install_dependencies_build.sh +ADD .github/workflows/install_dependencies_build_ubuntu22p04.sh install_dependencies_build.sh RUN bash install_dependencies_build.sh ADD requirements.txt requirements.txt RUN python3 -m pip install -r requirements.txt diff --git a/docker/Dockerfile.clang-10 b/docker/Dockerfile.clang-10 deleted file mode 100644 index 447c5fc81..000000000 --- a/docker/Dockerfile.clang-10 +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y clang-format-7 clang-10 diff --git a/docker/Dockerfile.clang-11 b/docker/Dockerfile.clang-11 new file mode 100644 index 000000000..4ba9ad201 --- /dev/null +++ b/docker/Dockerfile.clang-11 @@ -0,0 +1,2 @@ +FROM ghcr.io/lnis-uofu/openfpga-build-base +RUN apt-get update && apt-get install -y clang-format-14 clang-11 diff --git a/docker/Dockerfile.clang-12 b/docker/Dockerfile.clang-12 new file mode 100644 index 000000000..57a8dbd0d --- /dev/null +++ b/docker/Dockerfile.clang-12 @@ -0,0 +1,2 @@ +FROM ghcr.io/lnis-uofu/openfpga-build-base +RUN apt-get update && apt-get install -y clang-format-14 clang-12 diff --git a/docker/Dockerfile.clang-13 b/docker/Dockerfile.clang-13 new file mode 100644 index 000000000..902e8f29f --- /dev/null +++ b/docker/Dockerfile.clang-13 @@ -0,0 +1,2 @@ +FROM ghcr.io/lnis-uofu/openfpga-build-base +RUN apt-get update && apt-get install -y clang-format-14 clang-13 diff --git a/docker/Dockerfile.clang-14 b/docker/Dockerfile.clang-14 new file mode 100644 index 000000000..bad23c8b0 --- /dev/null +++ b/docker/Dockerfile.clang-14 @@ -0,0 +1,2 @@ +FROM ghcr.io/lnis-uofu/openfpga-build-base +RUN apt-get update && apt-get install -y clang-format-14 clang-14 diff --git a/docker/Dockerfile.clang-6.0 b/docker/Dockerfile.clang-6.0 deleted file mode 100644 index 6d7c36b3e..000000000 --- a/docker/Dockerfile.clang-6.0 +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y clang-format-7 clang-6.0 diff --git a/docker/Dockerfile.clang-7 b/docker/Dockerfile.clang-7 deleted file mode 100644 index 485a61318..000000000 --- a/docker/Dockerfile.clang-7 +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y clang-format-7 clang-7 diff --git a/docker/Dockerfile.clang-8 b/docker/Dockerfile.clang-8 deleted file mode 100644 index 5a4a5f4ef..000000000 --- a/docker/Dockerfile.clang-8 +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y clang-format-7 clang-8 diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index b2ca7c202..62620ebb3 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -1,9 +1,9 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.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 -ADD .github/workflows/install_dependencies_run.sh install_dependencies_run.sh +ADD .github/workflows/install_dependencies_run_ubuntu22p04.sh install_dependencies_run.sh 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 diff --git a/docker/Dockerfile.gcc-12 b/docker/Dockerfile.gcc-12 new file mode 100644 index 000000000..d21a8e1ed --- /dev/null +++ b/docker/Dockerfile.gcc-12 @@ -0,0 +1,2 @@ +FROM ghcr.io/lnis-uofu/openfpga-build-base +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-12 g++-12 diff --git a/docker/Dockerfile.gcc-7 b/docker/Dockerfile.gcc-7 deleted file mode 100644 index d7638677b..000000000 --- a/docker/Dockerfile.gcc-7 +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y gcc-7 g++-7 diff --git a/docker/Dockerfile.gcc-8 b/docker/Dockerfile.gcc-8 deleted file mode 100644 index 187a47623..000000000 --- a/docker/Dockerfile.gcc-8 +++ /dev/null @@ -1,2 +0,0 @@ -FROM ghcr.io/lnis-uofu/openfpga-build-base -RUN apt-get update && apt-get install -y gcc-8 g++-8 From cb5c8f7c46cf2e0cbd87cf7247b99f8e09bffd9b Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 16:27:30 -0700 Subject: [PATCH 04/10] [doc] update os and dep info --- docs/source/tutorials/getting_started/compile.rst | 9 ++++----- .../tutorials/getting_started/regtest_dependencies.sh | 2 +- .../getting_started/ubuntu20p04_dependencies.sh | 2 +- .../getting_started/ubuntu20p04_regtest_dependencies.sh | 1 + .../getting_started/ubuntu22p04_regtest_dependencies.sh | 1 + 5 files changed, 8 insertions(+), 7 deletions(-) create mode 120000 docs/source/tutorials/getting_started/ubuntu20p04_regtest_dependencies.sh create mode 120000 docs/source/tutorials/getting_started/ubuntu22p04_regtest_dependencies.sh diff --git a/docs/source/tutorials/getting_started/compile.rst b/docs/source/tutorials/getting_started/compile.rst index 1a1cc89c0..fe7f0b5d6 100644 --- a/docs/source/tutorials/getting_started/compile.rst +++ b/docs/source/tutorials/getting_started/compile.rst @@ -12,7 +12,7 @@ How to Compile Supported Operating Systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -OpenFPGA is continously tested with Ubuntu 20.04 and partially on Ubuntu 22.04 +OpenFPGA is continously tested with Ubuntu 22.04 and partially on Ubuntu 20.04 It might work with earlier versions and other distributions. In addition to continous integration, our community users have tested OpenFPGA on their local machines using the following operating systems: @@ -21,7 +21,6 @@ In addition to continous integration, our community users have tested OpenFPGA o - CentOS 8 - Ubuntu 18.04 - Ubuntu 21.04 -- Ubuntu 22.04 Build Steps ~~~~~~~~~~~ @@ -34,7 +33,7 @@ In general, please follow the steps to compile cd OpenFPGA make all -.. note:: OpenFPGA requires gcc/g++ version > 7 and clang version > 6. +.. note:: OpenFPGA requires gcc/g++ version > 9 and clang version > 10. .. note:: cmake3.12+ is recommended to compile OpenFPGA with GUI @@ -111,7 +110,7 @@ Ubuntu 20.04 - Dependencies required to run regression tests -.. include:: regtest_dependencies.sh +.. include:: ubuntu20p04_regtest_dependencies.sh :code: shell .. note:: Python packages are also required @@ -135,7 +134,7 @@ Ubuntu 22.04 - Dependencies required to run regression tests -.. include:: regtest_dependencies.sh +.. include:: ubuntu22p04_regtest_dependencies.sh :code: shell .. note:: Python packages are also required diff --git a/docs/source/tutorials/getting_started/regtest_dependencies.sh b/docs/source/tutorials/getting_started/regtest_dependencies.sh index 39fb7c71f..9454e026f 120000 --- a/docs/source/tutorials/getting_started/regtest_dependencies.sh +++ b/docs/source/tutorials/getting_started/regtest_dependencies.sh @@ -1 +1 @@ -../../../../.github/workflows/install_dependencies_run.sh \ No newline at end of file +../../../../.github/workflows/install_dependencies_run_ubuntu22p04.sh \ No newline at end of file diff --git a/docs/source/tutorials/getting_started/ubuntu20p04_dependencies.sh b/docs/source/tutorials/getting_started/ubuntu20p04_dependencies.sh index 326a04511..b5c829840 120000 --- a/docs/source/tutorials/getting_started/ubuntu20p04_dependencies.sh +++ b/docs/source/tutorials/getting_started/ubuntu20p04_dependencies.sh @@ -1 +1 @@ -../../../../.github/workflows/install_dependencies_build.sh \ No newline at end of file +../../../../.github/workflows/install_dependencies_build_ubuntu20p04.sh \ No newline at end of file diff --git a/docs/source/tutorials/getting_started/ubuntu20p04_regtest_dependencies.sh b/docs/source/tutorials/getting_started/ubuntu20p04_regtest_dependencies.sh new file mode 120000 index 000000000..67a110927 --- /dev/null +++ b/docs/source/tutorials/getting_started/ubuntu20p04_regtest_dependencies.sh @@ -0,0 +1 @@ +../../../../.github/workflows/install_dependencies_run_ubuntu20p04.sh \ No newline at end of file diff --git a/docs/source/tutorials/getting_started/ubuntu22p04_regtest_dependencies.sh b/docs/source/tutorials/getting_started/ubuntu22p04_regtest_dependencies.sh new file mode 120000 index 000000000..9454e026f --- /dev/null +++ b/docs/source/tutorials/getting_started/ubuntu22p04_regtest_dependencies.sh @@ -0,0 +1 @@ +../../../../.github/workflows/install_dependencies_run_ubuntu22p04.sh \ No newline at end of file From 691734269b262253f7af300091a6263c602c8869 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 16:37:25 -0700 Subject: [PATCH 05/10] [ci] typo on dep file --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9eb88af3b..a5dff3d39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -238,11 +238,11 @@ jobs: - name: "Build (GCC-11 on Ubuntu 20.04)" cc: gcc-11 cxx: g++-11 - dependency_version: "ubuntu22p04" + dependency_version: "ubuntu20p04" - name: "Build (Clang-10 on Ubuntu 20.04)" cc: clang-10 cxx: clang++-10 - dependency_version: "ubuntu22p04" + dependency_version: "ubuntu20p04" # Define the steps to run the build job env: CC: ${{ matrix.config.cc }} From df3b4357fc2e712aa18d9b00d9a83dde1a5eea07 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 18:24:44 -0700 Subject: [PATCH 06/10] [lib] add header to pass Gcc-12 --- libs/libnamemanager/src/base/io_name_map.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/libnamemanager/src/base/io_name_map.h b/libs/libnamemanager/src/base/io_name_map.h index b1f107a10..8203c666f 100644 --- a/libs/libnamemanager/src/base/io_name_map.h +++ b/libs/libnamemanager/src/base/io_name_map.h @@ -5,6 +5,9 @@ * Include header files required by the data structure definition *******************************************************************/ #include +#include +#include +#include #include "openfpga_port.h" From 42fc136ff5146c24460dc4852bb3c3c8d2155abf Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 18:27:04 -0700 Subject: [PATCH 07/10] [ci] show clear error log when build errors out --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5dff3d39..83cfed09b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,6 +137,12 @@ jobs: run: | make all BUILD_TYPE=$BUILD_TYPE + - name: Clear error log + if: ${{ failure() }} + shell: bash + run: | + make all BUILD_TYPE=$BUILD_TYPE -j1 + # Check the cache size and see if it is over the limit - name: Check ccache size run: ccache -s @@ -159,6 +165,7 @@ jobs: openfpga_flow openfpga.sh + linux_build_opt: needs: change_detect if: ${{ fromJSON(needs.change_detect.outputs.source_modified) }} From 03bea1c56651b85bec07ff165baa631ac3a1e5c6 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 18:47:37 -0700 Subject: [PATCH 08/10] [lib] code format --- libs/libnamemanager/src/base/io_name_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libnamemanager/src/base/io_name_map.h b/libs/libnamemanager/src/base/io_name_map.h index 8203c666f..5e4370b3b 100644 --- a/libs/libnamemanager/src/base/io_name_map.h +++ b/libs/libnamemanager/src/base/io_name_map.h @@ -4,8 +4,8 @@ /******************************************************************** * Include header files required by the data structure definition *******************************************************************/ -#include #include +#include #include #include From 36d37289feb6bdfcbc31ba4ffb6219e7ae3aba64 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 21:21:36 -0700 Subject: [PATCH 09/10] [lib] add missing header required by clang-11+ --- libs/libarchopenfpga/src/ql_memory_bank_config_setting.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/libarchopenfpga/src/ql_memory_bank_config_setting.h b/libs/libarchopenfpga/src/ql_memory_bank_config_setting.h index 593aad73a..82dcd4989 100644 --- a/libs/libarchopenfpga/src/ql_memory_bank_config_setting.h +++ b/libs/libarchopenfpga/src/ql_memory_bank_config_setting.h @@ -1,6 +1,7 @@ #ifndef QL_MEMORY_BANK_CONFIG_SETTING_H #define QL_MEMORY_BANK_CONFIG_SETTING_H +#include #include #include From 7dc2c4951c3c2567115c6f92adcfaa01511357bf Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sun, 5 May 2024 21:56:56 -0700 Subject: [PATCH 10/10] [core] add missing header required by clang-11+ --- openfpga/src/fpga_bitstream/fabric_bitstream.h | 1 + 1 file changed, 1 insertion(+) diff --git a/openfpga/src/fpga_bitstream/fabric_bitstream.h b/openfpga/src/fpga_bitstream/fabric_bitstream.h index 67e92f9f8..85a5054b8 100644 --- a/openfpga/src/fpga_bitstream/fabric_bitstream.h +++ b/openfpga/src/fpga_bitstream/fabric_bitstream.h @@ -30,6 +30,7 @@ #ifndef FABRIC_BITSTREAM_H #define FABRIC_BITSTREAM_H +#include #include #include #include