Skip to content

Commit

Permalink
Use apt-spy2 to fix spurious failures on GitHub (ad-freiburg#981)
Browse files Browse the repository at this point in the history
On GitHub actions, Ubuntu's `apt` command is by default configured to always use the Ubuntu mirrors from Microsoft Azure for package installations and update . Every now and then these servers are unreachable or out of sync. During these periods all Ubuntu-based workflows fail, which is rather annoying.
This commit uses `apt-spy2` to first find reachable Ubuntu servers and only then runs `apt update && apt install ...`. This should reduce the probability of spurious check failures dramatically.

This commit also updates `absl` to the current (at the time of the commit) master.
  • Loading branch information
joka921 authored May 19, 2023
1 parent 95d1a34 commit 8998f43
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ jobs:
with:
submodules: "recursive"

- name: Install dependencies
run: sudo apt update && sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
- name: Python dependencies
run: sudo apt-get install python3-yaml unzip pkg-config python3-icu python3-pip
- name: Create build directory
run: mkdir ${{github.workspace}}/build
- name: Install and run conan
working-directory: ${{github.workspace}}/build
run: >
sudo pip3 install "conan==1.58.0";
conan --version;
conan install .. -pr:h ../conanprofiles/clang-libcpp -pr:b ../conanprofiles/clang-libcpp;
- name: Install clang 16
# The sed command fixes a bug in `llvm.sh` in combination with the latest version of
# `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted
Expand All @@ -60,6 +48,21 @@ jobs:
sudo ./llvm.sh 15
sudo apt install clang-15 llvm-15
sudo ./llvm.sh 16 all
- name: Install dependencies
run: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
- name: Python dependencies
run: sudo apt-get install python3-yaml unzip pkg-config python3-icu python3-pip
- name: Create build directory
run: mkdir ${{github.workspace}}/build
- name: Install and run conan
working-directory: ${{github.workspace}}/build
run: >
sudo pip3 install "conan==1.58.0";
conan install .. -pr:h ../conanprofiles/clang-libcpp -pr:b ../conanprofiles/clang-libcpp;
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ jobs:
submodules: 'recursive'

- name: Install dependencies
run: sudo apt update && sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
run: |
sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
- name: Install boost Ubuntu 22.04
run : sudo apt update && sudo apt install -y libboost-all-dev
- name: Install gcc 11
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/upload-sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ jobs:
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v1
- name: Install dependencies
run: sudo apt update && sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
run: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
- name: Install boost Ubuntu 22.04
run : sudo apt update && sudo apt install -y libboost-all-dev
- name: Install clang 16
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ e2e_data/*
# ctags generated tag file
tags
src/tags
/build/
sourcelist
.cache/
.vscode/

/cmake-build*
/localIndices
2 changes: 1 addition & 1 deletion third_party/abseil-cpp
Submodule abseil-cpp updated 368 files

0 comments on commit 8998f43

Please sign in to comment.