diff --git a/.github/workflows/actions/setup_linux/action.yaml b/.github/workflows/actions/setup_linux/action.yaml index 4f3afac7..6773c5ce 100644 --- a/.github/workflows/actions/setup_linux/action.yaml +++ b/.github/workflows/actions/setup_linux/action.yaml @@ -14,21 +14,29 @@ runs: shell: bash run: | echo 'Acquire::Retries "20";' | sudo tee -a /etc/apt/apt.conf.d/80-retries - if [[ "${{inputs.os}}" == "ubuntu-18.04" ]]; then - echo Adding apt repositories for newer clang versions on Ubuntu 18.04 + if [[ "${{inputs.os}}" == "ubuntu-22.04" ]]; then + echo Adding apt repositories for newer clang versions on Ubuntu 22.04 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - sudo touch /etc/apt/sources.list.d/clang.list sudo chmod o+w /etc/apt/sources.list.d/clang.list - echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main" >> /etc/apt/sources.list.d/clang.list - echo "deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main" >> /etc/apt/sources.list.d/clang.list + echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" >> /etc/apt/sources.list.d/clang.list + echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" >> /etc/apt/sources.list.d/clang.list + echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list.d/clang.list + echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list.d/clang.list + echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list.d/clang.list + echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list.d/clang.list sudo chmod o-w /etc/apt/sources.list.d/clang.list elif [[ "${{inputs.os}}" == "ubuntu-20.04" ]]; then echo Adding apt repositories for newer clang versions on Ubuntu 20.04 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - sudo touch /etc/apt/sources.list.d/clang.list sudo chmod o+w /etc/apt/sources.list.d/clang.list - echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" >> /etc/apt/sources.list.d/clang.list - echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" >> /etc/apt/sources.list.d/clang.list + echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" >> /etc/apt/sources.list.d/clang.list + echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main" >> /etc/apt/sources.list.d/clang.list + echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list.d/clang.list + echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list.d/clang.list + echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" >> /etc/apt/sources.list.d/clang.list + echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" >> /etc/apt/sources.list.d/clang.list sudo chmod o-w /etc/apt/sources.list.d/clang.list fi sudo apt-get update diff --git a/.github/workflows/actions/setup_macos/action.yaml b/.github/workflows/actions/setup_macos/action.yaml index 8dcf64bc..6ac9803f 100644 --- a/.github/workflows/actions/setup_macos/action.yaml +++ b/.github/workflows/actions/setup_macos/action.yaml @@ -10,4 +10,4 @@ runs: - name: Install macOS dependencies shell: bash run: | - brew install ninja macfuse libomp ccache md5sha1sum ${{inputs.extra_homebrew_packages}} + brew install ninja macfuse libomp ccache md5sha1sum pkg-config ${{inputs.extra_homebrew_packages}} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 06ed2aa6..ecc6a515 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,9 +9,11 @@ jobs: matrix: name: [""] os: - - macos-10.15 - - ubuntu-18.04 + - macos-11 + - macos-12 + - macos-13 - ubuntu-20.04 + - ubuntu-22.04 compiler: - cxx: g++-7 cc: gcc-7 @@ -60,7 +62,7 @@ jobs: cc: clang-11 macos_cxx: /usr/local/opt/llvm@11/bin/clang++ macos_cc: /usr/local/opt/llvm@11/bin/clang - apt_package: clang-11 + apt_package: clang-11 libomp5-11 libomp-11-dev homebrew_package: llvm@11 # Apple Clang # - cxx: clang++ @@ -78,19 +80,51 @@ jobs: run_tests: [true] run_clang_tidy: [false] exclude: - # Apple CI machines cannot install LLVM 7 via homebrew anymore - - os: macos-10.15 + # MacOS CI doesn't have Clang 7, 8, 9 or GCC 7, 8 anymore + - os: macos-11 compiler: {cxx: clang++-7, cc: clang-7, macos_cxx: /usr/local/opt/llvm@7/bin/clang++, macos_cc: /usr/local/opt/llvm@7/bin/clang, apt_package: clang-7, homebrew_package: llvm@7} - # GCC 10 on Ubuntu 18.04 doesn't seem to work, potentially because cmake doesn't know yet that the STL now depends on pthread. See https://github.com/pothosware/SoapySDRPlay3/issues/5 - - os: ubuntu-18.04 - compiler: {cxx: g++-10, cc: gcc-10, macos_cxx: g++-10, macos_cc: gcc-10, apt_package: g++-10, homebrew_package: gcc@10} + - os: macos-11 + compiler: {cxx: clang++-8, cc: clang-8, macos_cxx: /usr/local/opt/llvm@8/bin/clang++, macos_cc: /usr/local/opt/llvm@8/bin/clang, apt_package: clang-8, homebrew_package: llvm@8} + - os: macos-11 + compiler: {cxx: clang++-9, cc: clang-9, macos_cxx: /usr/local/opt/llvm@9/bin/clang++, macos_cc: /usr/local/opt/llvm@9/bin/clang, apt_package: clang-9, homebrew_package: llvm@9} + - os: macos-11 + compiler: {cxx: g++-7, cc: gcc-7, macos_cxx: g++-7, macos_cc: gcc-7, homebrew_package: gcc@7, apt_package: g++-7} + - os: macos-11 + compiler: {cxx: g++-8, cc: gcc-8, macos_cxx: g++-8, macos_cc: gcc-8, homebrew_package: gcc@8, apt_package: g++-8} + - os: macos-12 + compiler: {cxx: clang++-7, cc: clang-7, macos_cxx: /usr/local/opt/llvm@7/bin/clang++, macos_cc: /usr/local/opt/llvm@7/bin/clang, apt_package: clang-7, homebrew_package: llvm@7} + - os: macos-12 + compiler: {cxx: clang++-8, cc: clang-8, macos_cxx: /usr/local/opt/llvm@8/bin/clang++, macos_cc: /usr/local/opt/llvm@8/bin/clang, apt_package: clang-8, homebrew_package: llvm@8} + - os: macos-12 + compiler: {cxx: clang++-9, cc: clang-9, macos_cxx: /usr/local/opt/llvm@9/bin/clang++, macos_cc: /usr/local/opt/llvm@9/bin/clang, apt_package: clang-9, homebrew_package: llvm@9} + - os: macos-12 + compiler: {cxx: g++-7, cc: gcc-7, macos_cxx: g++-7, macos_cc: gcc-7, homebrew_package: gcc@7, apt_package: g++-7} + - os: macos-12 + compiler: {cxx: g++-8, cc: gcc-8, macos_cxx: g++-8, macos_cc: gcc-8, homebrew_package: gcc@8, apt_package: g++-8} + - os: macos-12 + compiler: {cxx: g++-9, cc: gcc-9, macos_cxx: g++-9, macos_cc: gcc-9, homebrew_package: gcc@9, apt_package: g++-9} + - os: macos-13 + compiler: {cxx: clang++-7, cc: clang-7, macos_cxx: /usr/local/opt/llvm@7/bin/clang++, macos_cc: /usr/local/opt/llvm@7/bin/clang, apt_package: clang-7, homebrew_package: llvm@7} + # Ubuntu 22.04 doesn't have gcc 7, 8 or clang 7, 8, 9, 10 anymore + - os: ubuntu-22.04 + compiler: {cxx: g++-7, cc: gcc-7, macos_cxx: g++-7, macos_cc: gcc-7, homebrew_package: gcc@7, apt_package: g++-7} + - os: ubuntu-22.04 + compiler: {cxx: g++-8, cc: gcc-8, macos_cxx: g++-8, macos_cc: gcc-8, homebrew_package: gcc@8, apt_package: g++-8} + - os: ubuntu-22.04 + compiler: {cxx: clang++-7, cc: clang-7, macos_cxx: /usr/local/opt/llvm@7/bin/clang++, macos_cc: /usr/local/opt/llvm@7/bin/clang, apt_package: clang-7, homebrew_package: llvm@7} + - os: ubuntu-22.04 + compiler: {cxx: clang++-8, cc: clang-8, macos_cxx: /usr/local/opt/llvm@8/bin/clang++, macos_cc: /usr/local/opt/llvm@8/bin/clang, apt_package: clang-8, homebrew_package: llvm@8} + - os: ubuntu-22.04 + compiler: {cxx: clang++-9, cc: clang-9, macos_cxx: /usr/local/opt/llvm@9/bin/clang++, macos_cc: /usr/local/opt/llvm@9/bin/clang, apt_package: clang-9, homebrew_package: llvm@9} + - os: ubuntu-22.04 + compiler: {cxx: clang++-10, cc: clang-10, macos_cxx: /usr/local/opt/llvm@10/bin/clang++, macos_cc: /usr/local/opt/llvm@10/bin/clang, apt_package: clang-10, homebrew_package: llvm@10} include: - name: Local dependencies - os: ubuntu-18.04 + os: ubuntu-22.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: RelWithDebInfo extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake extra_cxxflags: "" @@ -99,11 +133,11 @@ jobs: run_build: true run_tests: true - name: Local dependencies - os: ubuntu-20.04 + os: ubuntu-22.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: RelWithDebInfo extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake extra_cxxflags: "" @@ -112,7 +146,7 @@ jobs: run_build: true run_tests: true - name: Werror gcc - os: ubuntu-20.04 + os: ubuntu-22.04 compiler: cxx: g++-9 cc: gcc-9 @@ -124,11 +158,11 @@ jobs: run_build: true run_tests: false - name: Werror clang - os: ubuntu-20.04 + os: ubuntu-22.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang++-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: RelWithDebInfo extra_cmake_flags: -DUSE_WERROR=on extra_cxxflags: "" @@ -136,11 +170,11 @@ jobs: run_build: true run_tests: false - name: No compatibility - os: ubuntu-20.04 + os: ubuntu-22.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang++-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: RelWithDebInfo extra_cmake_flags: "" extra_cxxflags: "-DCRYFS_NO_COMPATIBILITY" @@ -149,11 +183,12 @@ jobs: run_build: true run_tests: true - name: ASAN + # TODO Update to ubuntu-22.04 os: ubuntu-20.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang++-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: Debug # OpenMP crashes under asan. Disable OpenMP. # TODO is it enough to replace this with omp_num_threads: 1 ? @@ -164,11 +199,12 @@ jobs: run_build: true run_tests: true - name: UBSAN + # TODO Update to ubuntu-22.04 os: ubuntu-20.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang++-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: Debug # OpenMP crashes under ubsan. Disable OpenMP. # TODO is it enough to replace this with omp_num_threads: 1 ? @@ -179,11 +215,12 @@ jobs: run_build: true run_tests: true - name: TSAN + # TODO Update to ubuntu-22.04 os: ubuntu-20.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang++-11 + apt_package: clang-11 libomp5-11 libomp-11-dev build_type: Debug extra_cmake_flags: "" extra_cxxflags: "-O2 -fsanitize=thread -fno-omit-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common" @@ -193,11 +230,11 @@ jobs: gtest_args: "--gtest_filter=-LoggingTest.LoggingAlsoWorksAfterFork:AssertTest_*:BacktraceTest.*:SubprocessTest.*:SignalCatcherTest.*_thenDies:SignalHandlerTest.*_thenDies:SignalHandlerTest.givenMultipleSigIntHandlers_whenRaising_thenCatchesCorrectSignal:CliTest_Setup.*:CliTest_IntegrityCheck.*:*/CliTest_WrongEnvironment.*:CliTest_Unmount.*:CliTest.WorksWithCommasInBasedir" extra_env_vars_for_test: OMP_NUM_THREADS=1 - name: clang-tidy - os: ubuntu-20.04 + os: ubuntu-22.04 compiler: cxx: clang++-11 cc: clang-11 - apt_package: clang++-11 clang-tidy-11 + apt_package: clang-11 clang-tidy-11 libomp5-11 libomp-11-dev build_type: RelWithDebInfo extra_cmake_flags: "" extra_cxxflags: "" @@ -253,9 +290,6 @@ jobs: shell: bash run: | # Using "python3 -m pip" instead of "pip3" to make sure we get the same pip that we queried the cache dir for the Github Cache action - if [[ "${{matrix.os}}" == "ubuntu-18.04" ]]; then - python3 -m pip install setuptools - fi python3 -m pip install conan==1.60.1 - name: Save pip cache # note: this access key has write access to the cache. This can't run on PRs.