Skip to content

Commit 76470b3

Browse files
committed
ci: update GitHub Actions worflows
ci: use clang-format-12 (cherry picked from commit 7e1a2d8) ci: replace windows-2016 agent (cherry picked from commit 9e60f81) ci: use actions/checkout@v3 (cherry picked from commit d848720) ci: fix iwyu (cherry picked from commit 47868f9)
1 parent d552d60 commit 76470b3

File tree

6 files changed

+30
-39
lines changed

6 files changed

+30
-39
lines changed

.github/workflows/bazel-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: [macos-latest, ubuntu-20.04, windows-2019]
10+
os: [macos-latest, ubuntu-latest, windows-latest]
1111
steps:
1212
- name: Checkout source
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414

1515
- name: Generate German locale on Ubuntu
1616
if: runner.os == 'Linux'

.github/workflows/cmake-ci.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,13 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [macOS-latest, ubuntu-18.04, windows-2016]
11+
os: [macOS-latest, ubuntu-18.04, windows-2019]
1212
dependencies: [submodule, vcpkg]
1313
steps:
1414
- name: Checkout source
15-
uses: actions/checkout@v2
16-
17-
- name: Checkout submodules
18-
if: matrix.dependencies == 'submodule'
19-
shell: bash
20-
run: |
21-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
22-
git submodule sync --recursive
23-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
15+
uses: actions/checkout@v3
16+
with:
17+
submodules: ${{ matrix.dependencies == 'submodule' }}
2418

2519
- name: Mount vcpkg cache
2620
if: matrix.dependencies == 'vcpkg'
@@ -29,6 +23,10 @@ jobs:
2923
path: "~/.cache/vcpkg/archives"
3024
key: vcpkg-${{ matrix.os }}
3125

26+
- name: Default to x64-windows vcpkg triplet
27+
if: matrix.dependencies == 'vcpkg' && runner.os == 'Windows'
28+
run: echo "VCPKG_DEFAULT_TRIPLET=x64-windows" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
29+
3230
- name: Install vcpkg dependencies
3331
if: matrix.dependencies == 'vcpkg'
3432
run: vcpkg install benchmark civetweb curl[core] gtest zlib

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-20.04
88
steps:
99
- name: Checkout source
10-
uses: actions/checkout@v2
10+
uses: actions/checkout@v3
1111

1212
- name: Mount vcpkg cache
1313
uses: actions/cache@v2

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-20.04
1111
steps:
1212
- name: Checkout source
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414

1515
- name: Install doxygen
1616
run: |

.github/workflows/linting.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,15 @@ jobs:
1111
- name: Install dependencies
1212
run: |
1313
apt-get update
14-
apt-get install -y --no-install-recommends ca-certificates clang-12 cmake git iwyu libbenchmark-dev libcurl4-openssl-dev ninja-build zlib1g-dev
14+
apt-get install -y --no-install-recommends ca-certificates clang-14 cmake git iwyu libbenchmark-dev libcurl4-openssl-dev ninja-build zlib1g-dev
1515
1616
- name: Checkout source
17-
uses: actions/checkout@v2
18-
19-
- name: Checkout submodules
20-
shell: bash
21-
run: |
22-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
23-
git submodule sync --recursive
24-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
17+
uses: actions/checkout@v3
18+
with:
19+
submodules: true
2520

2621
- name: "CMake Configure"
27-
run: cmake -GNinja -DRUN_IWYU=ON -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -S ${GITHUB_WORKSPACE} -B ${GITHUB_WORKSPACE}/_build
22+
run: cmake -GNinja -DRUN_IWYU=ON -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -S ${GITHUB_WORKSPACE} -B ${GITHUB_WORKSPACE}/_build
2823

2924
- name: Build
3025
run: cmake --build ${GITHUB_WORKSPACE}/_build 2>&1 | tee ${GITHUB_WORKSPACE}/output.txt
@@ -43,16 +38,18 @@ jobs:
4338
runs-on: ubuntu-20.04
4439
steps:
4540
- name: Checkout source
46-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
4742

48-
- name: Install dependencies
49-
run: |
50-
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
51-
sudo apt-get update
52-
sudo apt-get install -y clang-format-11
43+
# clang-format comes pre-installed
44+
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
45+
#- name: Install dependencies
46+
# run: |
47+
# sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
48+
# sudo apt-get update
49+
# sudo apt-get install -y clang-format-12
5350

5451
- name: Run clang-format
55-
run: find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' -o -name '*.o' -o -name '*.h' -o -name '*.hpp' -o -name '*.hxx' \) -exec clang-format-11 -style=file -i {} \;
52+
run: find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' -o -name '*.o' -o -name '*.h' -o -name '*.hpp' -o -name '*.hxx' \) -exec clang-format-12 -style=file -i {} \;
5653

5754
- name: Check for changes
5855
run: git diff --exit-code

.github/workflows/release.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v2
14-
15-
- name: Checkout submodules
16-
shell: bash
17-
run: |
18-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
19-
git submodule sync --recursive
20-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
13+
uses: actions/checkout@v3
14+
with:
15+
persist-credentials: false
16+
submodules: true
2117

2218
- name: Create tarball including submodules
2319
shell: bash

0 commit comments

Comments
 (0)