Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from ubuntu-latest to ubuntu-22.04 in CI, update some dependencies #644

Merged
merged 17 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Checks: >
-readability-magic-numbers,
-readability-uppercase-literal-suffix,
-misc-confusable-identifiers,
-portability-simd-intrinsics,
-clang-diagnostic-unknown-warning-option,
### Reasons for exclusions
## Generally not applicable
# abseil we don't use the abseil library
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/mamba/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ runs:
with:
python-version: "3.11"

- name: Install prerequisites for pystack
run: sudo apt-get install --no-install-recommends -qy libdw-dev libelf-dev
- name: Install prerequisites
run: sudo apt-get install --no-install-recommends -qy libdw-dev libelf-dev libsqlite3-dev
shell: bash

- name: Set cache date
Expand Down
210 changes: 187 additions & 23 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pre-commit-checks:
name: Pre-commit Checks
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout branch
uses: actions/checkout@v4
Expand All @@ -28,7 +28,7 @@ jobs:

mypy-typechecking:
name: Mypy Type Checks
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 20
defaults:
run:
Expand All @@ -52,7 +52,7 @@ jobs:

pylint:
timeout-minutes: 20
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out code
Expand All @@ -68,7 +68,7 @@ jobs:

unittests:
timeout-minutes: 25
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out code
Expand All @@ -90,7 +90,7 @@ jobs:

format:
timeout-minutes: 20
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand All @@ -102,7 +102,7 @@ jobs:

tidy:
timeout-minutes: 60
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
CLANG_TIDY: clang-tidy-15
RUN_CLANG_TIDY: run-clang-tidy-15
Expand All @@ -113,7 +113,7 @@ jobs:
- name: Install clang-tidy
run: |
sudo apt update
sudo apt install -y clang-tidy-15
sudo apt install -y clang-tidy-15 libsqlite3-dev
cmake --version

- name: Configure CMake
Expand All @@ -126,7 +126,7 @@ jobs:

cpp_build_and_test:
name: Build + Test (C++)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 60
outputs:
line-coverage: ${{steps.run_test_with_coverage.outputs.LINE_COVERAGE}}
Expand All @@ -147,10 +147,6 @@ jobs:
build-type: Tsan
- compiler: { c: clang, cxx: clang++, version: 14 }
build-type: Asan
exclude:
# gcc-12 causes a false-positive memory error in release (https://github.com/google/googletest/issues/4108)
- compiler: { c: gcc, cxx: g++, version: 12 }
build-type: Release

env:
CC: ${{matrix.compiler.c}}-${{matrix.compiler.version}}
Expand All @@ -160,14 +156,14 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install ccache
- name: Install ccache and sqlite
run: |
sudo apt update
sudo apt install -y ccache
sudo apt install -y ccache libsqlite3-dev

- name: Install clang version
if: ${{ matrix.compiler.version > 14 }}
uses: KyleMayes/install-llvm-action@v1
if: ${{ matrix.compiler.c == 'clang' && matrix.compiler.version > 14 }}
uses: KyleMayes/install-llvm-action@v2.0.5
with:
version: ${{ matrix.compiler.version }}.0
env: true
Expand Down Expand Up @@ -227,7 +223,7 @@ jobs:

cpp_coverage_main:
name: C++ Test Coverage (gets coverage of main branch, currently not main branch because no C++ on main)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
CC: clang-17
Expand Down Expand Up @@ -278,7 +274,7 @@ jobs:

cpp_comment_on_pr:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Comment Coverage Results
needs: [cpp_build_and_test, cpp_coverage_main]
timeout-minutes: 5
Expand All @@ -303,7 +299,7 @@ jobs:
# Checks whether the base container works correctly.
dockerized-unittests:
timeout-minutes: 180
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- pre-commit-checks
- mypy-typechecking
Expand All @@ -325,7 +321,7 @@ jobs:

integrationtests-debug:
timeout-minutes: 180
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- pre-commit-checks
- mypy-typechecking
Expand All @@ -337,12 +333,54 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Check disk space 1
run: df . -h

- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"

- name: Check disk space 2
run: df . -h

- name: Get more space
run: |
sudo rm -rf ${GITHUB_WORKSPACE}/.git

- name: Check disk space 3
run: df . -h

- name: Start docker compose and exit when tests run through
run: bash scripts/run_integrationtests.sh Debug

integrationtests-asan:
timeout-minutes: 180
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- pre-commit-checks
- mypy-typechecking
Expand All @@ -353,12 +391,54 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Check disk space 1
run: df . -h

- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"

- name: Check disk space 2
run: df . -h

- name: Get more space
run: |
sudo rm -rf ${GITHUB_WORKSPACE}/.git

- name: Check disk space 3
run: df . -h

- name: Start docker compose and exit when tests run through
run: bash scripts/run_integrationtests.sh Asan

integrationtests-tsan:
timeout-minutes: 180
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- pre-commit-checks
- mypy-typechecking
Expand All @@ -370,12 +450,54 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Check disk space 1
run: df . -h

- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"

- name: Check disk space 2
run: df . -h

- name: Get more space
run: |
sudo rm -rf ${GITHUB_WORKSPACE}/.git

- name: Check disk space 3
run: df . -h

- name: Start docker compose and exit when tests run through
run: bash scripts/run_integrationtests.sh Tsan

integrationtests-release:
timeout-minutes: 180
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- pre-commit-checks
- mypy-typechecking
Expand All @@ -387,5 +509,47 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Check disk space 1
run: df . -h

- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"

- name: Check disk space 2
run: df . -h

- name: Get more space
run: |
sudo rm -rf ${GITHUB_WORKSPACE}/.git

- name: Check disk space 3
run: df . -h

- name: Start docker compose and exit when tests run through
run: bash scripts/run_integrationtests.sh Release
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Without this, we get compilation errors for the chrono header. We need to set this globally
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++20")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")

elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
list(APPEND MODYN_COMPILE_OPTIONS "-Wno-missing-requires" "-Wno-unknown-warning-option") # causes issues since gcc 12 and grpc 1.69
endif()



if (${MODYN_TEST_COVERAGE})
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "Running with coverage flags")
Expand Down
Loading
Loading