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

CI: use latest versions of operating systems and actions. #4010

Merged
merged 1 commit into from
Nov 9, 2024
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
4 changes: 3 additions & 1 deletion .github/bin/run-clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

CLANG_FORMAT="${CLANG_FORMAT:-clang-format}"

FORMAT_OUT=${TMPDIR:-/tmp}/clang-format-diff.out

# Run on all c++ files.
find include src -name "*.h" -o -name "*.cpp" | xargs clang-format --style=Google -i
find src include -name "*.h" -o -name "*.cpp" | xargs ${CLANG_FORMAT} --style=Google -i

# Check if we got any diff, then print it out in in the CI.
# TODO: make these suggested diffs in the pull request.
Expand Down
1 change: 1 addition & 0 deletions .github/bin/run-clang-tidy-cached.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ struct ConfigValues {
static constexpr ConfigValues kConfig = {
.start_dir = ".",
.file_include_re = "^(src|include)",
.file_exclude_re = "\\.template\\.",
// Not clean yet, don't revisit yet.
.revisit_brokenfiles_if_build_config_newer = false,
};
Expand Down
14 changes: 3 additions & 11 deletions .github/bin/run-clang-tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,13 @@
# It caches the results, so is much faster, but doesn't have the
# concept of the 'limited' clang-tidy.

# Exact binary can be set with environment variable if needed.
CLANG_TIDY="${CLANG_TIDY:-clang-tidy}"

LOCAL_TMP=${TMPDIR:-/tmp}

TIDY_OUT=${LOCAL_TMP}/clang-tidy-surelog.out

# Default clang-tidy, but if they are only available in versioned form,
# use them. Configuration below is tested with 12, so using that is our
# preferred version.
CLANG_TIDY=clang-tidy
for version in 12 13 14 11 ; do
if command -v clang-tidy-${version}; then
CLANG_TIDY=clang-tidy-${version}
break
fi
done

hash ${CLANG_TIDY} || exit 2 # make sure it is installed.

if [ "$1" == "limited" ]; then
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/logs_on_demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# Linux build, test, and publish
linux-install:
name: "Linux | Install | ${{ matrix.compiler }} | ${{ matrix.config }} | ${{ matrix.vendored_dependencies }}"
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -27,14 +27,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
if: ${{ matrix.vendored_dependencies }}

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ !matrix.vendored_dependencies }}

# Fetch tags for CMakeLists version check
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
pushd build && ctest --output-on-failure && popd

rm -rf build # make sure we only see installation artifacts

# this shouldnt be necessary, and can't be reproduced outside CI
export CMAKE_PREFIX_PATH=$INSTALL_DIR

Expand All @@ -132,7 +132,7 @@ jobs:
if: ${{ matrix.vendored_dependencies }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact-name }}
path: artifacts/${{ env.artifact-name }}.tar.gz
Expand All @@ -142,7 +142,7 @@ jobs:
# Linux regression
linux-regression:
name: "Linux | Regression | ${{ matrix.compiler }} | ${{ matrix.config }} [${{ matrix.shard }}]"
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: linux-install
strategy:
fail-fast: false
Expand All @@ -164,7 +164,7 @@ jobs:
sudo apt install -y google-perftools libgoogle-perftools-dev

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: x64
Expand All @@ -175,13 +175,13 @@ jobs:
pip3 install psutil

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.build-artifact-name }}

Expand Down Expand Up @@ -209,25 +209,25 @@ jobs:

- name: Upload regression artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.regression-artifact-name }}
path: build/${{ env.regression-artifact-name }}.tar.gz


# Code formatting
CodeFormatting:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Dependencies
run: |
sudo apt-get install clang-format
sudo apt-get install clang-format-18
clang-format --version

- name: Run formatting style check
Expand All @@ -236,18 +236,18 @@ jobs:

# Code Tideness
ClangTidy:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt -qq -y install clang-tidy-12 \
sudo apt -qq -y install clang-tidy-18 \
g++-9 default-jre cmake \
uuid-dev build-essential

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: x64
Expand All @@ -258,7 +258,7 @@ jobs:
pip3 install psutil

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
Expand Down
Loading
Loading