Skip to content

Commit 4089e41

Browse files
committed
ci: improve all ci's
compress statements, that need cd's , so that they are not done multiple times compress multiple statements, that are only different in one word, use conditions for that
1 parent eb08165 commit 4089e41

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,11 @@ jobs:
183183
choco install pkgconfiglite
184184
echo "PKG_CONFIG_PATH=C:/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
185185
186-
- name: Configure OOPetris
186+
- name: Build and Install OOPetris
187187
run: |
188188
cd oopetris
189189
meson setup build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Donly_build_libs=true ${{ matrix.config.os == 'windows' && '-Db_vscrt=from_buildtype' || '' }} ${{ (matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )) && '-Dprefix=$RUNNER_TEMP/msys64${MINGW_PREFIX}/' || ''}}
190-
191-
- name: Build and install Libs
192-
if: matrix.config.os != 'ubuntu'
193-
run: |
194-
cd oopetris
195-
meson install -C build
196-
197-
- name: Build and install Libs (Linux)
198-
if: matrix.config.os == 'ubuntu'
199-
run: |
200-
cd oopetris
201-
sudo meson install -C build
190+
${{ matrix.config.os == 'ubuntu' && 'sudo' || '' }} meson install -C build
202191
203192
- name: Build Wrapper
204193
run: |

.github/workflows/test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,10 @@ jobs:
4343
sudo apt-get update
4444
sudo apt-get install ninja-build valgrind gcovr libcriterion-dev libreadline-dev -y --no-install-recommends
4545
46-
- name: Configure OOPetris
46+
- name: Build and Install OOPetris
4747
run: |
4848
cd oopetris
4949
meson setup build -Db_coverage=true -Dbuildtype=debugoptimized -Ddefault_library=shared -Dclang_libcpp=enabled -Donly_build_libs=true -Dprefix=/usr
50-
51-
- name: Build and install Libs
52-
run: |
53-
cd oopetris
5450
sudo meson install -C build
5551
5652
- name: Build Wrapper
@@ -81,7 +77,7 @@ jobs:
8177
./build/meson-logs/coverage.xml
8278
./build/meson-logs/coveragereport/
8379
84-
- name: Test for leaks with valgrind (Linux)
80+
- name: Test for leaks with valgrind
8581
run: |
8682
valgrind --tool=memcheck --leak-check=full --error-exitcode=1 ./build/example/example r ./tests/files/correct.rec
8783
valgrind --tool=memcheck --leak-check=full --error-exitcode=1 cat ./tests/files/example.rec_text | ./build/example/example w ./test.rec

0 commit comments

Comments
 (0)