- Remove ubuntu 18.04 from CI because GitHub deprecated it
- Replace macos-10 with macos-11, macos-12 and macos-13
- Add ubuntu 22.04 to CI
- Fix Clang 11 build
This commit is contained in:
Sebastian Messmer 2023-06-19 09:14:32 -07:00
parent 9e9dcf409c
commit edc331301f
3 changed files with 74 additions and 32 deletions

View File

@ -14,21 +14,29 @@ runs:
shell: bash shell: bash
run: | run: |
echo 'Acquire::Retries "20";' | sudo tee -a /etc/apt/apt.conf.d/80-retries echo 'Acquire::Retries "20";' | sudo tee -a /etc/apt/apt.conf.d/80-retries
if [[ "${{inputs.os}}" == "ubuntu-18.04" ]]; then if [[ "${{inputs.os}}" == "ubuntu-22.04" ]]; then
echo Adding apt repositories for newer clang versions on Ubuntu 18.04 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 - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo touch /etc/apt/sources.list.d/clang.list sudo touch /etc/apt/sources.list.d/clang.list
sudo chmod o+w /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 http://apt.llvm.org/jammy/ llvm-toolchain-jammy 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-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 sudo chmod o-w /etc/apt/sources.list.d/clang.list
elif [[ "${{inputs.os}}" == "ubuntu-20.04" ]]; then elif [[ "${{inputs.os}}" == "ubuntu-20.04" ]]; then
echo Adding apt repositories for newer clang versions on Ubuntu 20.04 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 - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo touch /etc/apt/sources.list.d/clang.list sudo touch /etc/apt/sources.list.d/clang.list
sudo chmod o+w /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 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-11 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 sudo chmod o-w /etc/apt/sources.list.d/clang.list
fi fi
sudo apt-get update sudo apt-get update

View File

@ -10,4 +10,4 @@ runs:
- name: Install macOS dependencies - name: Install macOS dependencies
shell: bash shell: bash
run: | 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}}

View File

@ -9,9 +9,11 @@ jobs:
matrix: matrix:
name: [""] name: [""]
os: os:
- macos-10.15 - macos-11
- ubuntu-18.04 - macos-12
- macos-13
- ubuntu-20.04 - ubuntu-20.04
- ubuntu-22.04
compiler: compiler:
- cxx: g++-7 - cxx: g++-7
cc: gcc-7 cc: gcc-7
@ -60,7 +62,7 @@ jobs:
cc: clang-11 cc: clang-11
macos_cxx: /usr/local/opt/llvm@11/bin/clang++ macos_cxx: /usr/local/opt/llvm@11/bin/clang++
macos_cc: /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 homebrew_package: llvm@11
# Apple Clang # Apple Clang
# - cxx: clang++ # - cxx: clang++
@ -78,19 +80,51 @@ jobs:
run_tests: [true] run_tests: [true]
run_clang_tidy: [false] run_clang_tidy: [false]
exclude: exclude:
# Apple CI machines cannot install LLVM 7 via homebrew anymore # MacOS CI doesn't have Clang 7, 8, 9 or GCC 7, 8 anymore
- os: macos-10.15 - 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} 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: macos-11
- os: ubuntu-18.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}
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++-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: include:
- name: Local dependencies - name: Local dependencies
os: ubuntu-18.04 os: ubuntu-22.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: RelWithDebInfo build_type: RelWithDebInfo
extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake
extra_cxxflags: "" extra_cxxflags: ""
@ -99,11 +133,11 @@ jobs:
run_build: true run_build: true
run_tests: true run_tests: true
- name: Local dependencies - name: Local dependencies
os: ubuntu-20.04 os: ubuntu-22.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: RelWithDebInfo build_type: RelWithDebInfo
extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake
extra_cxxflags: "" extra_cxxflags: ""
@ -112,7 +146,7 @@ jobs:
run_build: true run_build: true
run_tests: true run_tests: true
- name: Werror gcc - name: Werror gcc
os: ubuntu-20.04 os: ubuntu-22.04
compiler: compiler:
cxx: g++-9 cxx: g++-9
cc: gcc-9 cc: gcc-9
@ -124,11 +158,11 @@ jobs:
run_build: true run_build: true
run_tests: false run_tests: false
- name: Werror clang - name: Werror clang
os: ubuntu-20.04 os: ubuntu-22.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang++-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: RelWithDebInfo build_type: RelWithDebInfo
extra_cmake_flags: -DUSE_WERROR=on extra_cmake_flags: -DUSE_WERROR=on
extra_cxxflags: "" extra_cxxflags: ""
@ -136,11 +170,11 @@ jobs:
run_build: true run_build: true
run_tests: false run_tests: false
- name: No compatibility - name: No compatibility
os: ubuntu-20.04 os: ubuntu-22.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang++-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: RelWithDebInfo build_type: RelWithDebInfo
extra_cmake_flags: "" extra_cmake_flags: ""
extra_cxxflags: "-DCRYFS_NO_COMPATIBILITY" extra_cxxflags: "-DCRYFS_NO_COMPATIBILITY"
@ -149,11 +183,12 @@ jobs:
run_build: true run_build: true
run_tests: true run_tests: true
- name: ASAN - name: ASAN
# TODO Update to ubuntu-22.04
os: ubuntu-20.04 os: ubuntu-20.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang++-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: Debug build_type: Debug
# OpenMP crashes under asan. Disable OpenMP. # OpenMP crashes under asan. Disable OpenMP.
# TODO is it enough to replace this with omp_num_threads: 1 ? # TODO is it enough to replace this with omp_num_threads: 1 ?
@ -164,11 +199,12 @@ jobs:
run_build: true run_build: true
run_tests: true run_tests: true
- name: UBSAN - name: UBSAN
# TODO Update to ubuntu-22.04
os: ubuntu-20.04 os: ubuntu-20.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang++-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: Debug build_type: Debug
# OpenMP crashes under ubsan. Disable OpenMP. # OpenMP crashes under ubsan. Disable OpenMP.
# TODO is it enough to replace this with omp_num_threads: 1 ? # TODO is it enough to replace this with omp_num_threads: 1 ?
@ -179,11 +215,12 @@ jobs:
run_build: true run_build: true
run_tests: true run_tests: true
- name: TSAN - name: TSAN
# TODO Update to ubuntu-22.04
os: ubuntu-20.04 os: ubuntu-20.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: clang-11 cc: clang-11
apt_package: clang++-11 apt_package: clang-11 libomp5-11 libomp-11-dev
build_type: Debug build_type: Debug
extra_cmake_flags: "" extra_cmake_flags: ""
extra_cxxflags: "-O2 -fsanitize=thread -fno-omit-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common" 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" 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 extra_env_vars_for_test: OMP_NUM_THREADS=1
- name: clang-tidy - name: clang-tidy
os: ubuntu-20.04 os: ubuntu-22.04
compiler: compiler:
cxx: clang++-11 cxx: clang++-11
cc: 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 build_type: RelWithDebInfo
extra_cmake_flags: "" extra_cmake_flags: ""
extra_cxxflags: "" extra_cxxflags: ""
@ -253,9 +290,6 @@ jobs:
shell: bash shell: bash
run: | 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 # 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 python3 -m pip install conan==1.60.1
- name: Save pip cache - name: Save pip cache
# note: this access key has write access to the cache. This can't run on PRs. # note: this access key has write access to the cache. This can't run on PRs.