From: Nathan Moinvaziri Date: Sun, 19 Jun 2022 20:19:53 +0000 (-0700) Subject: Use working-directory property for run actions instead of changing directory. X-Git-Tag: 2.1.0-beta1~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a0b3bf09bfa66f94fcc49c8f4f90ad9cff2fd21;p=thirdparty%2Fzlib-ng.git Use working-directory property for run actions instead of changing directory. --- diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index dcdfee240..b10a5911e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -468,16 +468,13 @@ jobs: CI: true - name: Compile source code - run: | - cd ${{ matrix.build-dir || '.' }} - cmake --build . --config ${{ matrix.build-config || 'Release' }} + run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }} - name: Run test cases # Don't run tests on Windows ARM if: runner.os != 'Windows' || contains(matrix.name, 'ARM') == false - run: | - cd ${{ matrix.build-dir || '.' }} - ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '6' }} + run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '6' }} + working-directory: ${{ matrix.build-dir || '.' }} env: ASAN_OPTIONS: ${{ matrix.asan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1 MSAN_OPTIONS: ${{ matrix.msan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1 diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index 420172efd..2071618fd 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -214,14 +214,12 @@ jobs: CI: true - name: Compile source code - run: | - cd ${{ matrix.build-dir || '.' }} - make -j2 + run: make -j2 + working-directory: ${{ matrix.build-dir }} - name: Run test cases - run: | - cd ${{ matrix.build-dir || '.' }} - make test + run: make test + working-directory: ${{ matrix.build-dir }} env: QEMU_RUN: ${{ matrix.qemu-run }} ASAN_OPTIONS: abort_on_error=1:halt_on_error=1 diff --git a/.github/workflows/libpng.yml b/.github/workflows/libpng.yml index f25f16865..13326b395 100644 --- a/.github/workflows/libpng.yml +++ b/.github/workflows/libpng.yml @@ -26,19 +26,16 @@ jobs: path: libpng - name: Generate project files (libpng) - run: | - cd libpng - cmake . -DCMAKE_BUILD_TYPE=Release -DPNG_TESTS=ON -DPNG_STATIC=OFF -DZLIB_INCLUDE_DIR=.. -DZLIB_LIBRARY=$PWD/../libz.a + run: cmake . -DCMAKE_BUILD_TYPE=Release -DPNG_TESTS=ON -DPNG_STATIC=OFF -DZLIB_INCLUDE_DIR=.. -DZLIB_LIBRARY=$PWD/../libz.a + working-directory: libpng env: CC: clang CI: true - name: Compile source code (libpng) - run: | - cd libpng - cmake --build . --config Release + run: cmake --build . --config Release + working-directory: libpng - name: Run test cases (libpng) - run: | - cd libpng - ctest -C Release --output-on-failure --max-width 120 + run: ctest -C Release --output-on-failure --max-width 120 + working-directory: libpng diff --git a/.github/workflows/pigz.yml b/.github/workflows/pigz.yml index 82dc7c676..afec6e3ee 100644 --- a/.github/workflows/pigz.yml +++ b/.github/workflows/pigz.yml @@ -66,9 +66,8 @@ jobs: sudo apt-get install -y ${{ matrix.packages }} - name: Generate project files - run: | - cd test/pigz - cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} -DBUILD_SHARED_LIBS=OFF -DZLIB_ROOT=../.. -DWITH_CODE_COVERAGE=ON -DWITH_MAINTAINER_WARNINGS=ON + run: cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} -DBUILD_SHARED_LIBS=OFF -DZLIB_ROOT=../.. -DWITH_CODE_COVERAGE=ON -DWITH_MAINTAINER_WARNINGS=ON + working-directory: test/pigz env: CC: ${{ matrix.compiler }} CFLAGS: ${{ matrix.cflags }} @@ -76,14 +75,12 @@ jobs: CI: true - name: Compile source code - run: | - cd test/pigz - cmake --build . --config ${{ matrix.build-config || 'Release' }} + run: cmake --build . --config ${{ matrix.build-config || 'Release' }} + working-directory: test/pigz - name: Run test cases - run: | - cd test/pigz - ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '2' }} + run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '2' }} + working-directory: test/pigz - name: Generate coverage report if: matrix.codecov diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63649fda4..163caa08e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,9 +79,8 @@ jobs: - name: Package release (Windows) if: runner.os == 'Windows' - run: | - cd out - 7z a -tzip ../zlib-ng-${{ matrix.deploy-name }}.zip bin include lib ../LICENSE.md ../PORTING.md ../README.md + run: 7z a -tzip ../zlib-ng-${{ matrix.deploy-name }}.zip bin include lib ../LICENSE.md ../PORTING.md ../README.md + working-directory: out - name: Upload release (Windows) uses: svenstaro/upload-release-action@v1-release