From 37e43ee42a20c94c7d4dc5e8f9d1a012e1ea98c5 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 29 May 2023 11:44:26 +0200 Subject: [PATCH] CI: upload also Linux builds GPUJPEG build doesn't extensive dependencies and it may be useful for users to download and copy to /usr/local without needing to install the CUDA toolkit and compilig by theirselves. + build on ubuntu-latest + rename Windows "archive" to "build" + depend Ubuntu build on retag-continuous --- .github/workflows/ccpp.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index d7bb51f..8f81f0b 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -36,21 +36,36 @@ jobs: Ubuntu: name: run Ubuntu - runs-on: ubuntu-20.04 + needs: retag-continuous + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install run: | sudo apt update - sudo apt install nvidia-cuda-toolkit cmake + sudo apt install cmake jq nvidia-cuda-toolkit - name: Build run: | - mkdir build - cd build - cmake .. - cmake --build . --parallel + cmake -Bbuild . + cmake --build build --parallel ctest -R unittests + cmake --install build --prefix GPUJPEG + tar caf GPUJPEG-Linux.tar.xz GPUJPEG + + - name: Upload Archive + if: github.repository != 'CESNET/GPUJPEG' || github.ref != 'refs/heads/master' + uses: actions/upload-artifact@v3 + with: + name: GPUJPEG CI Linux build + path: GPUJPEG + + - name: Upload Release Build Asset + if: github.repository == 'CESNET/GPUJPEG' && github.ref == 'refs/heads/master' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + .github/scripts/replace-asset.sh continuous GPUJPEG-Linux.tar.xz application/x-gtar Linux%20build Windows: name: run Windows @@ -96,7 +111,7 @@ jobs: if: github.repository != 'CESNET/GPUJPEG' || github.ref != 'refs/heads/master' uses: actions/upload-artifact@v3 with: - name: GPUJPEG CI Windows archive + name: GPUJPEG CI Windows build path: GPUJPEG - name: Upload Installer @@ -106,7 +121,7 @@ jobs: name: GPUJPEG CI Windows installer path: gpujpeg-*-win64.exe - - name: Upload Release Archive Asset + - name: Upload Release Build Asset if: github.repository == 'CESNET/GPUJPEG' && github.ref == 'refs/heads/master' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -114,7 +129,7 @@ jobs: pacman -Sy --noconfirm mingw-w64-x86_64-jq PATH=/mingw64/bin:$PATH echo 'PATH=/mingw64/bin:$PATH' >> ~/.bash_profile # store the path also for next step - .github/scripts/replace-asset.sh continuous GPUJPEG.zip application/zip Windows%20archive + .github/scripts/replace-asset.sh continuous GPUJPEG.zip application/zip Windows%20build shell: C:\shells\msys2bash.cmd {0} - name: Upload Release Installer Asset