| 1 | name: Link |
| 2 | on: [push, pull_request] |
| 3 | jobs: |
| 4 | zlib: |
| 5 | name: Link zlib |
| 6 | runs-on: ubuntu-latest |
| 7 | steps: |
| 8 | - name: Checkout repository |
| 9 | uses: actions/checkout@v3 |
| 10 | |
| 11 | - name: Checkout zlib repository |
| 12 | uses: actions/checkout@v3 |
| 13 | with: |
| 14 | repository: madler/zlib |
| 15 | path: zlib |
| 16 | |
| 17 | - name: Generate project files (zlib) |
| 18 | run: cmake -S zlib -B zlib/build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF |
| 19 | |
| 20 | - name: Compile source code (zlib) |
| 21 | run: cmake --build zlib/build --config Release |
| 22 | |
| 23 | - name: Generate project files (native) |
| 24 | run: cmake -S . -B native -DZLIB_COMPAT=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DZLIB_LIBRARIES=../zlib/build/libz.a -DZLIB_INCLUDE_DIR="../zlib/build;../zlib" |
| 25 | |
| 26 | - name: Compile source code (native) |
| 27 | run: cmake --build native --config Release |
| 28 | |
| 29 | - name: Upload build errors |
| 30 | uses: actions/upload-artifact@v2 |
| 31 | if: failure() |
| 32 | with: |
| 33 | name: Link zlib (CMake Logs) |
| 34 | path: | |
| 35 | **/CMakeFiles/CMakeOutput.log |
| 36 | **/CMakeFiles/CMakeError.log |
| 37 | retention-days: 30 |
| 38 | |
| 39 | zlib-ng-compat: |
| 40 | name: Link zlib-ng compat |
| 41 | runs-on: ubuntu-latest |
| 42 | steps: |
| 43 | - name: Checkout repository |
| 44 | uses: actions/checkout@v3 |
| 45 | |
| 46 | - name: Generate project files (compat) |
| 47 | run: cmake -S . -B compat -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DWITH_MAINTAINER_WARNINGS=ON |
| 48 | |
| 49 | - name: Compile source code (compat) |
| 50 | run: cmake --build compat --config Release |
| 51 | |
| 52 | - name: Generate project files (native) |
| 53 | run: cmake -S . -B native -DZLIB_COMPAT=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DZLIB_LIBRARIES=../compat/libz.a -DZLIB_INCLUDE_DIR=../compat |
| 54 | |
| 55 | - name: Compile source code (native) |
| 56 | run: cmake --build native --config Release |
| 57 | |
| 58 | - name: Upload build errors |
| 59 | uses: actions/upload-artifact@v2 |
| 60 | if: failure() |
| 61 | with: |
| 62 | name: Link zlib-ng compat (CMake Logs) |
| 63 | path: | |
| 64 | **/CMakeFiles/CMakeOutput.log |
| 65 | **/CMakeFiles/CMakeError.log |
| 66 | retention-days: 30 |