Skip to content

Commit f4b9a08

Browse files
authored
Merge pull request #352 from LebedevRI/ci
Try to freshen up CI compiler versions
2 parents 1dd5114 + 5a45eb4 commit f4b9a08

File tree

8 files changed

+163
-28
lines changed

8 files changed

+163
-28
lines changed

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Checks: '*,-clang-analyzer-*,-clang-diagnostic-*,-cert-dcl50-cpp,-cert-env33-c,-cert-err58-cpp,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-google-default-arguments,-google-readability-todo,-hicpp-member-init,-hicpp-special-member-functions,-llvm-header-guard,-llvm-include-order,-misc-unused-parameters,-readability-implicit-bool-cast,-readability-inconsistent-declaration-parameter-name,-android-*,-hicpp-braces-around-statements,-hicpp-function-size,-google-readability-braces-around-statements,-google-readability-function-size,-readability-implicit-bool-conversion,-hicpp-signed-bitwise,-hicpp-no-array-decay,-hicpp-vararg,-hicpp-multiway-paths-covered,-cppcoreguidelines-owning-memory,-fuchsia-*,-llvmlibc-*,-portability-simd-intrinsics,-bugprone-narrowing-conversions,-cppcoreguidelines-narrowing-conversions,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-non-private-member-variables-in-classes,-modernize-use-trailing-return-type,-cppcoreguidelines-init-variables,-bugprone-signed-char-misuse,-cert-str34-c,-cert-dcl37-c,-cert-dcl51-cpp,-misc-no-recursion,-cppcoreguidelines-avoid-non-const-global-variables,-abseil-string-find-str-contains,-altera-struct-pack-align,-google-runtime-references,-altera-unroll-loops,-altera-id-dependent-backward-branch,-bugprone-implicit-widening-of-multiplication-result,-bugprone-easily-swappable-parameters'
2+
Checks: '*,-clang-analyzer-*,-clang-diagnostic-*,-cert-dcl50-cpp,-cert-env33-c,-cert-err58-cpp,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-google-default-arguments,-google-readability-todo,-hicpp-member-init,-hicpp-special-member-functions,-llvm-header-guard,-llvm-include-order,-misc-unused-parameters,-readability-implicit-bool-cast,-readability-inconsistent-declaration-parameter-name,-android-*,-hicpp-braces-around-statements,-hicpp-function-size,-google-readability-braces-around-statements,-google-readability-function-size,-readability-implicit-bool-conversion,-hicpp-signed-bitwise,-hicpp-no-array-decay,-hicpp-vararg,-hicpp-multiway-paths-covered,-cppcoreguidelines-owning-memory,-fuchsia-*,-llvmlibc-*,-portability-simd-intrinsics,-bugprone-narrowing-conversions,-cppcoreguidelines-narrowing-conversions,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-non-private-member-variables-in-classes,-modernize-use-trailing-return-type,-cppcoreguidelines-init-variables,-bugprone-signed-char-misuse,-cert-str34-c,-cert-dcl37-c,-cert-dcl51-cpp,-misc-no-recursion,-cppcoreguidelines-avoid-non-const-global-variables,-abseil-string-find-str-contains,-altera-struct-pack-align,-google-runtime-references,-altera-unroll-loops,-altera-id-dependent-backward-branch,-bugprone-implicit-widening-of-multiplication-result,-bugprone-easily-swappable-parameters,-readability-identifier-length,-cert-err33-c,-google-readability-casting,-readability-container-data-pointer,-bugprone-exception-escape,-openmp-exception-escape,-modernize-use-default-member-init,-misc-unused-using-decls'
33
WarningsAsErrors: '*'
44
HeaderFilterRegex: '.*'
55
AnalyzeTemporaryDtors: false

.github/workflows/ci-code-coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
os: [ linux ]
2020
compiler:
21-
- { compiler: GNU11, CC: gcc-11, CXX: g++-11, GCOV: gcov-11 }
21+
- { compiler: GNU12, CC: gcc-12, CXX: g++-12, GCOV: gcov-12 }
2222
flavor: [ Coverage ]
2323
container: debian:unstable-slim
2424
steps:
@@ -43,9 +43,9 @@ jobs:
4343
apt-get upgrade;
4444
apt-get install ca-certificates \
4545
cmake \
46-
g++-11 \
46+
g++-12 \
4747
gcc \
48-
gcc-11 \
48+
gcc-12 \
4949
git \
5050
googletest \
5151
libjpeg-dev \

