]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use working-directory property for run actions instead of changing directory.
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 19 Jun 2022 20:19:53 +0000 (13:19 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 15 Aug 2022 14:41:52 +0000 (16:41 +0200)
.github/workflows/cmake.yml
.github/workflows/configure.yml
.github/workflows/libpng.yml
.github/workflows/pigz.yml
.github/workflows/release.yml

index dcdfee240b1c2b80cd68203b2c66cfd5b60cd587..b10a5911e3de88e616030da777e42ca1342c9304 100644 (file)
@@ -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
index 420172efd98475e5255968ef90bfbb7dbeaa5aa3..2071618fd6d959480372472eff2ab5959dee6303 100644 (file)
@@ -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
index f25f16865db53ac14803023e502cc35f06c2f461..13326b3953f17b6bc13d326e0cd6284d42837d28 100644 (file)
@@ -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
index 82dc7c67695f9ba0a5b89b46ec3882d0a16e73ff..afec6e3eedc1bb6b557a93a87f339c5fbdd877b9 100644 (file)
@@ -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
index 63649fda4b28f4344a6aecd853a39ced9dc14bd0..163caa08e2c0894d6299d4f5f105e7e7d9ce4d91 100644 (file)
@@ -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