Skip to content

Commit

Permalink
[ci] now use ubuntu 22.04 as the main os to check build compatibility…
Browse files Browse the repository at this point in the history
…; Drop gcc-8, clang-6, clang-7, clang-8, clang-9 support
  • Loading branch information
tangxifan committed May 5, 2024
1 parent 80d425d commit 421f396
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 63 deletions.
124 changes: 72 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down Expand Up @@ -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}}
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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}}
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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 }}
Expand All @@ -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: |
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/install_dependencies_build_ubuntu22p04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 421f396

Please sign in to comment.