.github/workflows/ci-fast.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
matrix:
1818
os: [ linux ]
1919
compiler:
20-
- { compiler: GNU11, CC: gcc-11, CXX: g++-11 }
21-
- { compiler: LLVM13, CC: clang-13, CXX: clang++-13 }
20+
- { compiler: GNU12, CC: gcc-12, CXX: g++-12 }
21+
- { compiler: LLVM14, CC: clang-14, CXX: clang++-14 }
2222
flavor: [ RelWithDebInfo, Release ]
2323
container: debian:unstable-slim
2424
steps:
@@ -42,15 +42,15 @@ jobs:
4242
apt-get update;
4343
apt-get upgrade;
4444
apt-get install ca-certificates \
45-
clang++-13 \
45+
clang++-14 \
4646
cmake \
47-
g++-11 \
47+
g++-12 \
4848
gcc \
49-
gcc-11 \
49+
gcc-12 \
5050
git \
5151
googletest \
5252
libjpeg-dev \
53-
libomp-13-dev \
53+
libomp-14-dev \
5454
libpugixml-dev \
5555
libxml2-utils \
5656
make \
@@ -134,8 +134,8 @@ jobs:
134134
fail-fast: false
135135
matrix:
136136
os: [ macos-11 ]
137-
xcode: [ 12.5.1 ] # LLVM11
138-
deployment_target: [ 12.5.1, 10.7 ]
137+
xcode: [ 13.2.1 ] # LLVM12
138+
deployment_target: [ 13.2.1, 10.7 ]
139139
compiler:
140140
- { compiler: XCode, CC: cc, CXX: c++ }
141141
flavor: [ RelWithDebInfo, Release ]

