49
49
- name : Install dependencies (Linux)
50
50
if : startsWith(matrix.os, 'ubuntu')
51
51
run : |
52
- COMMON_PKGS="libolm-dev ninja-build gnome-keyring g++$GCC_VERSION clang$CLANG_VERSION"
52
+ COMMON_PKGS="libolm-dev ninja-build gnome-keyring rustc cargo g++$GCC_VERSION clang$CLANG_VERSION"
53
53
# See https://github.com/actions/runner-images/issues/9679
54
54
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
55
55
# Add LLVM repo for newer Clang
@@ -123,6 +123,25 @@ jobs:
123
123
cmake -E make_directory ${{ runner.workspace }}/build
124
124
echo "BUILD_PATH=${{ runner.workspace }}/build/libQuotient" >>$GITHUB_ENV
125
125
126
+ - name : Install Rustup using win.rustup.rs
127
+ if : startsWith(matrix.os, 'windows')
128
+ run : |
129
+ # Disable the download progress bar which can cause perf issues
130
+ $ProgressPreference = "SilentlyContinue"
131
+ Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
132
+ .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc
133
+ del rustup-init.exe
134
+ rustup target add x86_64-pc-windows-msvc
135
+ rustup --version
136
+ shell : powershell
137
+
138
+ - name : Install Rustup
139
+ if : startsWith(matrix.os, 'macos')
140
+ run : |
141
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
142
+ sh rustup-init.sh -y --default-toolchain none
143
+ rustup target add "x86_64-apple-darwin"
144
+
126
145
- name : Setup MSVC
127
146
uses : ilammy/msvc-dev-cmd@v1
128
147
if : startsWith(matrix.os, 'windows')
@@ -141,12 +160,12 @@ jobs:
141
160
cmake -S qtkeychain -B qtkeychain/build -DBUILD_WITH_QT6=ON $CMAKE_ARGS
142
161
cmake --build qtkeychain/build --target install
143
162
144
- - name : Build and install Olm
163
+ - name : Build and install Corrosion
145
164
run : |
146
165
cd ..
147
- git clone https://gitlab.matrix.org/matrix-org/olm.git
148
- cmake -S olm -B olm /build $CMAKE_ARGS
149
- cmake --build olm /build --target install
166
+ git clone https://github.com/corrosion-rs/corrosion
167
+ cmake -S corrosion -B corrosion /build $CMAKE_ARGS
168
+ cmake --build corrosion /build --target install
150
169
151
170
- name : Get CS API definitions; clone and build GTAD
152
171
if : matrix.update-api
@@ -172,20 +191,20 @@ jobs:
172
191
173
192
- name : Configure libQuotient
174
193
run : |
175
- cmake -S $GITHUB_WORKSPACE -B $BUILD_PATH $CMAKE_ARGS -DQuotient_INSTALL_TESTS=ON
194
+ cmake -S $GITHUB_WORKSPACE -B build $CMAKE_ARGS -DQuotient_INSTALL_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1
176
195
177
196
- name : Regenerate API code
178
197
if : matrix.update-api
179
- run : cmake --build ../ build/libQuotient --target update-api
198
+ run : cmake --build build --target update-api
180
199
181
200
- name : Build and install libQuotient
201
+ shell : pwsh
182
202
run : |
183
- if [[ '${{ matrix.static-analysis }}' == 'sonar' ]]; then
184
- BUILD_WRAPPER="${{ steps.sonar.outputs.build-wrapper-binary }} --out-dir $BUILD_PATH/sonar"
185
- fi
186
- $BUILD_WRAPPER cmake --build $BUILD_PATH --target all
187
- cmake --build $BUILD_PATH --target install
188
- ls ~/.local$BIN_DIR/quotest
203
+ # if [[ '${{ matrix.static-analysis }}' == 'sonar' ]]; then
204
+ # BUILD_WRAPPER="${{ steps.sonar.outputs.build-wrapper-binary }} --out-dir build/sonar"
205
+ # fi
206
+ cmake --build build --target all
207
+ cmake --build build --target install
189
208
190
209
- name : Run tests
191
210
env :
@@ -195,7 +214,7 @@ jobs:
195
214
QT_LOGGING_RULES : ' quotient.*.debug=true;quotient.jobs.sync.debug=false;quotient.events.ephemeral.debug=false;quotient.events.state.debug=false;quotient.events.members.debug=false'
196
215
QT_MESSAGE_PATTERN : ' %{time h:mm:ss.zzz}|%{category}|%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}|%{message}'
197
216
run : |
198
- CTEST_ARGS="--test-dir $BUILD_PATH --output-on-failure"
217
+ CTEST_ARGS="--test-dir build --output-on-failure"
199
218
if [[ '${{ runner.os }}' != 'Linux' ]]; then
200
219
CTEST_ARGS="$CTEST_ARGS -E testolmaccount"
201
220
else
@@ -219,14 +238,14 @@ jobs:
219
238
SONAR_SERVER_URL : ' https://sonarcloud.io'
220
239
run : |
221
240
mkdir .coverage && pushd .coverage
222
- find $BUILD_PATH -name '*.gcda' -print0 \
241
+ find ../build -name '*.gcda' -print0 \
223
242
| xargs -0 gcov$GCC_VERSION -s $GITHUB_WORKSPACE -pr
224
243
# Coverage of the test source code is not tracked, as it is always 100%
225
244
# (if not, some tests failed and broke the build at an earlier stage)
226
245
rm -f quotest* autotests*
227
246
popd
228
247
${{ steps.sonar.outputs.sonar-scanner-binary }} \
229
248
-Dsonar.host.url="$SONAR_SERVER_URL" \
230
- -Dsonar.cfamily.compile-commands="$BUILD_PATH/sonar /compile_commands.json" \
249
+ -Dsonar.cfamily.compile-commands="build /compile_commands.json" \
231
250
-Dsonar.cfamily.threads=2 \
232
251
-Dsonar.cfamily.gcov.reportsPath=.coverage
0 commit comments