.github/workflows/ci-linux-gcc-legacy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,68 @@ jobs:
7272
cmake -E make_directory "${BUILD_DIR}";
7373
cmake -E make_directory "${INSTALL_PREFIX}";
7474
"${SRC_DIR}/.ci/ci-script.sh";
75+
linux-gcc11:
76+
name: ${{ matrix.os }}.${{ matrix.compiler.compiler }}.${{ matrix.flavor }}
77+
runs-on: ubuntu-latest
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
os: [ linux ]
82+
compiler:
83+
- { compiler: GNU11, CC: gcc-11, CXX: g++-11 }
84+
flavor: [ RelWithDebInfo, Release ]
85+
container: debian:unstable-slim
86+
steps:
87+
- name: Configure APT
88+
env:
89+
DEBIAN_FRONTEND: noninteractive
90+
run: |
91+
# Paper over occasional network flakiness of some mirrors.
92+
echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/90retry
93+
# Do not install recommended packages
94+
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/90recommends
95+
# Do not install suggested packages
96+
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/90suggests
97+
# Assume yes
98+
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90forceyes
99+
# Fix broken packages
100+
echo 'APT::Get::Fix-Missing "true";' > /etc/apt/apt.conf.d/90fixmissing
101+
- name: Install/Update necessary packages
102+
run: |
103+
rm -rf /var/lib/apt/lists/*;
104+
apt-get update;
105+
apt-get upgrade;
106+
apt-get install ca-certificates \
107+
cmake \
108+
g++-11 \
109+
gcc \
110+
gcc-11 \
111+
git \
112+
googletest \
113+
libjpeg-dev \
114+
libpugixml-dev \
115+
libxml2-utils \
116+
make \
117+
ninja-build \
118+
zlib1g-dev;
119+
apt-get clean;
120+
dpkg-divert --add --rename --divert /usr/bin/ld.original /usr/bin/ld;
121+
ln -s /usr/bin/ld.gold /usr/bin/ld;
122+
- uses: actions/checkout@v2
123+
name: Fetch/Checkout RawSpeed git repo
124+
with:
125+
path: ''
126+
- name: Build And Test
127+
env:
128+
CC: ${{ matrix.compiler.CC }}
129+
CXX: ${{ matrix.compiler.CXX }}
130+
SRC_DIR: ${{ github.workspace }}
131+
BUILD_DIR: ${{ github.workspace }}/../rawspeed-build
132+
INSTALL_PREFIX: ${{ github.workspace }}/../rawspeed-install
133+
ECO: -DALLOW_DOWNLOADING_GOOGLETEST=ON
134+
FLAVOR: ${{ matrix.flavor }}
135+
TARGET: build
136+
run: |
137+
cmake -E make_directory "${BUILD_DIR}";
138+
cmake -E make_directory "${INSTALL_PREFIX}";
139+
"${SRC_DIR}/.ci/ci-script.sh";

.github/workflows/ci-linux-llvm-legacy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,67 @@ jobs:
135135
cmake -E make_directory "${BUILD_DIR}";
136136
cmake -E make_directory "${INSTALL_PREFIX}";
137137
"${SRC_DIR}/.ci/ci-script.sh";
138+
linux-llvm13:
139+
name: ${{ matrix.os }}.${{ matrix.compiler.compiler }}.${{ matrix.flavor }}
140+
runs-on: ubuntu-latest
141+
strategy:
142+
fail-fast: false
143+
matrix:
144+
os: [ linux ]
145+
compiler:
146+
- { compiler: LLVM13, CC: clang-13, CXX: clang++-13 }
147+
flavor: [ RelWithDebInfo, Release ]
148+
container: debian:unstable-slim
149+
steps:
150+
- name: Configure APT
151+
env:
152+
DEBIAN_FRONTEND: noninteractive
153+
run: |
154+
# Paper over occasional network flakiness of some mirrors.
155+
echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80retry
156+
# Do not install recommended packages
157+
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/80recommends
158+
# Do not install suggested packages
159+
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/80suggests
160+
# Assume yes
161+
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/80forceyes
162+
# Fix broken packages
163+
echo 'APT::Get::Fix-Missing "true";' > /etc/apt/apt.conf.d/80fixmissing
164+
- name: Install/Update necessary packages
165+
run: |
166+
rm -rf /var/lib/apt/lists/*;
167+
apt-get update;
168+
apt-get upgrade;
169+
apt-get install ca-certificates \
170+
clang-13 \
171+
cmake \
172+
git \
173+
googletest \
174+
libjpeg-dev \
175+
libomp-13-dev \
176+
libpugixml-dev \
177+
libxml2-utils \
178+
make \
179+
ninja-build \
180+
zlib1g-dev;
181+
apt-get clean;
182+
dpkg-divert --add --rename --divert /usr/bin/ld.original /usr/bin/ld;
183+
ln -s /usr/bin/ld.gold /usr/bin/ld;
184+
- uses: actions/checkout@v2
185+
name: Fetch/Checkout RawSpeed git repo
186+
with:
187+
path: ''
188+
- name: Build And Test
189+
env:
190+
CC: ${{ matrix.compiler.CC }}
191+
CXX: ${{ matrix.compiler.CXX }}
192+
SRC_DIR: ${{ github.workspace }}
193+
BUILD_DIR: ${{ github.workspace }}/../rawspeed-build
194+
INSTALL_PREFIX: ${{ github.workspace }}/../rawspeed-install
195+
ECO: -DALLOW_DOWNLOADING_GOOGLETEST=ON
196+
FLAVOR: ${{ matrix.flavor }}
197+
TARGET: build
198+
run: |
199+
cmake -E make_directory "${BUILD_DIR}";
200+
cmake -E make_directory "${INSTALL_PREFIX}";
201+
"${SRC_DIR}/.ci/ci-script.sh";

.github/workflows/ci-macos-xcode-legacy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [ macos-10.15 ]
17-
xcode: [ 12.4 ]
18-
# LLVM10
16+
os: [ macos-11 ]
17+
xcode: [ 12.4, 12.5.1 ]
18+
# LLVM10 LLVM11
1919
compiler:
2020
- { compiler: XCode, CC: cc, CXX: c++ }
2121
flavor: [ RelWithDebInfo, Release ]

.github/workflows/ci-static-analysis.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
matrix:
1818
os: [ linux ]
1919
compiler:
20-
- { compiler: LLVM13, CC: clang-13, CXX: clang++-13, CLANG_TIDY: clang-tidy-13 }
21-
flavor: [ ClangStaticAnalysis, CodeQLAnalysis, SonarCloudStaticAnalysis ]
20+
- { compiler: LLVM14, CC: clang-14, CXX: clang++-14, CLANG_TIDY: clang-tidy-14 }
21+
flavor: [ ClangTidy, ClangStaticAnalysis, CodeQLAnalysis, SonarCloudStaticAnalysis ]
2222
container: debian:unstable-slim
2323
steps:
2424
- name: Configure APT
@@ -41,14 +41,14 @@ jobs:
4141
apt-get update;
4242
apt-get upgrade;
4343
apt-get install ca-certificates \
44-
clang++-13 \
45-
clang-tidy-13 \
46-
clang-tools-13 \
44+
clang++-14 \
45+
clang-tidy-14 \
46+
clang-tools-14 \
4747
cmake \
4848
git \
4949
googletest \
5050
libjpeg-dev \
51-
libomp-13-dev \
51+
libomp-14-dev \
5252
libpugixml-dev \
5353
libxml2-utils \
5454
make \
@@ -57,8 +57,12 @@ jobs:
5757
apt-get clean;
5858
dpkg-divert --add --rename --divert /usr/bin/ld.original /usr/bin/ld;
5959
ln -s /usr/bin/ld.gold /usr/bin/ld;
60-
ln -s /usr/bin/clang-13 /usr/local/bin/clang;
61-
ln -s /usr/bin/clang++-13 /usr/local/bin/clang++;
60+
ln -s /usr/bin/clang-14 /usr/local/bin/clang;
61+
ln -s /usr/bin/clang++-14 /usr/local/bin/clang++;
62+
ln -s /usr/local/bin/clang /usr/local/bin/gcc;
63+
ln -s /usr/local/bin/clang++ /usr/local/bin/g++;
64+
ln -s /usr/local/bin/clang /usr/local/bin/x86_64-linux-gnu-gcc;
65+
ln -s /usr/local/bin/clang++ /usr/local/bin/x86_64-linux-gnu-g++;
6266
- uses: actions/checkout@v2
6367
name: Fetch/Checkout RawSpeed git repo
6468
with:
@@ -86,7 +90,7 @@ jobs:
8690
apt-get install curl \
8791
libxml2-dev \
8892
libxslt1-dev \
89-
python-pip-whl \
93+
python3-pip-whl \
9094
python3-dev \
9195
python3-lxml \
9296
python3-portalocker \
@@ -106,12 +110,12 @@ jobs:
106110
uses: github/codeql-action/init@v1
107111
with:
108112
languages: cpp
109-
- if: matrix.flavor == 'SonarCloudStaticAnalysis'
113+
- if: matrix.flavor == 'SonarCloudStaticAnalysis' && github.repository == 'darktable-org/rawspeed' && github.event_name != 'pull_request' && github.ref_type == 'branch' && github.ref_name == 'develop'
110114
name: Set up JDK 11 (for SonarCloud static analysis)
111115
uses: actions/setup-java@v1
112116
with:
113117
java-version: 11
114-
- if: matrix.flavor == 'SonarCloudStaticAnalysis'
118+
- if: matrix.flavor == 'SonarCloudStaticAnalysis' && github.repository == 'darktable-org/rawspeed' && github.event_name != 'pull_request' && github.ref_type == 'branch' && github.ref_name == 'develop'
115119
name: Download and set up sonar-scanner (for SonarCloud static analysis)
116120
env:
117121
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
@@ -129,14 +133,15 @@ jobs:
129133
CC: ${{ matrix.compiler.CC }}
130134
CXX: ${{ matrix.compiler.CXX }}
131135
CLANG_TIDY: ${{ matrix.compiler.CLANG_TIDY }}
136+
USE_CLANG_TIDY: ${{ matrix.flavor == 'ClangTidy' }}
132137
SRC_DIR: ${{ github.workspace }}
133138
BUILD_DIR: ${{ github.workspace }}/../rawspeed-build
134139
INSTALL_PREFIX: ${{ github.workspace }}/../rawspeed-install
135140
ECO: -DALLOW_DOWNLOADING_GOOGLETEST=ON
136141
FLAVOR: ${{ matrix.flavor }}
137142
TARGET: build
138143
run: |
139-
export ECO="${ECO} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_CLANG_TIDY=ON -DCMAKE_C_FLAGS_RELWITHDEBINFO=-UNDEBUG -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-UNDEBUG";
144+
export ECO="${ECO} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_CLANG_TIDY=${USE_CLANG_TIDY} -DCMAKE_C_FLAGS_RELWITHDEBINFO=-UNDEBUG -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-UNDEBUG";
140145
cmake -E make_directory "${BUILD_DIR}";
141146
cmake -E make_directory "${INSTALL_PREFIX}";
142147
"${SRC_DIR}/.ci/ci-script.sh";
@@ -154,7 +159,7 @@ jobs:
154159
- if: matrix.flavor == 'CodeQLAnalysis'
155160
name: Perform CodeQL static analysis
156161
uses: github/codeql-action/analyze@v1
157-
- if: matrix.flavor == 'SonarCloudStaticAnalysis'
162+
- if: matrix.flavor == 'SonarCloudStaticAnalysis' && github.repository == 'darktable-org/rawspeed' && github.event_name != 'pull_request' && github.ref_type == 'branch' && github.ref_name == 'develop'
158163
name: Perform SonarCloud static analysis
159164
env:
160165
SONAR_SERVER_URL: "https://sonarcloud.io"

src/librawspeed/decompressors/HuffmanTableTree.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class HuffmanTableTree final : public AbstractHuffmanTable {
5858
// Read one more bit
5959
const bool bit = bs.getBitsNoFill(1);
6060

61+
// codechecker_false_positive [core.uninitialized.Assign]
6162
partial.code <<= 1;
6263
partial.code |= bit;
6364

0 commit comments

Comments
 (0)